]> git.lyx.org Git - lyx.git/blob - lib/examples/MathLabeling.lyx
small compilation fixes
[lyx.git] / lib / examples / MathLabeling.lyx
1 #This file was created by <larsbj> Sun Dec  5 17:46:35 1999
2 #LyX 1.0 (C) 1995-1999 Matthias Ettrich and the LyX Team
3 \lyxformat 2.15
4 \textclass article
5 \language english
6 \inputencoding latin1
7 \fontscheme default
8 \graphics none
9 \paperfontsize 10
10 \spacing single 
11 \papersize letterpaper
12 \paperpackage a4
13 \use_geometry 0
14 \use_amsmath 0
15 \paperorientation portrait
16 \secnumdepth 3
17 \tocdepth 3
18 \paragraph_separation indent
19 \defskip medskip
20 \quotes_language english
21 \quotes_times 2
22 \papercolumns 0
23 \papersides 1
24 \paperpagestyle plain
25
26 \layout Title
27
28 Numbering and Labeling equations
29 \layout Author
30
31 Alejandro Aguilar-Sierra
32 \layout Standard
33
34 A simple equation can be numbered by two ways.
35  The first is invocating the LyX command 
36 \family typewriter 
37 math-number
38 \family default 
39 .
40  The corresponding number
41 \begin_float footnote 
42 \layout Standard
43
44 Or a 
45 \series bold 
46 #
47 \series default 
48  mark since true numbering is not yet implemented.
49 \end_float 
50  will appear after the right end of the equation.
51  
52 \layout Standard
53
54
55 \begin_inset Formula 
56 \begin{equation}
57 x=y^{2}-3
58 \end{equation}
59
60 \end_inset 
61
62
63 \layout Standard
64
65 Usually the equation number will be referred to in the document.
66  It's safer to assign a label to the equation, instead of using a fixed
67  number.
68  Assigning a label to a non-numbered equation will make it numbered automaticall
69 y.
70  With the label 
71 \series bold 
72 planck 
73 \series default 
74 we can be refer to the equation (
75 \begin_inset LatexCommand \ref{planck}
76
77 \end_inset 
78
79 ).
80 \layout Standard
81
82
83 \begin_inset Formula 
84 \begin{equation}
85 \label{planck}
86 E=hv
87 \end{equation}
88
89 \end_inset 
90
91
92 \layout Standard
93
94 In the case of an equation array, every line is sequentially numbered.
95  It's possible to suppress the number for a single line with the command
96  
97 \family typewriter 
98 math-nonumber
99 \family default 
100 .
101  The cursor must be at the row you want not to be numbered.
102 \layout Standard
103
104
105 \begin_inset Formula 
106 \begin{eqnarray}
107 (x+y)(x-y) & = & x^{2}-xy+xy-y^{2}\nonumber \\
108  & = & x^{2}-y^{2}
109 \end{eqnarray}
110
111 \end_inset 
112
113
114 \layout Standard
115
116 It's possible to label more than one line.
117  From the following array of equations we can refer to the equations (
118 \begin_inset LatexCommand \ref{eq:gs1}
119
120 \end_inset 
121
122 ) and (
123 \begin_inset LatexCommand \ref{eq:gs2}
124
125 \end_inset 
126
127 ) using their corresponding labels.
128 \layout Standard
129
130
131 \begin_inset Formula 
132 \begin{eqnarray}
133 v_{k+1} & = & w_{k}+b_{1}\label{eq:gs1} \\
134 w_{k+1} & = & v_{k+1}+b_{2}
135 \end{eqnarray}
136
137 \end_inset 
138
139
140 \layout Standard
141
142 To see the final result please preview or print this document.
143 \the_end