mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-14 23:12:31 +00:00
6b49b6b129
This makes the defaults of Inset::inheritFont() and Inset::resetFontEdit() compatible. There is no user visible change except for the Chunk inset which does not produce invalid LaTeX after editing operations anymore. This is the safe version for 2.1.0, for later there are still open questions: - All insets with ResetsFont true should be audited: Is this really needed, or do they show similar editing problems as the Chunk inset? - Does inheritFont() need to be customizable in the layout file as well? - Is resetFontEdit() != !inheritFont() needed at all? I did not use change tracking for the docs, since I updated all existing translations.
184 lines
4.3 KiB
Plaintext
184 lines
4.3 KiB
Plaintext
#\DeclareLyXModule[covington.sty]{Linguistics}
|
|
#DescriptionBegin
|
|
#Defines some special environments useful for linguistics (numbered examples,
|
|
#glosses, semantic markup, tableau floats).
|
|
#See linguistics.lyx file in examples.
|
|
#DescriptionEnd
|
|
|
|
# Author: Jürgen Spitzmüller <spitz@lyx.org>
|
|
|
|
Format 49
|
|
|
|
# single numbered example with covington.sty
|
|
Style Numbered_Example_(multiline)
|
|
LatexType Environment
|
|
LatexName example
|
|
NextNoIndent 1
|
|
Margin Dynamic
|
|
LabelSep xx
|
|
ParSkip 0.0
|
|
ItemSep 0.2
|
|
TopSep 0.7
|
|
BottomSep 0.7
|
|
ParSep 0.3
|
|
Align Block
|
|
AlignPossible Block, Left
|
|
LabelType Static
|
|
LabelString "Example:"
|
|
LabelFont
|
|
Shape Italic
|
|
Color Blue
|
|
EndFont
|
|
Requires covington
|
|
Category Linguistics
|
|
End
|
|
|
|
|
|
# multiple numbered examples with covington.sty
|
|
Style Numbered_Examples_(consecutive)
|
|
CopyStyle Numbered_Example_(multiline)
|
|
LatexType Item_Environment
|
|
LatexName examples
|
|
LabelString "Examples:"
|
|
End
|
|
|
|
|
|
# multiple numbered example with covington.sty
|
|
Style Subexample
|
|
CopyStyle Numbered_Example_(multiline)
|
|
LatexType Item_Environment
|
|
LatexName subexample
|
|
LabelString "Subexample:"
|
|
Requires covington,enumitem
|
|
Preamble
|
|
\newenvironment{subexample}{%
|
|
\begin{example}\begin{enumerate}[leftmargin=1.7em]
|
|
\renewcommand\theenumi{\alph{enumi}}
|
|
\renewcommand\labelenumi{(\theenumi)}
|
|
\renewcommand\p@enumi{\theequation\,}}%
|
|
{\end{enumerate}\end{example}}
|
|
EndPreamble
|
|
End
|
|
|
|
|
|
# glosse (2 lines) with covington.sty
|
|
# mandatory translation must be entered verbatim!
|
|
InsetLayout Flex:Glosse
|
|
LyXType custom
|
|
LabelString Glosse
|
|
LatexType environment
|
|
LatexName linggloss
|
|
Decoration minimalistic
|
|
LabelFont
|
|
Size Small
|
|
EndFont
|
|
MultiPar true
|
|
CustomPars false
|
|
ForcePlain true
|
|
PassThru true
|
|
ParbreakIsNewline true
|
|
FreeSpacing true
|
|
ForceLTR true
|
|
Requires covington
|
|
Preamble
|
|
\@ifundefined{linggloss}{%
|
|
\newenvironment{linggloss}[1]{%
|
|
\gll #1}
|
|
{\glend}}{}
|
|
EndPreamble
|
|
InToc true
|
|
ResetsFont true
|
|
End
|
|
|
|
|
|
# glosse (3 lines) with covington.sty
|
|
# mandatory translation must be entered verbatim!
|
|
InsetLayout Flex:Tri-Glosse
|
|
LyXType custom
|
|
LabelString Tri-Glosse
|
|
LatexType environment
|
|
LatexName lingglosss
|
|
Decoration minimalistic
|
|
LabelFont
|
|
Size Small
|
|
EndFont
|
|
MultiPar true
|
|
CustomPars false
|
|
ForcePlain true
|
|
PassThru true
|
|
ParbreakIsNewline true
|
|
FreeSpacing true
|
|
ForceLTR true
|
|
InToc true
|
|
Requires covington
|
|
Preamble
|
|
\@ifundefined{lingglosss}{%
|
|
\newenvironment{lingglosss}[1]{%
|
|
\glll #1}
|
|
{\glend}}{}
|
|
EndPreamble
|
|
ResetsFont true
|
|
End
|
|
|
|
|
|
# Some semantik markup for Semantics
|
|
InsetLayout Flex:Expression
|
|
LyxType charstyle
|
|
LabelString expr.
|
|
LatexType command
|
|
LatexName lingexpr
|
|
Font
|
|
Shape Italic
|
|
EndFont
|
|
Preamble
|
|
\newcommand{\lingexpr}[1]{\emph{#1}}
|
|
EndPreamble
|
|
InToc true
|
|
ResetsFont true
|
|
End
|
|
|
|
|
|
InsetLayout Flex:Concepts
|
|
LyxType charstyle
|
|
LabelString concept
|
|
LatexType command
|
|
LatexName lingconcept
|
|
Font
|
|
Shape Smallcaps
|
|
EndFont
|
|
Preamble
|
|
\newcommand{\lingconcept}[1]{\textsc{#1}}
|
|
EndPreamble
|
|
InToc true
|
|
ResetsFont true
|
|
End
|
|
|
|
|
|
InsetLayout Flex:Meaning
|
|
LyxType charstyle
|
|
LabelString meaning
|
|
LatexType command
|
|
LatexName lingmeaning
|
|
Requires csquotes
|
|
Preamble
|
|
\newcommand{\lingmeaning}[1]{\enquote*{#1}}
|
|
EndPreamble
|
|
InToc true
|
|
ResetsFont true
|
|
End
|
|
|
|
|
|
# Tableaux for Optimality Theory
|
|
Float
|
|
Type tableau
|
|
GuiName Tableau
|
|
Placement tbp
|
|
Extension otl
|
|
NumberWithin none
|
|
Style plain
|
|
ListName "List of Tableaux"
|
|
IsPredefined false
|
|
UsesFloatPkg true
|
|
End
|
|
|