tufte layout files:
[lyx.git] / lib / doc / Formula-numbering.lyx
blobfe1e6e64ed543d4214ad876607dfaf9f8e5ca060
1 #LyX 1.6.0 created this file. For more info see http://www.lyx.org/
2 \lyxformat 345
3 \begin_document
4 \begin_header
5 \textclass scrartcl
6 \begin_preamble
7 \usepackage{ifpdf}
9 \ifpdf
11 \usepackage[colorlinks=true,
12  pdftitle=Formelnummerierung, pdfpagemode=none,
13  pdfpagelayout=OneColumn, pdfstartview=XYZ,
14  pdfauthor={Uwe Stöhr},
15  pdfsubject={LaTeX/LyX numbering example},
16  pdfkeywords={LaTeX, numbering, LyX}]{hyperref}
18 \else % if DVI
20 \usepackage[colorlinks=true, hypertex]{hyperref}
22 \fi
24 % define Roman counter
25 \newcounter{rom}
26 \renewcommand{\therom}{\roman{rom}}
28 % remember the original counter
29 \newcommand{\c@org@eq}{}
30 \let\c@org@eq\c@equation
31 \newcommand{\org@theeq}{}
32 \let\org@theeq\theequation
34 % \setrom activates the Roman counter
35 \newcommand{\setrom}{
36   \let\c@equation\c@rom
37   \let\theequation\therom}
39 % \setarab activates the original Arabic counter
40 \newcommand{\setarab}{
41   \let\c@equation\c@org@eq
42   \let\theequation\org@theeq}
43 \end_preamble
44 \options fleqn
45 \use_default_options false
46 \language english
47 \inputencoding auto
48 \font_roman default
49 \font_sans default
50 \font_typewriter default
51 \font_default_family default
52 \font_sc false
53 \font_osf false
54 \font_sf_scale 100
55 \font_tt_scale 100
56 \graphics default
57 \paperfontsize 12
58 \spacing single
59 \use_hyperref false
60 \papersize default
61 \use_geometry false
62 \use_amsmath 2
63 \use_esint 0
64 \cite_engine basic
65 \use_bibtopic false
66 \paperorientation portrait
67 \secnumdepth 4
68 \tocdepth 3
69 \paragraph_separation skip
70 \defskip medskip
71 \quotes_language english
72 \papercolumns 1
73 \papersides 1
74 \paperpagestyle empty
75 \tracking_changes false
76 \output_changes false
77 \author ""
78 \author ""
79 \end_header
81 \begin_body
83 \begin_layout Standard
84 This document demonstrates the usage of two different formula categories.
85  One is Arabic, one is Roman numbered.
86 \end_layout
88 \begin_layout Standard
89 \begin_inset Formula \begin{equation}
90 A=B\label{eq:B}\end{equation}
92 \end_inset
95 \begin_inset Formula \begin{equation}
96 A=C\label{eq:C}\end{equation}
98 \end_inset
101 \begin_inset ERT
102 status collapsed
104 \begin_layout Plain Layout
107 \backslash
108 setrom
109 \end_layout
111 \end_inset
114 \begin_inset Formula \begin{equation}
115 A=D\label{eq:D}\end{equation}
117 \end_inset
120 \begin_inset Formula \begin{equation}
121 A=E\label{eq:E}\end{equation}
123 \end_inset
126 \begin_inset ERT
127 status collapsed
129 \begin_layout Plain Layout
132 \backslash
133 setarab
134 \end_layout
136 \end_inset
139 \begin_inset Formula \begin{equation}
140 A=F\label{eq:F}\end{equation}
142 \end_inset
145 \begin_inset Formula \begin{equation}
146 A=G\label{eq:G}\end{equation}
148 \end_inset
151 \begin_inset ERT
152 status collapsed
154 \begin_layout Plain Layout
157 \backslash
158 setrom
159 \end_layout
161 \end_inset
164 \begin_inset Formula \begin{equation}
165 A=H\label{eq:H}\end{equation}
167 \end_inset
170 \begin_inset Formula \begin{equation}
171 A=I\label{eq:I}\end{equation}
173 \end_inset
176 \end_layout
178 \begin_layout Standard
179 Cross-references: 
180 \begin_inset CommandInset ref
181 LatexCommand eqref
182 reference "eq:B"
184 \end_inset
186  , 
187 \begin_inset CommandInset ref
188 LatexCommand eqref
189 reference "eq:C"
191 \end_inset
193  , 
194 \begin_inset CommandInset ref
195 LatexCommand eqref
196 reference "eq:F"
198 \end_inset
200  , 
201 \begin_inset CommandInset ref
202 LatexCommand eqref
203 reference "eq:G"
205 \end_inset
207  , 
208 \begin_inset CommandInset ref
209 LatexCommand eqref
210 reference "eq:D"
212 \end_inset
214  , 
215 \begin_inset CommandInset ref
216 LatexCommand eqref
217 reference "eq:E"
219 \end_inset
221  , 
222 \begin_inset CommandInset ref
223 LatexCommand eqref
224 reference "eq:H"
226 \end_inset
228  , 
229 \begin_inset CommandInset ref
230 LatexCommand eqref
231 reference "eq:I"
233 \end_inset
236 \end_layout
238 \begin_layout Standard
240 \lyxline
242 \begin_inset VSpace medskip
243 \end_inset
245 To create this example, first a counter must be defined for the Roman numbered
246  formulas.
247  To do this the following is inserted to the LaTeX-preamble:
248 \end_layout
250 \begin_layout Standard
252 \series bold
254 \backslash
255 newcounter{rom}
256 \begin_inset Newline newline
257 \end_inset
260 \backslash
261 renewcommand{
262 \backslash
263 therom}{
264 \backslash
265 roman{rom}}
266 \end_layout
268 \begin_layout Standard
269 \begin_inset Newpage newpage
270 \end_inset
272 To save the value of the Arabic counter 
273 \series bold
274 equation
275 \series default
276 , this is added to the preamble
277 \end_layout
279 \begin_layout Standard
281 \series bold
283 \backslash
284 newcommand{
285 \backslash
286 c@org@eq}{}
287 \begin_inset Newline newline
288 \end_inset
291 \backslash
293 \backslash
294 c@org@eq
295 \backslash
296 c@equation
297 \begin_inset Newline newline
298 \end_inset
301 \backslash
302 newcommand{
303 \backslash
304 org@theeq}{}
305 \begin_inset Newline newline
306 \end_inset
309 \backslash
311 \backslash
312 org@theeq
313 \backslash
314 theequation
315 \end_layout
317 \begin_layout Standard
318 To be able to switch in the document between the two numbering schemes,
319  the following commands are defined in the preamble:
320 \end_layout
322 \begin_layout Standard
324 \series bold
326 \backslash
327 newcommand{
328 \backslash
329 setrom}{
330 \backslash
332 \backslash
333 c@equation
334 \backslash
335 c@rom
336 \backslash
338 \backslash
339 theequation
340 \backslash
341 therom}
342 \end_layout
344 \begin_layout Standard
345 for Roman numbering and
346 \end_layout
348 \begin_layout Standard
350 \series bold
352 \backslash
353 newcommand{
354 \backslash
355 setarab}{
356 \backslash
358 \backslash
359 c@equation
360 \backslash
361 c@org@eq
362 \backslash
364 \backslash
365 theequation
366 \backslash
367 org@theeq}
368 \end_layout
370 \begin_layout Standard
371 for Arabic numbering.
372 \end_layout
374 \begin_layout Standard
375 Every formula will be by default numbered Arabic.
376  To switch to Roman numbering, the command 
377 \series bold
379 \backslash
380 setrom
381 \series default
382  is inserted in TeX-mode.
383  With the command 
384 \series bold
386 \backslash
387 setarab
388 \series default
389  the numbering is switched to Arabic.
390 \end_layout
392 \end_body
393 \end_document