commit c0c58f4d5865163892c2ad23961bfc0ee1b7b478 Author: Juergen Spitzmueller <sp...@lyx.org> Date: Wed Aug 13 16:36:16 2025 +0200
Update Linguistics manual Document how to setup formatted reference to (sub-)examples with all supported xref packages. --- lib/examples/Modules/Linguistics.lyx | 1242 ++++++++++++++++++++++++++----- lib/examples/de/Modules/Linguistics.lyx | 790 ++++++++++++++++++-- 2 files changed, 1798 insertions(+), 234 deletions(-) diff --git a/lib/examples/Modules/Linguistics.lyx b/lib/examples/Modules/Linguistics.lyx index 345e63d81c..233b7dd003 100644 --- a/lib/examples/Modules/Linguistics.lyx +++ b/lib/examples/Modules/Linguistics.lyx @@ -1,5 +1,5 @@ -#LyX 2.4 created this file. For more info see https://www.lyx.org/ -\lyxformat 620 +#LyX 2.5 created this file. For more info see https://www.lyx.org/ +\lyxformat 643 \begin_document \begin_header \save_transient_properties true @@ -30,6 +30,9 @@ } } }{} + +% Formatted references to (sub-)examples via prettyref +\newrefformat{lex}{example~(\ref{#1})} \end_preamble \use_default_options false \begin_modules @@ -92,11 +95,19 @@ linguistics \use_indices false \paperorientation portrait \suppress_date false -\justification true -\use_refstyle 0 +\justification default +\crossref_package prettyref \use_formatted_ref 0 \use_minted 0 \use_lineno 0 +\backgroundcolor none +\fontcolor none +\notefontcolor lightgray +\boxbgcolor red +\table_border_color default +\table_odd_row_color default +\table_even_row_color default +\table_alt_row_colors_start 1 \index Index \shortcut idx \color #008000 @@ -113,6 +124,7 @@ linguistics \papersides 1 \paperpagestyle default \tablestyle default +\listings_params "language={[LaTeX]TeX},basicstyle={\ttfamily}" \tracking_changes true \output_changes false \change_bars false @@ -122,6 +134,8 @@ linguistics \html_be_strict false \docbook_table_output 0 \docbook_mathml_prefix 1 +\docbook_mathml_version 0 +\author -712698321 "Jürgen Spitzmüller" \end_header \begin_body @@ -149,7 +163,15 @@ literal "false" \end_layout \begin_layout Date + +\change_deleted -712698321 1755087294 21/04/2015 +\change_inserted -712698321 1755087308 +\SpecialChar LyX + v. + 2.5 +\change_unchanged + \end_layout \begin_layout Abstract @@ -325,221 +347,1060 @@ arg "drs" . \end_layout -\end_deeper -\begin_layout Enumerate +\end_deeper +\begin_layout Enumerate + +\emph on +float.sty +\emph default + +\begin_inset CommandInset citation +LatexCommand cite +key "float" +literal "true" + +\end_inset + +: + Needed for the OT tableaux floats and list of floats. + This package should be part of any \SpecialChar LaTeX + distribution. +\end_layout + +\begin_deeper +\begin_layout Itemize +Installed on your system: + +\begin_inset Info +type "package" +arg "float" +\end_inset + +. +\end_layout + +\end_deeper +\begin_layout Enumerate + +\emph on +forest.sty +\emph default + +\begin_inset CommandInset citation +LatexCommand cite +key "forest" +literal "true" + +\end_inset + +: + This package is used to generate structure trees. +\end_layout + +\begin_deeper +\begin_layout Itemize +Installed on your system: + +\begin_inset Info +type "package" +arg "forest" +\end_inset + +. +\end_layout + +\end_deeper +\begin_layout Enumerate + +\emph on +pict2e.sty +\emph default + +\begin_inset CommandInset citation +LatexCommand cite +key "pict2e" +literal "true" + +\end_inset + +: + Needed for +\emph on +Duplex Condition DRS +\emph default +es. +\end_layout + +\begin_deeper +\begin_layout Itemize +Installed on your system: + +\begin_inset Info +type "package" +arg "pict2e" +\end_inset + +. +\end_layout + +\end_deeper +\begin_layout Enumerate + +\emph on +varwidth.sty +\emph default + +\begin_inset CommandInset citation +LatexCommand cite +key "varwidth" +literal "true" + +\end_inset + +: + Needed by covington (as of version 2.11) for gloss comments. +\end_layout + +\begin_deeper +\begin_layout Itemize +Installed on your system: + +\begin_inset Info +type "package" +arg "varwidth" +\end_inset + +. +\end_layout + +\end_deeper +\begin_layout Section +Numbered Examples +\end_layout + +\begin_layout Standard +Numbered examples are inserted via the layout drop-down box in the toolbar. + There are three variants: +\end_layout + +\begin_layout Numbered Example (multiline) +This is a multiline example [Style +\emph on +Numbered Example (multiline) +\emph default +] +\end_layout + +\begin_layout Numbered Example (multiline) +it can have several paragraphs +\end_layout + +\begin_layout Numbered Examples (consecutive) +This is a single example +\change_inserted -712698321 1755086583 + +\begin_inset CommandInset label +LatexCommand label +name "lex:single-example" + +\end_inset + + +\change_deleted -712698321 1755086583 + +\begin_inset CommandInset label +LatexCommand label +name "exa:single-example" + +\end_inset + + +\change_unchanged + [Style +\emph on +Numbered Example (consecutive) +\emph default +] +\end_layout + +\begin_layout Numbered Examples (consecutive) +Consecutive single examples get their own numbers +\end_layout + +\begin_layout Subexample +This is a subexample +\change_inserted -712698321 1755086597 + +\begin_inset CommandInset label +LatexCommand label +name "lex:subexample" + +\end_inset + + +\change_deleted -712698321 1755086597 + +\begin_inset CommandInset label +LatexCommand label +name "subsec:subexample" + +\end_inset + + +\change_unchanged + [Style +\emph on +Subexample +\emph default +] +\end_layout + +\begin_layout Subexample +And another one +\end_layout + +\begin_layout Standard +References to examples are produced as usual: + insert a label to the example and a cross-reference via +\family sans +Insert\SpecialChar menuseparator +Cross references +\family default +. + +\change_deleted -712698321 1755090756 +We refer here, + just for the sake of demonstrating this, + to +\change_inserted -712698321 1755090863 + +\end_layout + +\begin_layout Standard + +\change_inserted -712698321 1755090789 +Simple references which only output the number look like this: + +\change_unchanged + +\change_inserted -712698321 1755086583 + +\begin_inset CommandInset ref +LatexCommand ref +reference "lex:single-example" + +\end_inset + + +\change_deleted -712698321 1755090756 + +\begin_inset CommandInset ref +LatexCommand ref +reference "exa:single-example" +nolink "false" + +\end_inset + + +\change_unchanged + and +\change_inserted -712698321 1755086597 + +\begin_inset CommandInset ref +LatexCommand ref +reference "lex:subexample" + +\end_inset + + +\change_deleted -712698321 1755090756 + +\begin_inset CommandInset ref +LatexCommand ref +reference "subsec:subexample" +nolink "false" + +\end_inset + + +\change_unchanged +. + +\change_inserted -712698321 1755092855 + If you want the numbers to be embraced in parentheses, + as is the convention, + select the parenthetical format instead: + +\begin_inset CommandInset ref +LatexCommand eqref +reference "lex:single-example" + +\end_inset + + and +\begin_inset CommandInset ref +LatexCommand eqref +reference "lex:subexample" + +\end_inset + +. +\change_unchanged + +\end_layout + +\begin_layout Standard + +\change_inserted -712698321 1755091020 +For more convenient referencing, + you can also use +\begin_inset Quotes eld +\end_inset + +formatted references +\begin_inset Quotes erd +\end_inset + + that automatically add the +\emph on +example +\emph default + string and embrace the number in parentheses, + as in: + +\begin_inset CommandInset ref +LatexCommand formatted +reference "lex:single-example" +plural "false" +caps "false" +noprefix "false" +nolink "false" +tuple "list" + +\end_inset + + and +\begin_inset CommandInset ref +LatexCommand formatted +reference "lex:subexample" +plural "false" +caps "false" +noprefix "false" +nolink "false" +tuple "list" + +\end_inset + +. + However, + as the cross-reference packages that are employed by \SpecialChar LyX + to produce such references do not know +\emph on +covington +\emph default +, + you will need to add some preamble code to make this work, + and the code depends on your choice in +\family sans +Document\SpecialChar menuseparator +Settings\SpecialChar menuseparator +Document Class\SpecialChar menuseparator +Format Packages +\family default +. +\end_layout + +\begin_layout Standard + +\change_inserted -712698321 1755091214 +In what follows, + we describe the necessary settings for English documents. + If you write in a different language (or prefer other terminology), + adapt the +\emph on +example +\emph default + strings in their different casing and number variant ( +\emph on +examples +\emph default +, + +\emph on +Example +\emph default +, + +\emph on +Examples +\emph default +). + For languages that always uppercase nouns (such as German), + use uppercase variants in all cases: +\end_layout + +\begin_layout Enumerate + +\change_inserted -712698321 1755087781 +With +\begin_inset Quotes eld +\end_inset + +prettyref and varioref +\begin_inset Quotes erd +\end_inset + + (which we use in this document), + add: +\end_layout + +\begin_deeper +\begin_layout Standard + +\change_inserted -712698321 1755087823 +\begin_inset listings +inline false +status open + +\begin_layout Plain Layout + +\change_inserted -712698321 1755087803 + +\backslash +newrefformat{lex}{example~( +\backslash +ref{#1})} +\change_unchanged + +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard + +\change_inserted -712698321 1755088729 +Note that the +\emph on +prettyref +\emph default + package is rather simple and supports no optional plural ( +\emph on +examples +\emph default +) or uppercase ( +\emph on +Example +\emph default +, + +\emph on +Examples +\emph default +) variants (which you could otherwise select in the cross-references dialog). + Also note that the definition depends on which prefix you use in your labels. + The definition above assumes +\begin_inset Quotes eld +\end_inset + +lex: +\begin_inset Quotes erd +\end_inset + +, + which is the prefix automatically inserted by \SpecialChar LyX + for linguistic examples and subexamples. +\end_layout + +\end_deeper +\begin_layout Enumerate + +\change_inserted -712698321 1755088253 +With +\begin_inset Quotes eld +\end_inset + +refstyle and varioref +\begin_inset Quotes erd +\end_inset + + (which is the default setting for new documents), + add: +\end_layout + +\begin_deeper +\begin_layout Standard + +\change_inserted -712698321 1755088337 +\begin_inset listings +inline false +status open + +\begin_layout Plain Layout + +\change_inserted -712698321 1755088284 + +\backslash +newref{lex}{ +\end_layout + +\begin_layout Plain Layout + +\change_inserted -712698321 1755088289 + name = +\backslash +RSlextxt, +\end_layout + +\begin_layout Plain Layout + +\change_inserted -712698321 1755088291 + names = +\backslash +RSlexstxt, +\end_layout + +\begin_layout Plain Layout + +\change_inserted -712698321 1755088293 + Name = +\backslash +RSLextxt, +\end_layout + +\begin_layout Plain Layout + +\change_inserted -712698321 1755088295 + Names = +\backslash +RSLexstxt, +\end_layout + +\begin_layout Plain Layout + +\change_inserted -712698321 1755088297 + refcmd =( +\backslash +ref{#1}) +\end_layout + +\begin_layout Plain Layout + +\change_inserted -712698321 1755088284 +} +\end_layout + +\begin_layout Plain Layout + +\change_inserted -712698321 1755088284 + +\backslash +def +\backslash +RSlextxt{example~} +\end_layout + +\begin_layout Plain Layout + +\change_inserted -712698321 1755088284 + +\backslash +def +\backslash +RSlexstxt{examples~} +\end_layout + +\begin_layout Plain Layout + +\change_inserted -712698321 1755088284 + +\backslash +def +\backslash +RSLextxt{Example~} +\end_layout + +\begin_layout Plain Layout + +\change_inserted -712698321 1755088284 + +\backslash +def +\backslash +RSLexstxt{Examples~} +\change_unchanged + +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard + +\change_inserted -712698321 1755088852 +As with +\emph on +prettyref +\emph default +, + the definition depends on which prefix you use in your labels. + The definition above assumes +\begin_inset Quotes eld +\end_inset + +lex: +\begin_inset Quotes erd +\end_inset + +, + which is the prefix automatically inserted by \SpecialChar LyX + for linguistic examples and subexamples. + Other than +\emph on +prettyref +\emph default +, + +\emph on +refstyle +\emph default + supports plural and uppercasing, + both can be selected for individual references in the cross-references dialog. +\end_layout + +\end_deeper +\begin_layout Enumerate + +\change_inserted -712698321 1755088875 +With +\begin_inset Quotes eld +\end_inset + +cleveref and varioref +\begin_inset Quotes erd +\end_inset + +, + add: +\end_layout + +\begin_deeper +\begin_layout Standard + +\change_inserted -712698321 1755088967 +\begin_inset listings +inline false +status open + +\begin_layout Plain Layout + +\change_inserted -712698321 1755088931 +% We must load cleveref manually, + as it needs +\end_layout + +\begin_layout Plain Layout + +\change_inserted -712698321 1755088940 +% to be loaded before covington! +\end_layout + +\begin_layout Plain Layout + +\change_inserted -712698321 1755091764 + +\backslash +usepackage{cleveref} +\end_layout + +\begin_layout Plain Layout + +\change_inserted -712698321 1755091764 + +\backslash +crefname{covex}{example}{examples} +\end_layout + +\begin_layout Plain Layout + +\change_inserted -712698321 1755091764 + +\backslash +Crefname{covex}{Example}{Examples} +\end_layout + +\begin_layout Plain Layout + +\change_inserted -712698321 1755091992 + +\backslash +creflabelformat{covex}{ +\backslash +textup{(#2#1#3)}} +\end_layout + +\begin_layout Plain Layout + +\change_inserted -712698321 1755091764 + +\backslash +AddToHook{env/covsubexamples/begin}{% +\end_layout + +\begin_layout Plain Layout + +\change_inserted -712698321 1755091764 + +\backslash +crefalias{enumi}{covex} +\end_layout + +\begin_layout Plain Layout + +\change_inserted -712698321 1755092013 +} +\end_layout + +\begin_layout Plain Layout + +\change_inserted -712698321 1755092025 +% The following is not needed with option +\begin_inset Quotes eld +\end_inset + +owncounter +\begin_inset Quotes erd +\end_inset + +: +\end_layout + +\begin_layout Plain Layout + +\change_inserted -712698321 1755092012 + +\backslash +AddToHook{env/covexamples/begin}{% +\end_layout + +\begin_layout Plain Layout + +\change_inserted -712698321 1755092012 + +\backslash +crefalias{equation}{covex} +\end_layout + +\begin_layout Plain Layout + +\change_inserted -712698321 1755092012 +} +\change_unchanged + +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard + +\change_inserted -712698321 1755089448 +Other than +\emph on +prettyref +\emph default + and +\emph on +refstyle +\emph default +, + +\emph on +cleveref +\emph default + does not use the prefix to determine the references type, + but the used \SpecialChar TeX + counter. + By default, + +\emph on +covington +\emph default + re-uses the +\family typewriter +equation +\family default + counter for examples, + for sub-examples, + it is the +\family typewriter +enumi +\family default + counter. +\end_layout + +\begin_layout Standard + +\change_inserted -712698321 1755092199 +If you want to have separate numbering for equations and examples, + you can use the +\emph on +covington +\emph default + package option +\emph on +owncounter +\emph default + (via +\family sans +Document\SpecialChar menuseparator +Settings\SpecialChar menuseparator +Document Class\SpecialChar menuseparator +Class Options\SpecialChar menuseparator +Custom +\family default +). + In this case, + you can omit the last part of the code (as indicated by the comment in the code). +\end_layout + +\begin_layout Standard + +\change_inserted -712698321 1755090511 +Also, + other than +\emph on +refstyle +\emph default + (but like +\emph on + zref-clever +\emph default +), + plural is not selected in the dialog, + the package automatically chooses it if a reference points to multiple examples. +\end_layout + +\end_deeper +\begin_layout Enumerate + +\change_inserted -712698321 1755089680 +Finally, + with +\begin_inset Quotes eld +\end_inset + +zref-clever and zref-vario +\begin_inset Quotes erd +\end_inset + +, + use this code: +\end_layout + +\begin_deeper +\begin_layout Standard + +\change_inserted -712698321 1755089964 +\begin_inset listings +inline false +status open + +\begin_layout Plain Layout + +\change_inserted -712698321 1755090117 + +\backslash +zcRefTypeSetup{covex}{ +\end_layout + +\begin_layout Plain Layout + +\change_inserted -712698321 1755090117 + Name-sg = Example , +\end_layout + +\begin_layout Plain Layout + +\change_inserted -712698321 1755090117 + name-sg = example , +\end_layout + +\begin_layout Plain Layout + +\change_inserted -712698321 1755090117 + Name-pl = Examples , +\end_layout + +\begin_layout Plain Layout + +\change_inserted -712698321 1755090117 + name-pl = examples , +\end_layout + +\begin_layout Plain Layout -\emph on -float.sty -\emph default - -\begin_inset CommandInset citation -LatexCommand cite -key "float" -literal "true" +\change_inserted -712698321 1755090117 + refbounds-first-sg = {,(,),} , +\end_layout -\end_inset +\begin_layout Plain Layout -: - Needed for the OT tableaux floats and list of floats. - This package should be part of any \SpecialChar LaTeX - distribution. +\change_inserted -712698321 1755090117 + refbounds = {(,,,)} , \end_layout -\begin_deeper -\begin_layout Itemize -Installed on your system: - -\begin_inset Info -type "package" -arg "float" -\end_inset +\begin_layout Plain Layout -. +\change_inserted -712698321 1755092072 +} \end_layout -\end_deeper -\begin_layout Enumerate +\begin_layout Plain Layout -\emph on -forest.sty -\emph default - -\begin_inset CommandInset citation -LatexCommand cite -key "forest" -literal "true" +\change_inserted -712698321 1755092072 -\end_inset +\backslash +AddToHook{env/covsubexs/begin}{% +\end_layout -: - This package is used to generate structure trees. +\begin_layout Plain Layout + +\change_inserted -712698321 1755092072 + +\backslash +zcsetup{countertype={enumi=covex}}% \end_layout -\begin_deeper -\begin_layout Itemize -Installed on your system: - -\begin_inset Info -type "package" -arg "forest" -\end_inset +\begin_layout Plain Layout -. +\change_inserted -712698321 1755092087 +} \end_layout -\end_deeper -\begin_layout Enumerate +\begin_layout Plain Layout -\emph on -pict2e.sty -\emph default - -\begin_inset CommandInset citation -LatexCommand cite -key "pict2e" -literal "true" +\change_inserted -712698321 1755092087 +% The following is not needed with option +\begin_inset Quotes eld +\end_inset +owncounter +\begin_inset Quotes erd \end_inset : - Needed for -\emph on -Duplex Condition DRS -\emph default -es. \end_layout -\begin_deeper -\begin_layout Itemize -Installed on your system: - -\begin_inset Info -type "package" -arg "pict2e" -\end_inset +\begin_layout Plain Layout -. +\change_inserted -712698321 1755092079 + +\backslash +AddToHook{env/covexamples/begin}{% \end_layout -\end_deeper -\begin_layout Enumerate +\begin_layout Plain Layout -\emph on -varwidth.sty -\emph default - -\begin_inset CommandInset citation -LatexCommand cite -key "varwidth" -literal "true" +\change_inserted -712698321 1755092079 + +\backslash +zcsetup{countertype={equation=covex}}% +\end_layout -\end_inset +\begin_layout Plain Layout + +\change_inserted -712698321 1755092079 +} +\change_unchanged -: - Needed by covington (as of version 2.11) for gloss comments. \end_layout -\begin_deeper -\begin_layout Itemize -Installed on your system: - -\begin_inset Info -type "package" -arg "varwidth" \end_inset -. -\end_layout -\end_deeper -\begin_layout Section -Numbered Examples \end_layout \begin_layout Standard -Numbered examples are inserted via the layout drop-down box in the toolbar. - There are three variants: -\end_layout -\begin_layout Numbered Example (multiline) -This is a multiline example [Style +\change_inserted -712698321 1755094694 +As with \emph on -Numbered Example (multiline) +cleveref \emph default -] -\end_layout - -\begin_layout Numbered Example (multiline) -it can have several paragraphs +, + the type is determined via counter. + So if you use +\emph on +owncounter +\emph default + to separate example and equation numbering, + you can omit the last part of the code. \end_layout -\begin_layout Numbered Examples (consecutive) -This is a single example -\begin_inset CommandInset label -LatexCommand label -name "exa:single-example" +\begin_layout Standard +\change_inserted -712698321 1755095637 +Note that +\emph on +zref-clever +\emph default + provides support for even more variants (e. +\begin_inset space \thinspace{} \end_inset - [Style +g., + different grammatical case such as genitive, + dative, + accusative, + if these differ formally from the nominative, + or optional abbreviated forms such as \emph on -Numbered Example (consecutive) +ex \emph default -] -\end_layout - -\begin_layout Numbered Examples (consecutive) -Consecutive single examples get their own numbers -\end_layout - -\begin_layout Subexample -This is a subexample -\begin_inset CommandInset label -LatexCommand label -name "subsec:subexample" +.) which can also be used with \SpecialChar LyX + via the custom options of the cross-reference dialog. + Please refer to the +\emph on +zref-clever +\emph default + manual +\begin_inset CommandInset citation +LatexCommand cite +key "zref-clever" +literal "false" \end_inset - [Style -\emph on -Subexample -\emph default -] -\end_layout + for details on how to include these in the above definitions. +\change_unchanged -\begin_layout Subexample -And another one \end_layout \begin_layout Standard -References to examples are produced as usual: - insert a label to the example and a cross-reference via -\family sans -Insert\SpecialChar menuseparator -Cross references -\family default -. - We refer here, - just for the sake of demonstrating this, - to -\begin_inset CommandInset ref -LatexCommand ref -reference "exa:single-example" -nolink "false" - -\end_inset - - and -\begin_inset CommandInset ref -LatexCommand ref -reference "subsec:subexample" -nolink "false" -\end_inset +\change_inserted -712698321 1755094703 +Note, + finally, + that the +\family typewriter +\backslash +AddToHook +\family default + command used in some of the definitions is only available in fairly recent versions of \SpecialChar LaTeX . +\change_unchanged + \end_layout +\end_deeper \begin_layout Standard All example variants can be customized in many details via optional arguments. These can be inserted via @@ -881,7 +1742,6 @@ GroupGlossedWords status open \begin_layout Plain Layout - { \end_layout @@ -892,7 +1752,6 @@ around those words status open \begin_layout Plain Layout - } \end_layout @@ -962,7 +1821,6 @@ status open status open \begin_layout Plain Layout - fsii={ \backslash normalfont @@ -1299,17 +2157,14 @@ inline false status open \begin_layout Plain Layout - Provides covington 1 \end_layout \begin_layout Plain Layout - AddToPreamble \end_layout \begin_layout Plain Layout - \backslash let @@ -1320,7 +2175,6 @@ relax \end_layout \begin_layout Plain Layout - \backslash let @@ -1331,7 +2185,6 @@ relax \end_layout \begin_layout Plain Layout - \backslash let @@ -1342,7 +2195,6 @@ relax \end_layout \begin_layout Plain Layout - \backslash let @@ -1353,14 +2205,12 @@ relax \end_layout \begin_layout Plain Layout - \backslash usepackage{covington} \end_layout \begin_layout Plain Layout - EndPreamble \end_layout @@ -1786,14 +2636,12 @@ status open \begin_layout Plain Layout - \backslash floatstyle{plaintop} \end_layout \begin_layout Plain Layout - \backslash restylefloat{tableau} \end_layout @@ -1816,14 +2664,12 @@ status open \begin_layout Plain Layout - \backslash floatstyle{komaabove} \end_layout \begin_layout Plain Layout - \backslash restylefloat{tableau} \end_layout @@ -1926,7 +2772,6 @@ status open \begin_layout Plain Layout - \backslash renewcommand \backslash @@ -2862,14 +3707,12 @@ status open \begin_layout Plain Layout - \backslash AtBeginDocument{% \end_layout \begin_layout Plain Layout - \backslash newfontfamily{ \backslash @@ -2878,7 +3721,6 @@ ipafont}{CMU Serif}% or another font \begin_layout Plain Layout - \backslash def \backslash @@ -2888,7 +3730,6 @@ ipafont} \end_layout \begin_layout Plain Layout - } \end_layout @@ -3163,7 +4004,6 @@ The covington package: status collapsed \begin_layout Plain Layout - https://www.ctan.org/pkg/covington \end_layout @@ -3186,7 +4026,6 @@ The csquotes package: status collapsed \begin_layout Plain Layout - https://www.ctan.org/tex-archive/macros/latex/contrib/csquotes \end_layout @@ -3213,7 +4052,6 @@ package: status collapsed \begin_layout Plain Layout - https://www.ctan.org/tex-archive/macros/latex/contrib/drs \end_layout @@ -3236,7 +4074,6 @@ The enumitem package: status collapsed \begin_layout Plain Layout - https://www.ctan.org/tex-archive/macros/latex/contrib/enumitem \end_layout @@ -3259,7 +4096,6 @@ The float package: status collapsed \begin_layout Plain Layout - https://www.ctan.org/tex-archive/macros/latex/contrib/float \end_layout @@ -3282,7 +4118,6 @@ The forest package: status collapsed \begin_layout Plain Layout - https://www.ctan.org/tex-archive/graphics/pgf/contrib/forest \end_layout @@ -3308,7 +4143,6 @@ Maria Gouskova, status collapsed \begin_layout Plain Layout - https://wiki.lyx.org/LyX/LinguistLyX \end_layout @@ -3331,7 +4165,6 @@ The pict2e package: status collapsed \begin_layout Plain Layout - https://www.ctan.org/tex-archive/macros/latex/contrib/pict2e \end_layout @@ -3354,7 +4187,6 @@ The preview-latex package: status collapsed \begin_layout Plain Layout - https://www.ctan.org/tex-archive/macros/latex/contrib/preview \end_layout @@ -3377,7 +4209,6 @@ The tipa package and fonts: status collapsed \begin_layout Plain Layout - https://www.ctan.org/tex-archive/fonts/tipa \end_layout @@ -3400,13 +4231,42 @@ The varwidth package: status collapsed \begin_layout Plain Layout - https://www.ctan.org/tex-archive/macros/latex/contrib/varwidth \end_layout \end_inset . +\change_inserted -712698321 1755095540 + +\end_layout + +\begin_layout Bibliography + +\change_inserted -712698321 1755095553 +\begin_inset CommandInset bibitem +LatexCommand bibitem +key "zref-clever" +literal "false" + +\end_inset + +The zref-clever package: + +\begin_inset Flex URL +status collapsed + +\begin_layout Plain Layout + +\change_inserted -712698321 1755095540 +https://www.ctan.org/tex-archive/macros/latex/contrib/zref-clever +\end_layout + +\end_inset + +. +\change_unchanged + \end_layout \end_body diff --git a/lib/examples/de/Modules/Linguistics.lyx b/lib/examples/de/Modules/Linguistics.lyx index bc86838bb5..08c5241ef1 100644 --- a/lib/examples/de/Modules/Linguistics.lyx +++ b/lib/examples/de/Modules/Linguistics.lyx @@ -1,5 +1,5 @@ -#LyX 2.4 created this file. For more info see https://www.lyx.org/ -\lyxformat 620 +#LyX 2.5 created this file. For more info see https://www.lyx.org/ +\lyxformat 643 \begin_document \begin_header \save_transient_properties true @@ -34,6 +34,9 @@ % Trennausnahmen \hyphenation{Dis-kurs-reprä-sen-ta-tions-struk-tur} + +% Formatierte Querverweise auf (Unter-)Beispiele mittels prettyref +\newrefformat{lex}{Beispiel~(\ref{#1})} \end_preamble \use_default_options false \begin_modules @@ -96,10 +99,19 @@ linguistics \use_indices false \paperorientation portrait \suppress_date false -\justification true -\use_refstyle 0 +\justification default +\crossref_package prettyref +\use_formatted_ref 0 \use_minted 0 \use_lineno 0 +\backgroundcolor none +\fontcolor none +\notefontcolor lightgray +\boxbgcolor red +\table_border_color default +\table_odd_row_color default +\table_even_row_color default +\table_alt_row_colors_start 1 \index Stichwortverzeichnis \shortcut idx \color #008000 @@ -125,6 +137,7 @@ linguistics \html_be_strict false \docbook_table_output 0 \docbook_mathml_prefix 1 +\docbook_mathml_version 0 \end_header \begin_body @@ -152,7 +165,8 @@ literal "false" \end_layout \begin_layout Date -21.04.2015 +\SpecialChar LyX +-Version 2.5 \end_layout \begin_layout Abstract @@ -489,7 +503,7 @@ Wie der Name sagt, Das ist ein einzeiliges Beispiel \begin_inset CommandInset label LatexCommand label -name "exa:Beispiel-einzeilig" +name "lex:Beispiel-einzeilig" \end_inset @@ -508,7 +522,7 @@ Jeder Absatz wird in diesem Stil neu nummeriert Dies ist ein Unterbeispiel \begin_inset CommandInset label LatexCommand label -name "subsec:Unterbeispiel" +name "lex:Unterbeispiel" \end_inset @@ -538,25 +552,723 @@ Querverweis\SpecialChar ldots \end_layout \begin_layout Standard -Als kleine Demonstration verweisen wir hier auf die Beispiele +Einfache Verweise, + die nur die Beispielnummer ausgeben, + sehen so aus: + \begin_inset CommandInset ref LatexCommand ref -reference "exa:Beispiel-einzeilig" +reference "lex:Beispiel-einzeilig" +plural "false" +caps "false" +noprefix "false" nolink "false" +tuple "list" \end_inset und \begin_inset CommandInset ref LatexCommand ref -reference "subsec:Unterbeispiel" +reference "lex:Unterbeispiel" +plural "false" +caps "false" +noprefix "false" +nolink "false" +tuple "list" + +\end_inset + +. + Wenn Sie die Nummern in Klammern ausgeben wollen, + wie dies üblich ist, + verwenden Sie statt dessen die Klammervariante: + +\begin_inset CommandInset ref +LatexCommand eqref +reference "lex:Beispiel-einzeilig" +plural "false" +caps "false" +noprefix "false" +nolink "false" +tuple "list" + +\end_inset + + und +\begin_inset CommandInset ref +LatexCommand eqref +reference "lex:Unterbeispiel" +plural "false" +caps "false" +noprefix "false" +nolink "false" +tuple "list" + +\end_inset + +. +\end_layout + +\begin_layout Standard +Es geht aber auch bequemer: + Sie können +\begin_inset Quotes gld +\end_inset + +formatierte Querverweise +\begin_inset Quotes grd +\end_inset + + verwenden, + die automatisch das Wort +\emph on +Beispiel +\emph default + voranstellen und die Nummer einklammern, + etwa so: + +\begin_inset CommandInset ref +LatexCommand formatted +reference "lex:Beispiel-einzeilig" +plural "false" +caps "false" +noprefix "false" +nolink "false" +tuple "list" + +\end_inset + + und +\begin_inset CommandInset ref +LatexCommand formatted +reference "lex:Unterbeispiel" +plural "false" +caps "false" +noprefix "false" nolink "false" +tuple "list" \end_inset . + Da jedoch die \SpecialChar LaTeX +-Pakete, + die \SpecialChar LyX + zur Produktion solcher Querverweise einbindet, + das Paket +\emph on +covington +\emph default + nicht kennen, + müssen Sie \SpecialChar LaTeX +-Code in den Vorspann eingeben, + damit dies funktioniert. + Welcher Code das ist, + hängt von Ihrer Auswahl in +\family sans +Dokument\SpecialChar menuseparator +Einstellungen\SpecialChar menuseparator +Dokumentklasse\SpecialChar menuseparator +Formatpakete +\family default + ab. +\end_layout + +\begin_layout Standard +Im Folgenden beschreiben wir, + was Sie für englischsprachige Dokumente tun müssen (englischsprachig deshalb, + weil wir dort anders als im Deutschen die Differenzierung zwischen Groß- und Kleinschreibung brauchen). + Falls Sie in einer anderen Sprache schreiben (oder eine andere Terminologie bevorzugen), + passen Sie die Zeichenketten +\emph on +example +\emph default + in den verschiedenen Varianten ( +\emph on +\lang english +examples +\emph default +\lang ngerman +, + +\emph on +\lang english +Example +\emph default +\lang ngerman +, + +\emph on +\lang english +Examples +\emph default +\lang ngerman +) an. + Für Deutsch, + wo Nomina stets großgeschrieben werden, + verwenden Sie natürlich für alle Varianten Großschreibung (die Differenzierung der Varianten ist dennoch auch hier aus systematischen Gründen sinnvoll): +\end_layout + +\begin_layout Enumerate +Mit +\begin_inset Quotes gld +\end_inset + +Prettyref und Varioref +\begin_inset Quotes grd +\end_inset + + (was wir auch in diesem Dokument verwenden), + fügen Sie ein: +\end_layout + +\begin_deeper +\begin_layout Standard +\begin_inset listings +inline false +status open + +\begin_layout Plain Layout + +\backslash +newrefformat{lex}{example~( +\backslash +ref{#1})} +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +Beachten Sie, + dass das Paket +\emph on +prettyref +\emph default + sehr basal ist und keine optionalen Plural- ( +\emph on +\lang english +examples +\emph default +\lang ngerman +) oder Groß-/Kleinschreibungsvarianten ( +\emph on +\lang english +Example +\emph default +, + +\emph on +Examples +\emph default +\lang ngerman +) anbietet (welche Sie ansonsten im Querverweis-Dialog auswählen könnten). + Beachten Sie auch, + dass die Definition von dem Präfix, + das Sie in den Marken verwenden, + abhängt. + Die Definition oben setzt voraus, + dass dies +\begin_inset Quotes gld +\end_inset + +lex: +\begin_inset Quotes grd +\end_inset + + ist, + denn dies ist auch das Präfix, + das \SpecialChar LyX + für linguistische Beispiele und Unterbeispiele automatisch einfügt. +\end_layout + +\end_deeper +\begin_layout Enumerate +Mit +\begin_inset Quotes gld +\end_inset + +Refstyle und Varioref +\begin_inset Quotes grd +\end_inset + + (der Voreinstellung für neue Dokumente), + fügen Sie statt dessen ein: +\end_layout + +\begin_deeper +\begin_layout Standard +\begin_inset listings +inline false +status open + +\begin_layout Plain Layout + +\backslash +newref{lex}{ +\end_layout + +\begin_layout Plain Layout + name = +\backslash +RSlextxt, +\end_layout + +\begin_layout Plain Layout + names = +\backslash +RSlexstxt, +\end_layout + +\begin_layout Plain Layout + Name = +\backslash +RSLextxt, +\end_layout + +\begin_layout Plain Layout + Names = +\backslash +RSLexstxt, +\end_layout + +\begin_layout Plain Layout + refcmd =( +\backslash +ref{#1}) +\end_layout + +\begin_layout Plain Layout +} +\end_layout + +\begin_layout Plain Layout + +\backslash +def +\backslash +RSlextxt{example~} +\end_layout + +\begin_layout Plain Layout + +\backslash +def +\backslash +RSlexstxt{examples~} +\end_layout + +\begin_layout Plain Layout + +\backslash +def +\backslash +RSLextxt{Example~} +\end_layout + +\begin_layout Plain Layout + +\backslash +def +\backslash +RSLexstxt{Examples~} +\end_layout + +\end_inset + + \end_layout +\begin_layout Standard +Wie bei +\emph on +prettyref +\emph default + hängt die Definition von dem Präfix, + das Sie in den Marken verwenden, + ab. + Die Definition oben setzt voraus, + dass dies +\begin_inset Quotes gld +\end_inset + +lex: +\begin_inset Quotes grd +\end_inset + + ist, + denn dies ist auch das Präfix, + das \SpecialChar LyX + für linguistische Beispiele und Unterbeispiele automatisch einfügt. + Anders als +\emph on +prettyref +\emph default + erlaubt +\emph on +refstyle +\emph default + Plural und Großschreibung (bspw. + am Satzanfang im Englischen). + Beides kann für individuelle Verweise im Querverwies-Dialog ausgewählt werden. +\end_layout + +\end_deeper +\begin_layout Enumerate +Mit +\begin_inset Quotes gld +\end_inset + +Cleveref und Varioref +\begin_inset Quotes grd +\end_inset + +, + fügen Sie ein: +\end_layout + +\begin_deeper +\begin_layout Standard +\begin_inset listings +inline false +status open + +\begin_layout Plain Layout +% Wir müssen +\lang ngerman + cleveref manuell laden +\lang ngerman +, + da es +\end_layout + +\begin_layout Plain Layout +% vor +\lang ngerman + covington geladen werden muss +\lang ngerman +! +\end_layout + +\begin_layout Plain Layout + +\backslash +usepackage{cleveref} +\end_layout + +\begin_layout Plain Layout + +\backslash +crefname{covex}{example}{examples} +\end_layout + +\begin_layout Plain Layout + +\backslash +Crefname{covex}{Example}{Examples} +\end_layout + +\begin_layout Plain Layout + +\backslash +creflabelformat{covex}{ +\backslash +textup{(#2#1#3)}} +\end_layout + +\begin_layout Plain Layout + +\backslash +AddToHook{env/covsubexamples/begin}{% +\end_layout + +\begin_layout Plain Layout + +\backslash +crefalias{enumi}{covex} +\end_layout + +\begin_layout Plain Layout +} +\end_layout + +\begin_layout Plain Layout +% Das Folgende ist mit der O +\lang ngerman +ption +\begin_inset Quotes eld +\end_inset + +owncounter +\begin_inset Quotes erd +\end_inset + + nicht nötig +\lang ngerman +: +\end_layout + +\begin_layout Plain Layout + +\backslash +AddToHook{env/covexamples/begin}{% +\end_layout + +\begin_layout Plain Layout + +\backslash +crefalias{equation}{covex} +\end_layout + +\begin_layout Plain Layout +} +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +Anders als +\emph on +prettyref +\emph default + und +\emph on +refstyle +\emph default + verwendet +\emph on +cleveref +\emph default + nicht das Präfi, + um den Verweistyp zu bestimmen, + sondern den verwendeten \SpecialChar TeX +-Zähler. + Standardmäßig verwendet +\emph on +covington +\emph default + den bereits vorhandenen Zähler +\family typewriter +equation +\family default + für Beispiele, + für Unterbeispiele den Zählen +\family typewriter +enumi +\family default +. +\end_layout + +\begin_layout Standard +Das hat den Effekt, + dass mathematische Gleichungen und linguistische Beispiele denselben Zähler verwenden, + also nicht getrennt nummeriert werden. + Wenn Sie dies nicht wollen, + können Sie die Paketoption +\emph on +owncounter +\emph default + (über +\family sans +Dokument\SpecialChar menuseparator +Einstellungen\SpecialChar menuseparator +Dokumentklasse\SpecialChar menuseparator +Klassoptionen\SpecialChar menuseparator +Benutzerdefinitert +\family default +) verwenden. + In diesem Fall können Sie den letzten Teil des Codes (wie im Kommentar vermerkt) weglassen. +\end_layout + +\begin_layout Standard +Anders als bei +\emph on +refstyle +\emph default + (aber wie bei +\emph on + zref-clever +\emph default +) werden Pluralformen nicht im Dialog ausgewählt. + Das Paket wählt sie automatisch, + wenn ein Querverweis auf mehrere Beispiele verweist. +\end_layout + +\end_deeper +\begin_layout Enumerate +Mit +\begin_inset Quotes gld +\end_inset + +Zref-Clever und Zref-Vario +\begin_inset Quotes grd +\end_inset + + schließlich geben Sie dies ein: +\end_layout + +\begin_deeper +\begin_layout Standard +\begin_inset listings +inline false +status open + +\begin_layout Plain Layout + +\backslash +zcRefTypeSetup{covex}{ +\end_layout + +\begin_layout Plain Layout + Name-sg = Example , +\end_layout + +\begin_layout Plain Layout + name-sg = example , +\end_layout + +\begin_layout Plain Layout + Name-pl = Examples , +\end_layout + +\begin_layout Plain Layout + name-pl = examples , +\end_layout + +\begin_layout Plain Layout + refbounds-first-sg = {,(,),} , +\end_layout + +\begin_layout Plain Layout + refbounds = {(,,,)} , +\end_layout + +\begin_layout Plain Layout +} +\end_layout + +\begin_layout Plain Layout + +\backslash +AddToHook{env/covsubexs/begin}{% +\end_layout + +\begin_layout Plain Layout + +\backslash +zcsetup{countertype={enumi=covex}}% +\end_layout + +\begin_layout Plain Layout +} +\end_layout + +\begin_layout Plain Layout +% Das Folgende ist mit der Option +\begin_inset Quotes eld +\end_inset + +owncounter +\begin_inset Quotes erd +\end_inset + + nicht nötig: +\end_layout + +\begin_layout Plain Layout + +\backslash +AddToHook{env/covexamples/begin}{% +\end_layout + +\begin_layout Plain Layout + +\backslash +zcsetup{countertype={equation=covex}}% +\end_layout + +\begin_layout Plain Layout +} +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +Wie bei +\emph on +cleveref +\emph default + wird der Verweistyp über den Zähler bestimmt. + Wenn Sie also +\emph on +owncounter +\emph default + verwenden, + um Beispiele und Gleichungen separat zu nummerieren, + können Sie auch hier wieder den letzten Teil des Codes weglassen. +\end_layout + +\begin_layout Standard +Beachten Sie, + dass +\emph on +zref-clever +\emph default + sogar noch mehr Varianten unterstützt (bspw. + unterschiedliche Kasus, + also Genitiv, + Dativ, + Akkusativ, + wenn sie sich – wie im Deutschen hier die Genitivform [ +\emph on +des Beispiels +\emph default +] formal vom Nominativ unterscheiden – oder optionale abgekürzte Formen wie +\emph on +Bsp +\emph default +.), + die man auch in \SpecialChar LyX + verwenden kann (über die benutzerdefinierten Optionen im Querverweis-Dialog). + Bitte konsuliteren Sie die Dokumentantion des Pakets +\emph on +zref-clever +\emph default + +\begin_inset CommandInset citation +LatexCommand cite +key "zref-clever" +literal "false" + +\end_inset + + für Informationen, + wie man diese in die obige Definition einbinden kann. +\end_layout + +\begin_layout Standard +Beachten Sie schließlich, + dass der Befehl +\family typewriter + +\backslash +AddToHook +\family default +,der in einigen Definitionen erwendet wird, + nur bei einigermaßen neuen Versionen von \SpecialChar LaTeX + zur Verfügung steht. +\end_layout + +\end_deeper \begin_layout Standard Alle Beispielvarianten können mittels optionaler Argument in vielen Details angepasst werden. Diese können Sie über @@ -583,7 +1295,9 @@ literal "false" \end_layout \begin_layout Standard -Für globale Anpassungen können Sie die Optionen an das Makro +Für Anpassungen, + die für das gesamte Dokument wirksam sein sollen, + können Sie die Optionen an das Makro \family typewriter \backslash @@ -892,7 +1606,6 @@ Glossierte Wortgruppen status open \begin_layout Plain Layout - { \end_layout @@ -903,7 +1616,6 @@ diese Wörter geschweift einklammern status open \begin_layout Plain Layout - } \end_layout @@ -975,7 +1687,6 @@ status open status open \begin_layout Plain Layout - fsii={ \backslash normalfont @@ -1296,17 +2007,14 @@ inline false status open \begin_layout Plain Layout - Provides covington 1 \end_layout \begin_layout Plain Layout - AddToPreamble \end_layout \begin_layout Plain Layout - \backslash let @@ -1317,7 +2025,6 @@ relax \end_layout \begin_layout Plain Layout - \backslash let @@ -1328,7 +2035,6 @@ relax \end_layout \begin_layout Plain Layout - \backslash let @@ -1339,7 +2045,6 @@ relax \end_layout \begin_layout Plain Layout - \backslash let @@ -1350,14 +2055,12 @@ relax \end_layout \begin_layout Plain Layout - \backslash usepackage{covington} \end_layout \begin_layout Plain Layout - EndPreamble \end_layout @@ -1766,14 +2469,12 @@ status open \begin_layout Plain Layout - \backslash floatstyle{plaintop} \end_layout \begin_layout Plain Layout - \backslash restylefloat{tableau} \end_layout @@ -1796,14 +2497,12 @@ status open \begin_layout Plain Layout - \backslash floatstyle{komaabove} \end_layout \begin_layout Plain Layout - \backslash restylefloat{tableau} \end_layout @@ -1915,7 +2614,6 @@ status open \begin_layout Plain Layout - \backslash renewcommand \backslash @@ -2045,7 +2743,6 @@ als Strukturbaum ausgegeben wird. status collapsed \begin_layout Plain Layout - "= \end_layout @@ -2925,14 +3622,12 @@ status open \begin_layout Plain Layout - \backslash AtBeginDocument{% \end_layout \begin_layout Plain Layout - \backslash newfontfamily{ \backslash @@ -2941,7 +3636,6 @@ ipafont}{CMU Serif}% oder eine ander Schriftart \begin_layout Plain Layout - \backslash def \backslash @@ -2951,7 +3645,6 @@ ipafont} \end_layout \begin_layout Plain Layout - } \end_layout @@ -3189,7 +3882,6 @@ Das covington-Paket: status collapsed \begin_layout Plain Layout - https://www.ctan.org/pkg/covington \end_layout @@ -3212,7 +3904,6 @@ Das csquotes-Paket: status collapsed \begin_layout Plain Layout - https://www.ctan.org/tex-archive/macros/latex/contrib/csquotes \end_layout @@ -3235,7 +3926,6 @@ literal "false" status collapsed \begin_layout Plain Layout - https://www.ctan.org/tex-archive/macros/latex/contrib/drs \end_layout @@ -3258,7 +3948,6 @@ Das enumitem-Paket: status collapsed \begin_layout Plain Layout - https://www.ctan.org/tex-archive/macros/latex/contrib/enumitem \end_layout @@ -3281,7 +3970,6 @@ Das float-Paket: status collapsed \begin_layout Plain Layout - https://www.ctan.org/tex-archive/macros/latex/contrib/float \end_layout @@ -3304,7 +3992,6 @@ Das forest-Paket: status collapsed \begin_layout Plain Layout - https://www.ctan.org/tex-archive/graphics/pgf/contrib/forest \end_layout @@ -3330,7 +4017,6 @@ Maria Gouskova, status collapsed \begin_layout Plain Layout - https://wiki.lyx.org/LyX/LinguistLyX \end_layout @@ -3353,7 +4039,6 @@ Das pict2e-Paket: status collapsed \begin_layout Plain Layout - https://www.ctan.org/tex-archive/macros/latex/contrib/pict2e \end_layout @@ -3376,7 +4061,6 @@ Das preview-latex-Paket: status collapsed \begin_layout Plain Layout - https://www.ctan.org/tex-archive/macros/latex/contrib/preview \end_layout @@ -3399,7 +4083,6 @@ Das tipa-Paket und die zugehörigen Schriften: status collapsed \begin_layout Plain Layout - https://www.ctan.org/tex-archive/fonts/tipa \end_layout @@ -3422,7 +4105,6 @@ Das varwidth-Paket: status collapsed \begin_layout Plain Layout - https://www.ctan.org/tex-archive/macros/latex/contrib/varwidth \end_layout @@ -3431,5 +4113,27 @@ https://www.ctan.org/tex-archive/macros/latex/contrib/varwidth . \end_layout +\begin_layout Bibliography +\begin_inset CommandInset bibitem +LatexCommand bibitem +key "zref-clever" +literal "false" + +\end_inset + +Das Paket zref-clever: + +\begin_inset Flex URL +status collapsed + +\begin_layout Plain Layout +https://www.ctan.org/tex-archive/macros/latex/contrib/zref-clever +\end_layout + +\end_inset + +. +\end_layout + \end_body \end_document -- lyx-cvs mailing list lyx-cvs@lists.lyx.org https://lists.lyx.org/mailman/listinfo/lyx-cvs