X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=lib%2Flayouts%2Flinguistics.module;h=2d71717aa89ddfc8701c20990b914737e394dc9d;hb=a830e51c8ae7d3ab0da4694a7c1d3499db66878f;hp=6068f1793a5e25cf4e100dfad2a3d56b12dcc9eb;hpb=de815f594ee4f9fbfd86cb94dd039bbcc6fbdf7c;p=lyx.git diff --git a/lib/layouts/linguistics.module b/lib/layouts/linguistics.module index 6068f1793a..2d71717aa8 100644 --- a/lib/layouts/linguistics.module +++ b/lib/layouts/linguistics.module @@ -1,4 +1,4 @@ -#\DeclareLyXModule[covington.sty]{Linguistics} +#\DeclareLyXModule[covington.sty,enumitem.sty,forest.sty]{Linguistics} #DescriptionBegin #Defines some special environments useful for linguistics (numbered examples, #glosses, semantic markup, tableau floats). @@ -7,7 +7,7 @@ # Author: Jürgen Spitzmüller -Format 28 +Format 54 # single numbered example with covington.sty Style Numbered_Example_(multiline) @@ -30,6 +30,7 @@ Style Numbered_Example_(multiline) Color Blue EndFont Requires covington + Category Linguistics End @@ -39,13 +40,16 @@ Style Numbered_Examples_(consecutive) LatexType Item_Environment LatexName examples LabelString "Examples:" + Argument item:1 + LabelString "Custom Numbering|s" + Tooltip "Customize the numeration" + EndArgument End # multiple numbered example with covington.sty Style Subexample - CopyStyle Numbered_Example_(multiline) - LatexType Item_Environment + CopyStyle Numbered_Examples_(consecutive) LatexName subexample LabelString "Subexample:" Requires covington,enumitem @@ -61,8 +65,7 @@ End # glosse (2 lines) with covington.sty -# mandatory translation must be entered verbatim! -InsetLayout Custom:Glosse +InsetLayout Flex:Glosse LyXType custom LabelString Glosse LatexType environment @@ -74,23 +77,30 @@ InsetLayout Custom:Glosse MultiPar true CustomPars false ForcePlain true - PassThru true + ParbreakIsNewline true FreeSpacing true - ForceLTR true Requires covington Preamble + \def\glosstr{} \@ifundefined{linggloss}{% - \newenvironment{linggloss}[1]{% - \gll #1} - {\glend}}{} + \newenvironment{linggloss}[2][]{ + \def\glosstr{\glt #1}% + \gll #2} + {\glosstr\glend}}{} EndPreamble InToc true + ResetsFont true + Argument 1 + Decoration conglomerate + LabelString "Translation" + MenuString "Glosse Translation|s" + Tooltip "Add a translation for the glosse" + EndArgument End # glosse (3 lines) with covington.sty -# mandatory translation must be entered verbatim! -InsetLayout Custom:Tri-Glosse +InsetLayout Flex:Tri-Glosse LyXType custom LabelString Tri-Glosse LatexType environment @@ -102,22 +112,50 @@ InsetLayout Custom:Tri-Glosse MultiPar true CustomPars false ForcePlain true - PassThru true + ParbreakIsNewline true FreeSpacing true - ForceLTR true InToc true Requires covington Preamble + \def\glosstr{} \@ifundefined{lingglosss}{% - \newenvironment{lingglosss}[1]{% - \glll #1} - {\glend}}{} + \newenvironment{lingglosss}[2][]{ + \def\glosstr{\glt #1}% + \glll #2} + {\glosstr\glend}}{} EndPreamble + ResetsFont true + Argument 1 + Decoration conglomerate + LabelString "Translation" + MenuString "Glosse Translation|s" + Tooltip "Add a translation for the glosse" + EndArgument +End + + +# Structure trees via the forest package +InsetLayout Flex:Structure_Tree + LyXType custom + LabelString Tree + LatexType environment + LatexName forest + Decoration classic + LabelFont + Size Small + EndFont + MultiPar true + CustomPars false + ParbreakIsNewline true + FreeSpacing true + Requires forest + ResetsFont true + PassThruChars [] End # Some semantik markup for Semantics -InsetLayout CharStyle:Expression +InsetLayout Flex:Expression LyxType charstyle LabelString expr. LatexType command @@ -129,10 +167,11 @@ InsetLayout CharStyle:Expression \newcommand{\lingexpr}[1]{\emph{#1}} EndPreamble InToc true + ResetsFont true End -InsetLayout CharStyle:Concepts +InsetLayout Flex:Concepts LyxType charstyle LabelString concept LatexType command @@ -144,10 +183,11 @@ InsetLayout CharStyle:Concepts \newcommand{\lingconcept}[1]{\textsc{#1}} EndPreamble InToc true + ResetsFont true End -InsetLayout CharStyle:Meaning +InsetLayout Flex:Meaning LyxType charstyle LabelString meaning LatexType command @@ -157,6 +197,17 @@ InsetLayout CharStyle:Meaning \newcommand{\lingmeaning}[1]{\enquote*{#1}} EndPreamble InToc true + ResetsFont true +End + + +# A helper to group words in Glosses +InsetLayout Flex:GroupGlossedWords + LyxType charstyle + LabelString Group + LeftDelim { + RightDelim } + ResetsFont true End @@ -169,6 +220,7 @@ Float NumberWithin none Style plain ListName "List of Tableaux" - NeedsFloatPkg true + IsPredefined false + UsesFloatPkg true End