X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=lib%2Flayouts%2Flinguistics.module;h=8e360f7b2bef18efead9ba8981b6ff595f2c2cfb;hb=adefdf8eebb9aebccdd472482579e55758857f66;hp=359c500daf6952395e4031f9a62a47faada51133;hpb=6580c5753dea88ac7de6058923870193e7a77fa9;p=lyx.git diff --git a/lib/layouts/linguistics.module b/lib/layouts/linguistics.module index 359c500daf..8e360f7b2b 100644 --- a/lib/layouts/linguistics.module +++ b/lib/layouts/linguistics.module @@ -1,34 +1,67 @@ -#\DeclareLyXModule[covington.sty,drs.sty,forest.sty,pict2e.sty]{Linguistics} +#\DeclareLyXModule[covington.sty,drs.sty,forest.sty,pict2e.sty,varwidth.sty]{Linguistics} #\DeclareCategory{Academic Field Specifics} #DescriptionBegin #Defines some special environments useful for linguistics (numbered examples, #glosses, semantic markup, tableau floats). -#See linguistics.lyx file in examples. +#See Help > Specific Manuals > Linguistics. #DescriptionEnd # Author: Jürgen Spitzmüller -Format 80 +Format 104 # # Counters # Counter example + GuiName Example Within chapter LabelString "(\arabic{example})" + PrettyFormat "(\arabic{example})" End Counter examplei + GuiName "Numbered Example (Multiline)" Within chapter LabelString "(\arabic{examplei})" + PrettyFormat "(\arabic{examplei})" End Counter subexample + GuiName Subexample Within examplei LabelString "\theexamplei (\alph{subexample})" + PrettyFormat "\theexamplei (\alph{subexample})" End +Counter subexamplei + GuiName Subexample + Within examplei + LabelString "\theexamplei (\alph{subexamplei})" + PrettyFormat "\theexamplei (\alph{subexamplei})" +End + +Counter subexampleii + GuiName Subexample + Within examplei + LabelString "\theexamplei (\alph{subexampleii})" + PrettyFormat "\theexamplei (\alph{subexampleii})" +End + +Counter subexampleiii + GuiName Subexample + Within examplei + LabelString "\theexamplei (\alph{subexampleiii})" + PrettyFormat "\theexamplei (\alph{subexampleiii})" +End + +Counter subexampleiv + GuiName Subexample + Within examplei + LabelString "\theexamplei (\alph{subexampleiv})" + PrettyFormat "\theexamplei (\alph{subexampleiv})" +End # # Numbered Examples @@ -52,10 +85,20 @@ Style Numbered_Example_(multiline) LabelType Static LabelCounter "examplei" LabelFont - Color Blue + Color textlabel1 EndFont Requires covington + Argument 1 + LabelString "Example options" + MenuString "Examples options|s" + Tooltip "Add examples options here" + PassThru 1 + EndArgument Category Linguistics + DocBookWrapperTag informalexample + DocBookWrapperAttr role='numbered' + DocBookWrapperMergeWithPrevious true + DocBookTag para End @@ -78,9 +121,20 @@ Style Numbered_Examples_(consecutive) EndFont EndArgument Argument item:1 + LabelString "Judgment|J" + Tooltip "Grammaticality judgment marker" + LeftDelim < + RightDelim > + EndArgument + Argument item:2 LabelString "Custom Numbering|s" Tooltip "Customize the numeration" EndArgument + DocBookWrapperTag informalexample + DocBookWrapperAttr role='consecutive' + DocBookWrapperMergeWithPrevious true + DocBookTag para + HTMLClass NumberedExample End @@ -89,7 +143,7 @@ Style Subexample CopyStyle Numbered_Examples_(consecutive) LatexName covsubexamples LabelCounter "subexample" - StepMasterCounter true + StepParentCounter true Requires covington Argument 1 LabelString "Subexamples options" @@ -97,6 +151,46 @@ Style Subexample Tooltip "Add subexamples options here" PassThru 1 EndArgument + HTMLClass SubExample +End + +InsetLayout Flex:Example_Preamble + LyXType custom + Decoration classic + LatexType command + LatexName expreamble + LabelString "Ex. Preamble" + ResetsFont true + AllowedInLayouts + Numbered_Example_(multiline), Numbered_Examples_(consecutive) + EndAllowedInLayouts + AllowedOccurrences 1 + AllowedOccurrencesPerItem true +End + +InsetLayout Flex:Subexample_Preamble + CopyStyle Flex:Example_Preamble + LatexName subexpreamble + LabelString "Subex. Preamble" + AllowedInLayouts + Subexample + EndAllowedInLayouts +End + + +InsetLayout Flex:Example_Postamble + CopyStyle Flex:Example_Preamble + LatexName expostamble + LabelString "Ex. Postamble" +End + +InsetLayout Flex:Subexample_Postamble + CopyStyle Flex:Example_Preamble + LatexName subexpostamble + LabelString "Subex. Postamble" + AllowedInLayouts + Subexample + EndAllowedInLayouts End @@ -128,6 +222,11 @@ InsetLayout Flex:Interlinear_Gloss_(2_Lines) Tooltip "Add digloss options here" EndArgument Argument post:1 + LabelString "Sentence Comment" + MenuString "Sentence Comment" + Tooltip "Add an optional sentence comment here" + EndArgument + Argument post:2 Decoration conglomerate LabelString "Interlinear Gloss" MenuString "Interlinear Gloss" @@ -137,7 +236,12 @@ InsetLayout Flex:Interlinear_Gloss_(2_Lines) FreeSpacing true InsertOnNewline true EndArgument - Argument post:2 + Argument post:3 + LabelString "Gloss Comment" + MenuString "Gloss Comment" + Tooltip "Add an optional gloss comment here" + EndArgument + Argument post:4 Decoration conglomerate LabelString "Translation" MenuString "Gloss Translation" @@ -174,6 +278,11 @@ InsetLayout Flex:Interlinear_Gloss_(3_Lines) Tooltip "Add trigloss options here" EndArgument Argument post:1 + LabelString "Sentence Comment" + MenuString "Sentence Comment" + Tooltip "Add an optional sentence comment here" + EndArgument + Argument post:2 Decoration conglomerate LabelString "Interlinear Gloss (1)" MenuString "Interlinear Gloss (Line 1)|1" @@ -183,17 +292,27 @@ InsetLayout Flex:Interlinear_Gloss_(3_Lines) FreeSpacing true InsertOnNewline true EndArgument - Argument post:2 + Argument post:3 + LabelString "Gloss Comment (1)" + MenuString "Gloss Comment (Line 1)" + Tooltip "Add an optional gloss comment here" + EndArgument + Argument post:4 Decoration conglomerate LabelString "Interlinear Gloss (2)" MenuString "Interlinear Gloss (Line 2)|2" - Tooltip "Add the first inter-linear gloss line here" + Tooltip "Add the second inter-linear gloss line here" Mandatory true AutoInsert true FreeSpacing true InsertOnNewline true EndArgument - Argument post:3 + Argument post:5 + LabelString "Gloss Comment (2)" + MenuString "Gloss Comment (Line 2)" + Tooltip "Add an optional gloss comment here" + EndArgument + Argument post:6 Decoration conglomerate LabelString "Translation" MenuString "Gloss Translation" @@ -212,6 +331,11 @@ InsetLayout Flex:GroupGlossedWords LeftDelim { RightDelim } ResetsFont true + AllowedInInsets + Flex:Interlinear_Gloss_(2_Lines), Flex:Interlinear_Gloss_(2_Lines)@post:2, + Flex:Interlinear_Gloss_(3_Lines), Flex:Interlinear_Gloss_(3_Lines)@post:2, + Flex:Interlinear_Gloss_(3_Lines)@post:4 + EndAllowedInInsets End @@ -242,6 +366,7 @@ InsetLayout Flex:Structure_Tree \useforestlibrary*{linguistics} }{} EndPreamble + DocBookRenderAsImage true End @@ -480,5 +605,6 @@ Float ListName "List of Tableaux" IsPredefined false UsesFloatPkg true + PrettyFormat "Tableau ##" End