]> git.lyx.org Git - lyx.git/blobdiff - lib/doc/Math.lyx
an example for the sweave module, prepared by Gregor Gorjanc
[lyx.git] / lib / doc / Math.lyx
index 23c2fdabaa2852c1e457ab70a6885a4f3e341b9c..808a07a0207d5e31ab5d71b82c1f3438fbf90fcb 100644 (file)
@@ -1,4 +1,4 @@
-#LyX 1.6.2svn created this file. For more info see http://www.lyx.org/
+#LyX 1.6.3svn created this file. For more info see http://www.lyx.org/
 \lyxformat 345
 \begin_document
 \begin_header
@@ -246,7 +246,7 @@ author: Uwe Stöhr
 
 
 \family sans
-Version 1.6.0
+Version 2.0.x
 \end_layout
 
 \begin_layout Standard
@@ -796,7 +796,7 @@ Mathematical text
  This mode is invoked with the the shortcut 
 \begin_inset Info
 type  "shortcut"
-arg   "math-mode"
+arg   "font-default"
 \end_inset
 
  or by the insertion of the command 
@@ -2063,29 +2063,62 @@ The command for the example above is:
 \series bold
 
 \backslash
-cfrac{A
-\begin_inset Formula $\to$
-\end_inset
+cfrac
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
 
 
 \backslash
-{B+
+spce 
+\end_layout
+
+\end_inset
+
+A
+\begin_inset Formula $\downarrow$
+\end_inset
+
+B+
 \backslash
-cfrac{C+
+cfrac
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
 \backslash
-cfrac{E
-\begin_inset Formula $\to$
+spce 
+\end_layout
+
 \end_inset
 
+C+
+\backslash
+cfrac
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
 
 \backslash
-{F
-\begin_inset Formula $\to\to$
+spce 
+\end_layout
+
 \end_inset
 
+E
+\begin_inset Formula $\downarrow$
+\end_inset
 
-\backslash
-{D
+F
+\begin_inset Formula $\downarrow$
+\end_inset
+
+D
 \end_layout
 
 \begin_layout Standard
@@ -2104,63 +2137,79 @@ cfrac
 \series default
  sets the fraction always in the size of a displayed formula, also when
  it is part of another fraction.
+\end_layout
+
+\begin_layout Standard
+It is possible to specify the alignment of the numerator.
+ The command 
+\series bold
+
+\backslash
+cfracleft
+\series default
+ is used to left align it, the command 
+\series bold
+
+\backslash
+cfracright
+\series default
+ to right-align it.
  
 \series bold
 
 \backslash
 cfrac
 \series default
- has the following command scheme:
+ centers the numerator.
+ These fractions demonstrate the different alignments:
 \end_layout
 
 \begin_layout Standard
+\begin_inset Formula $\cfrac[l]{A}{B+C}$
+\end_inset
+
+, 
+\begin_inset Formula $\cfrac{A}{B+C}$
+\end_inset
+
+, 
+\begin_inset Formula $\cfrac[r]{A}{B+C}$
+\end_inset
 
-\series bold
 
-\backslash
-cfrac[numerator position]{numerator}{denominator}
 \end_layout
 
 \begin_layout Standard
-The numerator position can be 
-\emph on
-l
-\emph default
- , 
-\emph on
-c
-\emph default
-, or 
-\emph on
-r
-\emph default
- .
- l or r aligns the numerator to the left or right, resp.
-\begin_inset space ~
-\end_inset
+\begin_inset Note Greyedout
+status open
 
-with the fraction stroke.
- When 
-\emph on
-c
-\emph default
- or no position is given, the numerator appears centered.
- These fractions demonstrate the different alignments:
-\begin_inset Newline newline
-\end_inset
+\begin_layout Plain Layout
 
+\series bold
+Note:
+\series default
+\series bold
 
+\backslash
+cfracleft
+\series default
+ and 
 \series bold
 
-\begin_inset Formula $\cfrac[l]{A}{B+C}$
-\end_inset
+\backslash
+cfracright
+\series default
+ are no real LaTeX commands but represent the command 
+\series bold
 
-, 
-\begin_inset Formula $\cfrac{A}{B+C}$
-\end_inset
+\backslash
+cfrac[alignment]{numerator}{denominator}
+\series default
+ .
+ Therefore you cannot use them in TeX code.
+\end_layout
 
-, 
-\begin_inset Formula $\cfrac[r]{A}{B+C}$
 \end_inset
 
 
@@ -2248,10 +2297,18 @@ unitfracthree
 \end_inset
 
 
-\begin_inset Newline newline
-\end_inset
+\end_layout
+
+\begin_layout Standard
+\begin_inset Note Greyedout
+status open
+
+\begin_layout Plain Layout
 
-Note that 
+\series bold
+Note:
+\series default
 \series bold
 
 \backslash
@@ -2267,7 +2324,13 @@ unitfracthree
 \backslash
 unitfrac[number]{numerator}{denominator}
 \series default
-, therefore you cannot use it in TeX code.
+ .
+ Therefore you cannot use it in TeX code.
+\end_layout
+
+\end_inset
+
+
 \end_layout
 
 \begin_layout Standard
@@ -10935,12 +10998,11 @@ arg   "space-insert protected"
 \end_inset
 
 ).
- A blue 
+ A 
 \begin_inset Quotes eld
 \end_inset
 
 
-\series bold
 \color blue
 
 \begin_inset ERT
@@ -10956,7 +11018,6 @@ spce
 \end_inset
 
 
-\series default
 \color inherit
 
 \begin_inset Quotes erd
@@ -11784,15 +11845,11 @@ Space ! horizontal ! variable
 \end_layout
 
 \begin_layout Standard
-Space with a defined length can be inserted in LyX with the command
-\begin_inset Newline newline
-\end_inset
-
-
+Space with a defined length can be inserted with the command 
 \series bold
 
 \backslash
-hspace{length}
+hspace
 \series default
 
 \begin_inset Index
@@ -11807,18 +11864,54 @@ hspace
 \end_inset
 
 .
- For the length all units listed in 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "tab:Available-units"
+ Then a long 
+\begin_inset Quotes eld
+\end_inset
+
+
+\color blue
 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+spce 
+\end_layout
+
+\end_inset
+
+
+\color inherit
+
+\begin_inset Quotes erd
 \end_inset
 
- are allowed, except of the unit 
+ appears.
+ The length can be specified by left-clicking on the 
 \begin_inset Quotes eld
 \end_inset
 
-mu
+
+\color blue
+
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+spce 
+\end_layout
+
+\end_inset
+
+
+\color inherit
+
 \begin_inset Quotes erd
 \end_inset
 
@@ -11865,7 +11958,9 @@ hfill
 \begin_inset Text
 
 \begin_layout Plain Layout
-Command
+Command (
+\backslash
+hspace length)
 \end_layout
 
 \end_inset
@@ -11887,13 +11982,30 @@ Result
 \begin_layout Plain Layout
 A=B
 \backslash
-hspace{3cm
+hspace
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+spce 
+\end_layout
+
+\end_inset
+
+
 \begin_inset Formula $\to$
 \end_inset
 
 A
 \backslash
-not=C
+not=C (3
+\begin_inset space \thinspace{}
+\end_inset
+
+cm)
 \end_layout
 
 \end_inset
@@ -11918,13 +12030,30 @@ not=C
 \begin_layout Plain Layout
 A
 \backslash
-hspace{-1mm
+hspace
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+spce 
+\end_layout
+
+\end_inset
+
+
 \begin_inset Formula $\to$
 \end_inset
 
 A
 \backslash
-not=A
+not=A (-1
+\begin_inset space \thinspace{}
+\end_inset
+
+mm)
 \end_layout
 
 \end_inset
@@ -12060,7 +12189,7 @@ Horizontal
 
 Space
 \family default
-, what is not possible in formulas:
+:
 \end_layout
 
 \begin_layout Standard
@@ -14833,14 +14962,14 @@ Result
 \begin_layout Plain Layout
 
 \backslash
-sum
+int
 \begin_inset Index
 status collapsed
 
 \begin_layout Plain Layout
-Commands ! S ! 
+Commands ! I ! 
 \backslash
-sum
+int
 \end_layout
 
 \end_inset
@@ -14854,7 +14983,7 @@ sum
 \begin_inset Text
 
 \begin_layout Plain Layout
-\begin_inset Formula $\sum$
+\begin_inset Formula $\int$
 \end_inset
 
 
@@ -14870,19 +14999,7 @@ sum
 \begin_layout Plain Layout
 
 \backslash
-int
-\begin_inset Index
-status collapsed
-
-\begin_layout Plain Layout
-Commands ! I ! 
-\backslash
-int
-\end_layout
-
-\end_inset
-
-
+oint
 \end_layout
 
 \end_inset
@@ -14891,7 +15008,7 @@ int
 \begin_inset Text
 
 \begin_layout Plain Layout
-\begin_inset Formula $\int$
+\begin_inset Formula $\oint$
 \end_inset
 
 
@@ -14907,7 +15024,7 @@ int
 \begin_layout Plain Layout
 
 \backslash
-intop
+ointctrclockwise
 \end_layout
 
 \end_inset
@@ -14916,7 +15033,7 @@ intop
 \begin_inset Text
 
 \begin_layout Plain Layout
-\begin_inset Formula $\intop$
+\begin_inset Formula $\ointctrclockwise$
 \end_inset
 
 
@@ -14932,7 +15049,7 @@ intop
 \begin_layout Plain Layout
 
 \backslash
-oint
+ointclockwise
 \end_layout
 
 \end_inset
@@ -14941,7 +15058,7 @@ oint
 \begin_inset Text
 
 \begin_layout Plain Layout
-\begin_inset Formula $\oint$
+\begin_inset Formula $\ointclockwise$
 \end_inset
 
 
@@ -14957,7 +15074,7 @@ oint
 \begin_layout Plain Layout
 
 \backslash
-ointop
+sqint
 \end_layout
 
 \end_inset
@@ -14966,7 +15083,7 @@ ointop
 \begin_inset Text
 
 \begin_layout Plain Layout
-\begin_inset Formula $\ointop$
+\begin_inset Formula $\sqint$
 \end_inset
 
 
@@ -14982,7 +15099,7 @@ ointop
 \begin_layout Plain Layout
 
 \backslash
-ointctrclockwise
+fint
 \end_layout
 
 \end_inset
@@ -14991,7 +15108,8 @@ ointctrclockwise
 \begin_inset Text
 
 \begin_layout Plain Layout
-\begin_inset Formula $\ointctrclockwise$
+\begin_inset Formula $\fint$
 \end_inset
 
 
@@ -15007,7 +15125,7 @@ ointctrclockwise
 \begin_layout Plain Layout
 
 \backslash
-ointclockwise
+landupint
 \end_layout
 
 \end_inset
@@ -15016,7 +15134,8 @@ ointclockwise
 \begin_inset Text
 
 \begin_layout Plain Layout
-\begin_inset Formula $\ointclockwise$
+\begin_inset Formula $\landupint$
 \end_inset
 
 
@@ -15032,7 +15151,7 @@ ointclockwise
 \begin_layout Plain Layout
 
 \backslash
-sqint
+landdownint
 \end_layout
 
 \end_inset
@@ -15041,7 +15160,8 @@ sqint
 \begin_inset Text
 
 \begin_layout Plain Layout
-\begin_inset Formula $\sqint$
+\begin_inset Formula $\landdownint$
 \end_inset
 
 
@@ -15110,7 +15230,7 @@ bigcup
 
 
 \begin_inset Tabular
-<lyxtabular version="3" rows="10" columns="2">
+<lyxtabular version="3" rows="11" columns="2">
 <features>
 <column alignment="center" valignment="top" width="0pt">
 <column alignment="center" valignment="top" width="0pt">
@@ -15140,6 +15260,43 @@ Result
 
 \begin_layout Plain Layout
 
+\backslash
+sum
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Commands ! S ! 
+\backslash
+sum
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset Formula $\sum$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
 \backslash
 prod
 \begin_inset Index
@@ -15400,32 +15557,32 @@ The operators are called big because they are bigger than the sometimes
 \end_layout
 
 \begin_layout Standard
-The operators 
+For all integral operators there is a second version available, ending on
+\series bold
+op
+\series default
+: 
 \series bold
 
 \backslash
 intop
 \series default
- and 
+, 
 \series bold
 
 \backslash
 ointop
 \series default
- are different from 
+ etc..
+ These operators are different from 
 \series bold
 
 \backslash
 int
 \series default
- and 
-\series bold
-
-\backslash
-oint
-\series default
-, resp.
-\begin_inset space ~
+ etc.
+\begin_inset space \space{}
 \end_inset
 
 in the style the operator limits are displayed, see 
@@ -15893,7 +16050,7 @@ A(x)
 \begin_layout Standard
 Limits of inline formulas are set right beside the operator.
  Limits in displayed formulas are set above or below the operator, except
of integral limits.
for integral limits.
 \end_layout
 
 \begin_layout Standard
@@ -15940,19 +16097,23 @@ Inline
 
 \end_inset
 
-For integrals, except of 
+For integrals, except those ending with 
+\series bold
+op
+\series default
+ like 
 \series bold
 
 \backslash
 intop
 \series default
- and 
+, 
 \series bold
 
 \backslash
 ointop
 \series default
-, the limits are by default set beside the operator.
+ etc., the limits are by default set beside the operator.
  But for multiple integrals the limits are often set below the operator.
  In the following example the limits type was therefore set to 
 \series bold
@@ -24961,7 +25122,7 @@ sgn(x)+B
 A
 \backslash
 ,
-\begin_inset Formula $\underbrace{\textrm{sgn}}_{\textrm{Alt-m}\,\textrm{m}}$
+\begin_inset Formula $\underbrace{\textrm{sgn}}_{\textrm{Alt+M}\,\textrm{M}}$
 \end_inset
 
 (x)+B
@@ -25234,13 +25395,7 @@ Result
 status collapsed
 
 \begin_layout Plain Layout
-
-\series bold
-
-\backslash
-hspace
-\series default
- and
+The space and
 \series bold
  
 \backslash
@@ -25642,14 +25797,12 @@ command
 status collapsed
 
 \begin_layout Plain Layout
+The space of 0
+\begin_inset space \thinspace{}
+\end_inset
 
-\series bold
-
-\backslash
-hspace{0mm}
-\series default
- is used for separation, because otherwise the output will be ¡ and ¿ respective
-ly.
+mm is used for separation, because otherwise the output will be ¡ and ¿
+ respectively.
 \end_layout
 
 \end_inset
@@ -27971,54 +28124,27 @@ Long formulas can be typeset using these methods:
 When one side of the equation is much shorther than the line width, this
  one is chosen for the left side and the right side is typeset over two
  lines:
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-medskip
-\end_layout
-
-\end_inset
-
 \begin_inset Formula \begin{eqnarray}
 H & = & W_{SB}+W_{mv}+W_{D}-\frac{\hbar^{2}}{2m_{0}}\Delta-\frac{\hbar^{2}}{2m_{1}}\Delta_{1}-\frac{\hbar^{2}}{2m_{2}}\Delta_{2}-\frac{e^{2}}{4\pi\varepsilon_{0}|\mathbf{r}-\mathbf{R}_{1}|}\nonumber \\
  &  & -\hspace{3pt}\frac{e^{2}}{4\pi\varepsilon_{0}|\mathbf{r}-\mathbf{R}_{2}|}+\frac{e^{2}}{4\pi\varepsilon_{0}|\mathbf{R}_{1}-\mathbf{R}_{2}|}\label{eq:shortlong}\end{eqnarray}
 
 \end_inset
 
-
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-smallskip
-\end_layout
-
-\end_inset
-
-
-\begin_inset Newline newline
-\end_inset
-
 The minus sign at the beginning of the second line does normally not appear
  as operator because it is the first character of the line.
  Thus it would not be surrounded by space and could not be distinguished
  from the fraction bar.
- To avoid this, space was inserted behind the minus sign with the command
+ To avoid this, 3
+\begin_inset space \thinspace{}
+\end_inset
+
+pt space was inserted behind the minus sign with the command 
 \series bold
 
 \backslash
-hspace{3pt}
+hspace
 \series default
-
+.
 \begin_inset Foot
 status collapsed
 
@@ -28053,7 +28179,7 @@ hspace
 
 \end_inset
 
-.
+
 \end_layout
 
 \begin_layout Itemize
@@ -28078,19 +28204,6 @@ lefteqn
  is used.
  It is inserted to the first column of the first line and effects that all
  further insertions overwrite the following columns:
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-medskip
-\end_layout
-
-\end_inset
-
-
 \begin_inset Formula \begin{eqnarray}
 \lefteqn{4x^{2}\left(B^{2}+x_{0}^{2}\right)+4x_{0}x\left(D-B^{2}\right)+B^{2}\left(B^{2}-2r_{g}^{2}+2x_{0}^{2}-2r_{k}^{2}\right)+D^{2}}\nonumber \\
  &  & -\hspace{3pt}B^{2}-2B\sqrt{r_{g}^{2}-x^{2}+2x_{0}x-x_{0}^{2}}+r_{g}^{2}-x^{2}+2x_{0}x-x_{0}^{2}\nonumber \\
@@ -28098,23 +28211,6 @@ medskip
 
 \end_inset
 
-
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-smallskip
-\end_layout
-
-\end_inset
-
-
-\begin_inset Newline newline
-\end_inset
-
 After the insertion of 
 \series bold
 
@@ -28124,35 +28220,13 @@ lefteqn
 , the cursor is in a purple box that is a bit shifted to the left from the
  blue one.
  In this the formula is inserted.
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-medskip
-\end_layout
-
-\end_inset
-
-
 \begin_inset Newline newline
 \end_inset
 
 The content of the further lines is inserted to the second or another formula
  column.
  The greater the column number where it was inserted, the larger the indentation.
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-medskip
-\end_layout
-
+\begin_inset VSpace medskip
 \end_inset
 
 
@@ -29390,7 +29464,7 @@ arg   "math-number-line-toggle"
 \end_layout
 
 \begin_layout Standard
-Except of inline formulas, all formulas can be numbered with two different
+Except for inline formulas, all formulas can be numbered with two different
  styles, see 
 \begin_inset CommandInset ref
 LatexCommand ref
 Longrightarrow
 \series default
 , the LaTeX-preamble line is:
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-medskip
-\end_layout
-
+\begin_inset VSpace medskip
 \end_inset
 
 
-\series bold
-
 \begin_inset Newline newline
 \end_inset
 
 
+\series bold
+
 \backslash
 newcommand{
 \backslash
@@ -31257,25 +31322,16 @@ underline
 \series default
 , the argument (that should be underlined) must be taken into account.
  For this the preamble line is:
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-medskip
-\end_layout
-
+\begin_inset VSpace medskip
 \end_inset
 
 
-\series bold
-
 \begin_inset Newline newline
 \end_inset
 
 
+\series bold
+
 \backslash
 newcommand{
 \backslash
@@ -31284,26 +31340,13 @@ us}[1]{
 underline{#1}}
 \series default
 
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-medskip
-\end_layout
-
+\begin_inset VSpace medskip
 \end_inset
 
 
-\series bold
-
 \begin_inset Newline newline
 \end_inset
 
-
-\series default
 The character 
 \series bold
 #
@@ -31337,25 +31380,16 @@ define the command
 fb
 \series default
 :
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-medskip
-\end_layout
-
+\begin_inset VSpace medskip
 \end_inset
 
 
-\series bold
-
 \begin_inset Newline newline
 \end_inset
 
 
+\series bold
+
 \backslash
 newcommand{
 \backslash
@@ -31364,26 +31398,13 @@ fb}[3]{
 framebox#1#2{$#3$}}
 \series default
 
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-medskip
-\end_layout
-
+\begin_inset VSpace medskip
 \end_inset
 
 
-\series bold
-
 \begin_inset Newline newline
 \end_inset
 
-
-\series default
 The two Dollar signs creates the extra formula needed for 
 \series bold
 
@@ -31409,25 +31430,16 @@ fcolorbox
 \series default
  where the color for the box needn't to be specified, the argument for the
  color is defined optional:
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-medskip
-\end_layout
-
+\begin_inset VSpace medskip
 \end_inset
 
 
-\series bold
-
 \begin_inset Newline newline
 \end_inset
 
 
+\series bold
+
 \backslash
 newcommand{
 \backslash
@@ -31436,16 +31448,7 @@ cb}[3][white]{
 fcolorbox{#2}{#1}{$#3$}}
 \series default
 
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-medskip
-\end_layout
-
+\begin_inset VSpace medskip
 \end_inset
 
 
@@ -31928,8 +31931,6 @@ Macro
 
 \begin_inset Graphics
        filename clipart/macrobox.png
-       lyxscale 90
-       scale 90
 
 \end_inset
 
@@ -32080,8 +32081,6 @@ qG
 
 \begin_inset Graphics
        filename clipart/macrouse.png
-       lyxscale 75
-       scale 75
 
 \end_inset
 
@@ -32165,7 +32164,7 @@ xleftarrow[#2]{#1}}
 in LyX as normal text, highlighting it completely and using then the shortcut
  
 \family sans
-Ctrl-m
+Ctrl+M
 \family default
 , the command will be transformed to a math macro.
  Using this method you need to be careful that the 
@@ -32282,7 +32281,7 @@ Macro
 \end_inset
 
 Definition\SpecialChar \menuseparator
-Remove Argument
+Remove Last Argument
 \end_layout
 
 \end_inset
@@ -32318,7 +32317,7 @@ Macro
 \end_inset
 
 Definition\SpecialChar \menuseparator
-Append Last Argument
+Append Argument
 \end_layout
 
 \end_inset
@@ -34234,13 +34233,7 @@ Result
 status collapsed
 
 \begin_layout Plain Layout
-
-\series bold
-
-\backslash
-hspace
-\series default
- and
+The space and
 \series bold
  
 \backslash