]> git.lyx.org Git - lyx.git/blob - lib/doc/Formula-numbering.lyx
Update Russian localization
[lyx.git] / lib / doc / Formula-numbering.lyx
1 #LyX 2.4 created this file. For more info see https://www.lyx.org/
2 \lyxformat 600
3 \begin_document
4 \begin_header
5 \save_transient_properties true
6 \origin /systemlyxdir/doc/
7 \textclass scrartcl
8 \begin_preamble
9 \usepackage{ifpdf}
10
11 \ifpdf
12
13 \usepackage[colorlinks=true,
14  pdftitle=Formelnummerierung, pdfpagemode=none,
15  pdfpagelayout=OneColumn, pdfstartview=XYZ,
16  pdfauthor={Uwe Stöhr},
17  pdfsubject={LaTeX/LyX numbering example},
18  pdfkeywords={LaTeX, numbering, LyX}]{hyperref}
19
20 \else % if DVI
21
22 \usepackage[colorlinks=true]{hyperref}
23
24 \fi
25
26 % define Roman counter
27 \newcounter{rom}
28 \renewcommand{\therom}{\roman{rom}}
29
30 % remember the original counter
31 \newcommand{\c@org@eq}{}
32 \let\c@org@eq\c@equation
33 \newcommand{\org@theeq}{}
34 \let\org@theeq\theequation
35
36 % \setrom activates the Roman counter
37 \newcommand{\setrom}{
38   \let\c@equation\c@rom
39   \let\theequation\therom}
40
41 % \setarab activates the original Arabic counter
42 \newcommand{\setarab}{
43   \let\c@equation\c@org@eq
44   \let\theequation\org@theeq}
45 % Added by lyx2lyx
46 \setlength{\parskip}{\medskipamount}
47 \setlength{\parindent}{0pt}
48 \end_preamble
49 \use_default_options false
50 \maintain_unincluded_children no
51 \language english
52 \language_package default
53 \inputencoding utf8
54 \fontencoding auto
55 \font_roman "default" "default"
56 \font_sans "default" "default"
57 \font_typewriter "default" "default"
58 \font_math "auto" "auto"
59 \font_default_family default
60 \use_non_tex_fonts false
61 \font_sc false
62 \font_sans_osf false
63 \font_typewriter_osf false
64 \font_roman_osf false
65 \font_sf_scale 100 100
66 \font_tt_scale 100 100
67 \use_microtype false
68 \use_dash_ligatures false
69 \graphics default
70 \default_output_format pdf2
71 \output_sync 0
72 \bibtex_command default
73 \index_command default
74 \paperfontsize 12
75 \spacing single
76 \use_hyperref false
77 \papersize default
78 \use_geometry false
79 \use_package amsmath 2
80 \use_package amssymb 2
81 \use_package cancel 1
82 \use_package esint 1
83 \use_package mathdots 1
84 \use_package mathtools 1
85 \use_package mhchem 1
86 \use_package stackrel 1
87 \use_package stmaryrd 1
88 \use_package undertilde 1
89 \cite_engine basic
90 \cite_engine_type default
91 \biblio_style plain
92 \use_bibtopic false
93 \use_indices false
94 \paperorientation portrait
95 \suppress_date false
96 \justification true
97 \use_refstyle 0
98 \use_minted 0
99 \use_lineno 0
100 \index Index
101 \shortcut idx
102 \color #008000
103 \end_index
104 \secnumdepth 4
105 \tocdepth 3
106 \paragraph_separation indent
107 \paragraph_indentation default
108 \is_math_indent 1
109 \math_indentation default
110 \math_numbering_side default
111 \quotes_style english
112 \dynamic_quotes 0
113 \papercolumns 1
114 \papersides 1
115 \paperpagestyle empty
116 \tracking_changes false
117 \postpone_fragile_content false
118 \output_changes false
119 \html_math_output 0
120 \html_css_as_file 0
121 \html_be_strict false
122 \end_header
123
124 \begin_body
125
126 \begin_layout Standard
127 This document demonstrates the usage of two different formula categories.
128  One is Arabic, one is Roman numbered.
129 \end_layout
130
131 \begin_layout Standard
132 \begin_inset Formula 
133 \begin{equation}
134 A=B\label{eq:B}
135 \end{equation}
136
137 \end_inset
138
139
140 \begin_inset Formula 
141 \begin{equation}
142 A=C\label{eq:C}
143 \end{equation}
144
145 \end_inset
146
147
148 \begin_inset ERT
149 status collapsed
150
151 \begin_layout Plain Layout
152
153
154 \backslash
155 setrom
156 \end_layout
157
158 \end_inset
159
160
161 \begin_inset Formula 
162 \begin{equation}
163 A=D\label{eq:D}
164 \end{equation}
165
166 \end_inset
167
168
169 \begin_inset Formula 
170 \begin{equation}
171 A=E\label{eq:E}
172 \end{equation}
173
174 \end_inset
175
176
177 \begin_inset ERT
178 status collapsed
179
180 \begin_layout Plain Layout
181
182
183 \backslash
184 setarab
185 \end_layout
186
187 \end_inset
188
189
190 \begin_inset Formula 
191 \begin{equation}
192 A=F\label{eq:F}
193 \end{equation}
194
195 \end_inset
196
197
198 \begin_inset Formula 
199 \begin{equation}
200 A=G\label{eq:G}
201 \end{equation}
202
203 \end_inset
204
205
206 \begin_inset ERT
207 status collapsed
208
209 \begin_layout Plain Layout
210
211
212 \backslash
213 setrom
214 \end_layout
215
216 \end_inset
217
218
219 \begin_inset Formula 
220 \begin{equation}
221 A=H\label{eq:H}
222 \end{equation}
223
224 \end_inset
225
226
227 \begin_inset Formula 
228 \begin{equation}
229 A=I\label{eq:I}
230 \end{equation}
231
232 \end_inset
233
234
235 \end_layout
236
237 \begin_layout Standard
238 Cross-references: 
239 \begin_inset CommandInset ref
240 LatexCommand eqref
241 reference "eq:B"
242
243 \end_inset
244
245  , 
246 \begin_inset CommandInset ref
247 LatexCommand eqref
248 reference "eq:C"
249
250 \end_inset
251
252  , 
253 \begin_inset CommandInset ref
254 LatexCommand eqref
255 reference "eq:F"
256
257 \end_inset
258
259  , 
260 \begin_inset CommandInset ref
261 LatexCommand eqref
262 reference "eq:G"
263
264 \end_inset
265
266  , 
267 \begin_inset CommandInset ref
268 LatexCommand eqref
269 reference "eq:D"
270
271 \end_inset
272
273  , 
274 \begin_inset CommandInset ref
275 LatexCommand eqref
276 reference "eq:E"
277
278 \end_inset
279
280  , 
281 \begin_inset CommandInset ref
282 LatexCommand eqref
283 reference "eq:H"
284
285 \end_inset
286
287  , 
288 \begin_inset CommandInset ref
289 LatexCommand eqref
290 reference "eq:I"
291
292 \end_inset
293
294
295 \end_layout
296
297 \begin_layout Standard
298 \noindent
299 \begin_inset CommandInset line
300 LatexCommand rule
301 offset "0.5ex"
302 width "100line%"
303 height "1pt"
304
305 \end_inset
306
307
308 \begin_inset VSpace medskip
309 \end_inset
310
311 To create this example, first a counter must be defined for the Roman numbered
312  formulas.
313  To do this the following is inserted to the \SpecialChar LaTeX
314 -preamble:
315 \end_layout
316
317 \begin_layout Standard
318
319 \series bold
320
321 \backslash
322 newcounter{rom}
323 \begin_inset Newline newline
324 \end_inset
325
326
327 \backslash
328 renewcommand{
329 \backslash
330 therom}{
331 \backslash
332 roman{rom}}
333 \end_layout
334
335 \begin_layout Standard
336 \begin_inset Newpage newpage
337 \end_inset
338
339 To save the value of the Arabic counter 
340 \series bold
341 equation
342 \series default
343 , this is added to the preamble
344 \end_layout
345
346 \begin_layout Standard
347
348 \series bold
349
350 \backslash
351 newcommand{
352 \backslash
353 c@org@eq}{}
354 \begin_inset Newline newline
355 \end_inset
356
357
358 \backslash
359 let
360 \backslash
361 c@org@eq
362 \backslash
363 c@equation
364 \begin_inset Newline newline
365 \end_inset
366
367
368 \backslash
369 newcommand{
370 \backslash
371 org@theeq}{}
372 \begin_inset Newline newline
373 \end_inset
374
375
376 \backslash
377 let
378 \backslash
379 org@theeq
380 \backslash
381 theequation
382 \end_layout
383
384 \begin_layout Standard
385 To be able to switch in the document between the two numbering schemes,
386  the following commands are defined in the preamble:
387 \end_layout
388
389 \begin_layout Standard
390
391 \series bold
392
393 \backslash
394 newcommand{
395 \backslash
396 setrom}{
397 \backslash
398 let
399 \backslash
400 c@equation
401 \backslash
402 c@rom
403 \backslash
404 let
405 \backslash
406 theequation
407 \backslash
408 therom}
409 \end_layout
410
411 \begin_layout Standard
412 for Roman numbering and
413 \end_layout
414
415 \begin_layout Standard
416
417 \series bold
418
419 \backslash
420 newcommand{
421 \backslash
422 setarab}{
423 \backslash
424 let
425 \backslash
426 c@equation
427 \backslash
428 c@org@eq
429 \backslash
430 let
431 \backslash
432 theequation
433 \backslash
434 org@theeq}
435 \end_layout
436
437 \begin_layout Standard
438 for Arabic numbering.
439 \end_layout
440
441 \begin_layout Standard
442 Every formula will be by default numbered Arabic.
443  To switch to Roman numbering, the command 
444 \series bold
445
446 \backslash
447 setrom
448 \series default
449  is inserted in \SpecialChar TeX
450 -mode.
451  With the command 
452 \series bold
453
454 \backslash
455 setarab
456 \series default
457  the numbering is switched to Arabic.
458 \end_layout
459
460 \end_body
461 \end_document