]> git.lyx.org Git - lyx.git/blobdiff - lib/layouts/linguistics.module
Fix bug #11410.
[lyx.git] / lib / layouts / linguistics.module
index 1716f720b020b71181ec8c781f3be5058aafe9bf..c9478b5d43e6b4fc7e621fda7347df25476d5b34 100644 (file)
@@ -1,4 +1,4 @@
-#\DeclareLyXModule[covington.sty,forest.sty]{Linguistics}
+#\DeclareLyXModule[covington.sty,drs.sty,forest.sty,pict2e.sty]{Linguistics}
 #\DeclareCategory{Academic Field Specifics}
 #DescriptionBegin
 #Defines some special environments useful for linguistics (numbered examples,
@@ -8,31 +8,59 @@
 
 # Author: Jürgen Spitzmüller <spitz@lyx.org>
 
-Format 74
+Format 97
+
+#
+# Counters
+#
 
 Counter example
+       GuiName Example
        Within               chapter
        LabelString          "(\arabic{example})"
 End
 
 Counter examplei
+       GuiName              "Numbered Example (Multiline)"
        Within               chapter
        LabelString          "(\arabic{examplei})"
 End
 
 Counter subexample
+       GuiName              Subexample
        Within               examplei
        LabelString          "\theexamplei (\alph{subexample})"
 End
 
 Counter subexamplei
+       GuiName              Subexample
        Within               examplei
        LabelString          "\theexamplei (\alph{subexamplei})"
 End
 
-OutlinerName tableau    "Tableaux" #no AddToToc (built-in)
+Counter subexampleii
+       GuiName              Subexample
+       Within               examplei
+       LabelString          "\theexamplei (\alph{subexampleii})"
+End
+
+Counter subexampleiii
+       GuiName              Subexample
+       Within               examplei
+       LabelString          "\theexamplei (\alph{subexampleiii})"
+End
+
+Counter subexampleiv
+       GuiName              Subexample
+       Within               examplei
+       LabelString          "\theexamplei (\alph{subexampleiv})"
+End
 
-# single numbered example with covington.sty
+#
+# Numbered Examples
+#
+
+# Single numbered example with covington.sty
 Style Numbered_Example_(multiline)
        LatexType             Environment
        LatexName             covexample
@@ -50,14 +78,18 @@ Style Numbered_Example_(multiline)
        LabelType             Static
        LabelCounter          "examplei"
        LabelFont
-               Color         Blue
+               Color         textlabel1
        EndFont
        Requires              covington
        Category              Linguistics
+       DocBookWrapperTag     informalexample
+       DocBookWrapperAttr    role='numbered'
+       DocBookWrapperMergeWithPrevious  true
+       DocBookTag            para
 End
 
 
-# multiple numbered examples with covington.sty
+# Multiple numbered examples with covington.sty
 Style Numbered_Examples_(consecutive)
        CopyStyle             Numbered_Example_(multiline)
        LatexType             Item_Environment
@@ -79,20 +111,36 @@ Style Numbered_Examples_(consecutive)
                LabelString   "Custom Numbering|s"
                Tooltip       "Customize the numeration"
        EndArgument
+       DocBookWrapperTag     informalexample
+       DocBookWrapperAttr    role='consecutive'
+       DocBookWrapperMergeWithPrevious  true
+       DocBookTag            para
+       HTMLClass             NumberedExample
 End
 
 
-# multiple numbered examples with covington.sty
+# Sub-examples with covington.sty
 Style Subexample
        CopyStyle             Numbered_Examples_(consecutive)
        LatexName             covsubexamples
        LabelCounter          "subexample"
-       StepMasterCounter     true
+       StepParentCounter     true
        Requires              covington
+       Argument 1
+               LabelString   "Subexamples options"
+               MenuString    "Subexamples options|s"
+               Tooltip       "Add subexamples options here"
+               PassThru       1
+       EndArgument
+       HTMLClass          SubExample
 End
 
 
-# glosse (2 lines) with covington.sty
+#
+# Interlinear Glosses
+#
+
+# Two-Line gloss with covington.sty
 InsetLayout Flex:Interlinear_Gloss_(2_Lines)
        LyXType               custom
        LabelString           Gloss
@@ -138,7 +186,7 @@ InsetLayout Flex:Interlinear_Gloss_(2_Lines)
 End
 
 
-# glosse (3 lines) with covington.sty
+# Three-Line gloss with covington.sty
 InsetLayout Flex:Interlinear_Gloss_(3_Lines)
        LyXType               custom
        LabelString           Tri-Gloss
@@ -193,6 +241,20 @@ InsetLayout Flex:Interlinear_Gloss_(3_Lines)
 End
 
 
+# A helper to group words in glosses
+InsetLayout Flex:GroupGlossedWords
+       LyxType               charstyle
+       LabelString           Group
+       LeftDelim             {
+       RightDelim            }
+       ResetsFont            true
+End
+
+
+#
+# Trees
+#
+
 # Structure trees via the forest package
 InsetLayout Flex:Structure_Tree
        LyXType               custom
@@ -216,21 +278,199 @@ InsetLayout Flex:Structure_Tree
        \useforestlibrary*{linguistics}
        }{}
        EndPreamble
+    DocBookRenderAsImage  true
+End
+
+
+#
+# Discourse Representation Structures
+#
+
+InsetLayout Flex:DRS
+       LyXType               custom
+       LabelString           DRS
+       MenuString            "Discourse Representation Structure|D"
+       LatexType             command
+       LatexName             drs
+       Decoration            classic
+       MultiPar              true
+       CustomPars            false
+       ParbreakIsNewline     true
+       FreeSpacing           true
+       Requires              drs
+       ResetsFont            true
+       Argument 1
+               Decoration    conglomerate
+               LabelString   "Referents"
+               MenuString    "DRS Referents"
+               Tooltip       "Add the DRS referents (universe) here"
+               Mandatory     true
+               AutoInsert    true
+       EndArgument
+End
+
+
+InsetLayout Flex:DRS*
+       CopyStyle             Flex:DRS
+       LabelString           DRS*
+       MenuString            "Discourse Representation Structure (unspaced)|u"
+       LatexName             drs*
+End
+
+
+InsetLayout Flex:IfThen-DRS
+       CopyStyle             Flex:DRS
+       LabelString           "If-Then DRS"
+       MenuString            "If-Then DRS"
+       LatexName             ifdrs
+       Argument post:1
+               Decoration    classic
+               LabelString   "Then-Referents"
+               MenuString    "DRS Then-Referents"
+               Tooltip       "Add the DRS then-referents (universe) here"
+               Mandatory     true
+               AutoInsert    true
+               InsertOnNewline true
+       EndArgument
+       Argument post:2
+               Decoration    classic
+               LabelString   "Then-Conditions"
+               MenuString    "DRS Then-Referents"
+               Tooltip       "Add the DRS then-conditions here"
+               Mandatory     true
+               AutoInsert    true
+               InsertOnNewline true
+       EndArgument
+End
+
+
+InsetLayout Flex:Cond-DRS
+       CopyStyle             Flex:DRS
+       LabelString           "Cond. DRS"
+       MenuString            "Conditional DRS"
+       LatexName             condrs
+       Argument post:1
+               Decoration    classic
+               LabelString   "Cond."
+               MenuString    "DRS Condition"
+               Tooltip       "Add the DRS condition here"
+               Mandatory     true
+               AutoInsert    true
+               InsertOnNewline true
+       EndArgument
+       Argument post:2
+               Decoration    classic
+               LabelString   "Then-Referents"
+               MenuString    "DRS Then-Referents"
+               Tooltip       "Add the DRS then-referents (universe) here"
+               Mandatory     true
+               AutoInsert    true
+               InsertOnNewline true
+       EndArgument
+       Argument post:3
+               Decoration    classic
+               LabelString   "Then-Conditions"
+               MenuString    "DRS Then-Referents"
+               Tooltip       "Add the DRS then-conditions here"
+               Mandatory     true
+               AutoInsert    true
+               InsertOnNewline true
+       EndArgument
+End
+
+
+InsetLayout Flex:QDRS
+       CopyStyle             Flex:DRS
+       LabelString           "Dupl. Cond. DRS"
+       MenuString            "Duplex Condition DRS"
+       LatexName             qdrs
+       Argument post:1
+               Decoration    classic
+               LabelString   "Quant."
+               MenuString    "DRS Quantifier"
+               Tooltip       "Add the DRS duplex quantifier here"
+               Mandatory     true
+               AutoInsert    true
+               InsertOnNewline true
+       EndArgument
+       Argument post:2
+               Decoration    classic
+               LabelString   "Quant. Var."
+               MenuString    "DRS Quantifier Variable"
+               Tooltip       "Add the DRS duplex quantifier variables here"
+               Mandatory     true
+               AutoInsert    true
+               InsertOnNewline true
+       EndArgument
+       Argument post:3
+               Decoration    classic
+               LabelString   "Then-Referents"
+               MenuString    "DRS Then-Referents"
+               Tooltip       "Add the DRS then-referents (universe) here"
+               Mandatory     true
+               AutoInsert    true
+               InsertOnNewline true
+       EndArgument
+       Argument post:4
+               Decoration    classic
+               LabelString   "Then-Conditions"
+               MenuString    "DRS Then-Referents"
+               Tooltip       "Add the DRS then-conditions here"
+               Mandatory     true
+               AutoInsert    true
+               InsertOnNewline true
+       EndArgument
+       Requires              drs,pict2e
+End
+
+
+InsetLayout Flex:NegDRS
+       CopyStyle             Flex:DRS
+       LabelString           "Neg. DRS"
+       MenuString            "Negated DRS"
+       LatexName             negdrs
 End
 
 
-# Some semantik markup for Semantics
+InsetLayout Flex:SDRS
+       CopyStyle             Flex:DRS
+       LabelString           "Sent. DRS"
+       MenuString            "DRS with Sentence above"
+       LatexName             sdrs
+       Argument 1
+               Decoration    conglomerate
+               LabelString   "Sentence"
+               MenuString    "DRS Sentence"
+               Tooltip       "Add the sentence here"
+               Mandatory     true
+               AutoInsert    true
+               InsertOnNewline true
+       EndArgument
+       Argument 2
+               Decoration    conglomerate
+               LabelString   "Referents"
+               MenuString    "DRS Referents"
+               Tooltip       "Add the DRS referents (universe) here"
+               Mandatory     true
+               AutoInsert    true
+               InsertOnNewline true
+       EndArgument
+End
+
+
+#
+# Semantic Markup
+#
+
 InsetLayout Flex:Expression
        LyxType               charstyle
        LabelString           expr.
        LatexType             command
-       LatexName             lingexpr
+       LatexName             lexp
+       Requires              covington
        Font
          Shape               Italic
        EndFont
-       Preamble
-               \newcommand{\lingexpr}[1]{\emph{#1}}
-       EndPreamble
        InToc                 true
        ResetsFont            true
 End
@@ -240,13 +480,11 @@ InsetLayout Flex:Concepts
        LyxType               charstyle
        LabelString           concept
        LatexType             command
-       LatexName             lingconcept
+       LatexName             lcon
+       Requires              covington
        Font
          Shape               Smallcaps
        EndFont
-       Preamble
-               \newcommand{\lingconcept}[1]{\textsc{#1}}
-       EndPreamble
        InToc                 true
        ResetsFont            true
 End
@@ -256,27 +494,17 @@ InsetLayout Flex:Meaning
        LyxType               charstyle
        LabelString           meaning
        LatexType             command
-       LatexName             lingmeaning
-       Requires              csquotes
-       Preamble
-               \newcommand{\lingmeaning}[1]{\enquote*{#1}}
-       EndPreamble
+       LatexName             lmean
+       Requires              covington,csquotes
        InToc                 true
        ResetsFont            true
 End
 
 
-# A helper to group words in Glosses
-InsetLayout Flex:GroupGlossedWords
-       LyxType               charstyle
-       LabelString           Group
-       LeftDelim             {
-       RightDelim            }
-       ResetsFont            true
-End
-
+#
+# OT Tableaux
+#
 
-# Tableaux for Optimality Theory
 OutlinerName tableau        "Tableaux" #no AddToToc
 
 Float