commit f6167f442952f7fa8616d2b26733bc6540c55af2
Author: Juergen Spitzmueller <[email protected]>
Date:   Fri Aug 22 09:26:39 2025 +0200

    Document use of owncounter option in linguistics manual
---
 lib/examples/Modules/Linguistics.lyx    | 303 ++++++++++++++++++++++++++++----
 lib/examples/de/Modules/Linguistics.lyx | 270 ++++++++++++++++++++++++----
 2 files changed, 509 insertions(+), 64 deletions(-)

diff --git a/lib/examples/Modules/Linguistics.lyx 
b/lib/examples/Modules/Linguistics.lyx
index 295c3cc94d..deeeeec195 100644
--- a/lib/examples/Modules/Linguistics.lyx
+++ b/lib/examples/Modules/Linguistics.lyx
@@ -39,6 +39,15 @@
 linguistics
 \end_modules
 \maintain_unincluded_children no
+\begin_local_layout
+Counter examplei
+       PrettyFormat         "Example|Examples ##"
+End
+
+Counter subexamplei
+       PrettyFormat         "Example|Examples ##"
+End
+\end_local_layout
 \language english
 \language_package default
 \inputencoding utf8
@@ -559,6 +568,157 @@ Subexample
 And another one
 \end_layout
 
+\begin_layout Subsection
+
+\change_inserted -712698321 1755846246
+\begin_inset CommandInset label
+LatexCommand label
+name "subsec:numbering"
+
+\end_inset
+
+Numbering Examples and Equations
+\end_layout
+
+\begin_layout Standard
+
+\change_inserted -712698321 1755845776
+By default,
+ 
+\emph on
+covington
+\emph default
+ re-uses the 
+\family typewriter
+equation
+\family default
+ counter for examples,
+ that is,
+ mathematical equations and linguistic examples are numbered subsequently 
(which is also reflected in the \SpecialChar LyX
+ workarea).
+\end_layout
+
+\begin_layout Standard
+
+\change_inserted -712698321 1755845729
+If you use both equations and examples and want to have separate numbering for 
each of them,
+ 
+\emph on
+covington
+\emph default
+ provides the option 
+\emph on
+owncounter
+\emph default
+ which causes examples to use their own counter,
+ 
+\family typewriter
+covex
+\family default
+.
+ In order to activate this,
+ add to 
+\family sans
+Document\SpecialChar menuseparator
+Settings\SpecialChar menuseparator
+Local Layout
+\family default
+:
+\end_layout
+
+\begin_layout Quote
+
+\change_inserted -712698321 1755845744
+\begin_inset listings
+lstparams "basicstyle={\footnotesize\ttfamily}"
+inline false
+status open
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1755845882
+PackageOptions covington owncounter
+\end_layout
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1755845882
+
+\end_layout
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1755845883
+Counter examplei
+\end_layout
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1755845917
+       LabelString          "(
+\backslash
+arabic{examplei})"
+\end_layout
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1755845889
+       StepOtherCounter      none
+\end_layout
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1755845883
+End
+\end_layout
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1755845883
+
+\end_layout
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1755845883
+Counter subexamplei
+\end_layout
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1755846646
+       LabelString  "(
+\backslash
+arabic{examplei}) (
+\backslash
+alph{subexamplei})"
+\end_layout
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1755845883
+End
+\change_unchanged
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\change_inserted -712698321 1755846008
+This separates the numbering of examples and equations both in the output and 
the workarea.
+\end_layout
+
+\begin_layout Subsection
+
+\change_inserted -712698321 1755845360
+Referring to Numbered Examples
+\end_layout
+
 \begin_layout Standard
 References to examples are produced as usual:
  insert a label to the example and a cross-reference via 
@@ -1067,7 +1227,7 @@ crefalias{equation}{covex}
 
 \begin_layout Standard
 
-\change_inserted -712698321 1755155300
+\change_inserted -712698321 1755846288
 Other than 
 \emph on
 prettyref
@@ -1084,7 +1244,14 @@ cleveref
  does not use the prefix to determine the references type,
  but the used \SpecialChar TeX
  counter.
- By default,
+ As elaborated above (
+\begin_inset CommandInset ref
+LatexCommand formatted
+reference "subsec:numbering"
+
+\end_inset
+
+),
  
 \emph on
 covington
@@ -1093,7 +1260,7 @@ covington
 \family typewriter
 equation
 \family default
- counter for examples,
+ counter for examples by default;
  for sub-examples,
  it is the 
 \family typewriter
@@ -1108,26 +1275,15 @@ first-level enumeration) counter.
 
 \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,
+\change_inserted -712698321 1755846317
+If you separate numbering for equations and examples as documented in 
+\begin_inset CommandInset ref
+LatexCommand formatted
+reference "subsec:numbering"
+
+\end_inset
+
+,
  you can omit the last part of the code (as indicated by the comment in the 
code).
 \end_layout
 
@@ -1303,11 +1459,7 @@ cleveref
 \emph default
 ,
  the type is determined via counter.
- So if you use 
-\emph on
-owncounter
-\emph default
- to separate example and equation numbering,
+ So if you separate example and equation numbering,
  you can omit the last part of the code.
 \end_layout
 
@@ -1352,7 +1504,7 @@ literal "false"
 
 \begin_layout Standard
 
-\change_inserted -712698321 1755094703
+\change_inserted -712698321 1755844757
 Note,
  finally,
  that the 
@@ -1363,11 +1515,102 @@ AddToHook
 \family default
  command used in some of the definitions is only available in fairly recent 
versions of \SpecialChar LaTeX
 .
+\end_layout
+
+\end_deeper
+\begin_layout Standard
+
+\change_inserted -712698321 1755844908
+If you want the formatted references also to appear that way in the workarea 
or cross-references dialog,
+ add this to 
+\family sans
+Document\SpecialChar menuseparator
+Settings\SpecialChar menuseparator
+Local Layout
+\family default
+ (as we have done for the current document):
+\end_layout
+
+\begin_layout Quote
+
+\change_inserted -712698321 1755844867
+\begin_inset listings
+inline false
+status open
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1755844872
+Counter examplei
+\end_layout
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1755844881
+    PrettyFormat 
+\begin_inset Quotes eld
+\end_inset
+
+Example|Examples ##
+\begin_inset Quotes erd
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1755844872
+End
+\end_layout
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1755844872
+
+\end_layout
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1755844872
+Counter subexamplei
+\end_layout
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1755844884
+    PrettyFormat 
+\begin_inset Quotes eld
+\end_inset
+
+Example|Examples ##
+\begin_inset Quotes erd
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1755844872
+End
 \change_unchanged
 
 \end_layout
 
-\end_deeper
+\end_inset
+
+
+\change_unchanged
+
+\end_layout
+
+\begin_layout Subsection
+
+\change_inserted -712698321 1755845220
+Adaptations
+\end_layout
+
 \begin_layout Standard
 All example variants can be customized in many details via optional arguments.
  These can be inserted via 
diff --git a/lib/examples/de/Modules/Linguistics.lyx 
b/lib/examples/de/Modules/Linguistics.lyx
index f99e92f734..7232758e2d 100644
--- a/lib/examples/de/Modules/Linguistics.lyx
+++ b/lib/examples/de/Modules/Linguistics.lyx
@@ -43,6 +43,15 @@
 linguistics
 \end_modules
 \maintain_unincluded_children no
+\begin_local_layout
+Counter examplei
+       PrettyFormat         "Example|Examples ##"
+End
+
+Counter subexamplei
+       PrettyFormat         "Example|Examples ##"
+End
+\end_local_layout
 \language ngerman
 \language_package default
 \inputencoding utf8
@@ -538,6 +547,130 @@ Unterbeispiel
 Und hier noch eines
 \end_layout
 
+\begin_layout Subsection
+\begin_inset CommandInset label
+LatexCommand label
+name "subsec:Nummerierung"
+
+\end_inset
+
+Nummerierung von Beispielen und Gleichungen
+\end_layout
+
+\begin_layout Standard
+Standardmäßig verwendet 
+\emph on
+covington
+\emph default
+ den bereits vorhandenen Zähler 
+\family typewriter
+equation
+\family default
+ (=
+\begin_inset space ~
+\end_inset
+
+Gleichung) für Beispiele.
+ Das hat den Effekt,
+ dass mathematische Gleichungen und linguistische Beispiele nicht getrennt,
+ sondern in einer Reihe nummeriert werden (was auch im \SpecialChar LyX
+-Arbeitsbereich so angezeigt wird).
+ 
+\end_layout
+
+\begin_layout Standard
+Für den Fall,
+ dass Sie sowohl nummerierte Gleichungen als auch Beispiele verwenden und für 
diese jeweils eine eigene Nummerierung wollen,
+ bietet 
+\emph on
+covington
+\emph default
+ die Option 
+\emph on
+owncounter
+\emph default
+,
+ welche bewirkt,
+ dass Beispiele einen eigenen Zähler (
+\family typewriter
+covex
+\family default
+) verwenden.
+ Um dies zu nutzen,
+ fügen Sie das Folgende in 
+\family sans
+Dokument\SpecialChar menuseparator
+Einstellungen\SpecialChar menuseparator
+Lokales Format
+\family default
+ ein:
+\end_layout
+
+\begin_layout Quote
+\begin_inset listings
+lstparams "basicstyle={\footnotesize\ttfamily}"
+inline false
+status open
+
+\begin_layout Plain Layout
+PackageOptions covington owncounter
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+Counter examplei
+\end_layout
+
+\begin_layout Plain Layout
+       LabelString          "(
+\backslash
+arabic{examplei})"
+\end_layout
+
+\begin_layout Plain Layout
+       StepOtherCounter      none
+\end_layout
+
+\begin_layout Plain Layout
+End
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+Counter subexamplei
+\end_layout
+
+\begin_layout Plain Layout
+       LabelString  "(
+\backslash
+arabic{examplei}) (
+\backslash
+alph{subexamplei})"
+\end_layout
+
+\begin_layout Plain Layout
+End
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Dies trennt die Nummerierung von Gleichungen und Beispielen sowohl in der 
Ausgabe als auch im Arbeitsbereich.
+\end_layout
+
+\begin_layout Subsection
+Querverweise auf nummerierte Beispiele
+\end_layout
+
 \begin_layout Standard
 Querverweise auf Beispiele erzeugen Sie wie gewohnt:
  Sie fügen im Beispiel eine Marke ein,
@@ -998,24 +1131,32 @@ refstyle
 \emph on
 cleveref
 \emph default
- nicht das Präfi,
+ nicht das Präfix,
  um den Verweistyp zu bestimmen,
  sondern den verwendeten \SpecialChar TeX
 -Zähler.
- Standardmäßig verwendet 
+ Wie oben (Abschnitt
+\begin_inset space ~
+\end_inset
+
+
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "subsec:Nummerierung"
+
+\end_inset
+
+) ausgeführt,
+ verwendet 
 \emph on
 covington
 \emph default
- den bereits vorhandenen Zähler 
+ standardmäßig den Zähler 
 \family typewriter
 equation
 \family default
- (=
-\begin_inset space ~
-\end_inset
-
-Gleichungen) für Beispiele,
- für Unterbeispiele den Zählen 
+ für Beispiele;
+ für Unterbeispiele wird der Zähler 
 \family typewriter
 enumi
 \family default
@@ -1023,28 +1164,25 @@ enumi
 \begin_inset space ~
 \end_inset
 
-Aufzählung erster Ebene).
+Aufzählung erster Ebene) verwendet.
 \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.
+Wenn Sie,
+ wie in Abschnitt
+\begin_inset space ~
+\end_inset
+
+
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "subsec:Nummerierung"
+
+\end_inset
+
+ dokumentiert,
+ die Zähler von Gleichungen und Beispielen trennen,
+ können Sie den letzten Teil des Codes (wie im Kommentar vermerkt) weglassen.
 \end_layout
 
 \begin_layout Standard
@@ -1177,12 +1315,7 @@ Wie bei
 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,
+ Wenn Sie also Beispiele und Gleichungen separat nummerieren,
  können Sie auch hier wieder den letzten Teil des Codes weglassen.
 \end_layout
 
@@ -1238,6 +1371,75 @@ AddToHook
 \end_layout
 
 \end_deeper
+\begin_layout Standard
+Wenn Sie die formatierten Querverweise in dieser eleganten Form auch im 
Arbeitsbereich oder dem Querverweisdialog sehen wollen,
+ fügen Sie das Folgende in 
+\family sans
+Dokument\SpecialChar menuseparator
+Einstellungen\SpecialChar menuseparator
+Lokales Format
+\family default
+ ein (wie wir das für dieses Dokument getan haben):
+\end_layout
+
+\begin_layout Quote
+\begin_inset listings
+inline false
+status open
+
+\begin_layout Plain Layout
+Counter examplei
+\end_layout
+
+\begin_layout Plain Layout
+    PrettyFormat 
+\begin_inset Quotes eld
+\end_inset
+
+Example|Examples ##
+\begin_inset Quotes erd
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+End
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+Counter subexamplei
+\end_layout
+
+\begin_layout Plain Layout
+    PrettyFormat 
+\begin_inset Quotes eld
+\end_inset
+
+Example|Examples ##
+\begin_inset Quotes erd
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+End
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Anpassungen
+\end_layout
+
 \begin_layout Standard
 Alle Beispielvarianten können mittels optionaler Argument in vielen Details 
angepasst werden.
  Diese können Sie über 
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to