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