mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-02 08:10:39 +00:00
documentation: final math macro touches
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27807 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
f86ce293d4
commit
d3a1abaa24
@ -2068,6 +2068,7 @@ lib_doc_clipart_files = Split('''
|
||||
footnoteQt4.png
|
||||
labelQt4.png
|
||||
macrobox.png
|
||||
MacroToolbar.png
|
||||
macrouse.png
|
||||
mbox.png
|
||||
mobius.eps
|
||||
|
@ -46,6 +46,7 @@ dist_clipartdoc_DATA = \
|
||||
clipart/LaTeX.png \
|
||||
clipart/LyXNoteImageQt4.png \
|
||||
clipart/macrobox.png \
|
||||
clipart/MacroToolbar.png \
|
||||
clipart/macrouse.png \
|
||||
clipart/mbox.png \
|
||||
clipart/referenceQt4.png \
|
||||
|
591
lib/doc/Math.lyx
591
lib/doc/Math.lyx
@ -31735,7 +31735,7 @@ Math Macros
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
User-defined commands! Math Macros
|
||||
User-defined commands! Math macros
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
@ -32198,6 +32198,574 @@ reference "sub:The-Command-newcommand"
|
||||
cannot be created as macro.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
When the cursor is in a macro definition box, you will see the macro toolbar
|
||||
in LyX:
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
\begin_inset VSpace defskip
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
\begin_inset Graphics
|
||||
filename clipart/MacroToolbar.png
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\begin_inset Index
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
Macros ! Toolbar
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
\begin_inset VSpace defskip
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
The macro toolbar contains from left to right the following buttons:
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
\begin_inset VSpace defskip
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
\begin_inset Tabular
|
||||
<lyxtabular version="3" rows="9" columns="2">
|
||||
<features islongtable="true">
|
||||
<column alignment="left" valignment="top" width="0">
|
||||
<column alignment="left" valignment="top" width="85col%">
|
||||
<row interlinespace="2.5mm">
|
||||
<cell alignment="center" valignment="top" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
\begin_inset Graphics
|
||||
filename ../images/math-macro-remove-param.png
|
||||
BoundingBox 0bp 5bp 20bp 25bp
|
||||
rotateOrigin center
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
<cell alignment="center" valignment="top" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
\family sans
|
||||
Edit\SpecialChar \menuseparator
|
||||
Math\SpecialChar \menuseparator
|
||||
Macro
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
Definition\SpecialChar \menuseparator
|
||||
Append Argument
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
</row>
|
||||
<row interlinespace="2.5mm">
|
||||
<cell alignment="center" valignment="top" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
\begin_inset Graphics
|
||||
filename ../images/math-macro-add-param.png
|
||||
BoundingBox 0bp 5bp 20bp 25bp
|
||||
rotateOrigin center
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
<cell alignment="center" valignment="top" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
\family sans
|
||||
Edit\SpecialChar \menuseparator
|
||||
Math\SpecialChar \menuseparator
|
||||
Macro
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
Definition\SpecialChar \menuseparator
|
||||
Remove Last Argument
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
</row>
|
||||
<row interlinespace="2.5mm">
|
||||
<cell alignment="center" valignment="top" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
\begin_inset Graphics
|
||||
filename ../images/math-macro-make-optional.png
|
||||
BoundingBox 0bp 5bp 20bp 25bp
|
||||
rotateOrigin center
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
<cell alignment="center" valignment="top" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
\family sans
|
||||
Edit\SpecialChar \menuseparator
|
||||
Math\SpecialChar \menuseparator
|
||||
Macro
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
Definition\SpecialChar \menuseparator
|
||||
Make First Non-Optional into
|
||||
\begin_inset Newline newline
|
||||
\end_inset
|
||||
|
||||
|
||||
\begin_inset ERT
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
|
||||
\backslash
|
||||
hphantom{
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
Edit\SpecialChar \menuseparator
|
||||
Math\SpecialChar \menuseparator
|
||||
Macro
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
Definition\SpecialChar \menuseparator
|
||||
|
||||
\begin_inset ERT
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
}
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
Optional Argument
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
</row>
|
||||
<row interlinespace="2.5mm">
|
||||
<cell alignment="center" valignment="top" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
\begin_inset Graphics
|
||||
filename ../images/math-macro-make-nonoptional.png
|
||||
BoundingBox 0bp 5bp 20bp 25bp
|
||||
rotateOrigin center
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
<cell alignment="center" valignment="top" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
\family sans
|
||||
Edit\SpecialChar \menuseparator
|
||||
Math\SpecialChar \menuseparator
|
||||
Macro
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
Definition\SpecialChar \menuseparator
|
||||
Make Last Optional into
|
||||
\begin_inset Newline newline
|
||||
\end_inset
|
||||
|
||||
|
||||
\begin_inset ERT
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
|
||||
\backslash
|
||||
hphantom{
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
Edit\SpecialChar \menuseparator
|
||||
Math\SpecialChar \menuseparator
|
||||
Macro
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
Definition\SpecialChar \menuseparator
|
||||
|
||||
\begin_inset ERT
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
}
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
Non-Optional Argument
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
</row>
|
||||
<row interlinespace="2.5mm">
|
||||
<cell alignment="center" valignment="top" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
\begin_inset Graphics
|
||||
filename ../images/math-macro-remove-optional-param.png
|
||||
BoundingBox 0bp 5bp 20bp 25bp
|
||||
rotateOrigin center
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
<cell alignment="center" valignment="top" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
\family sans
|
||||
Edit\SpecialChar \menuseparator
|
||||
Math\SpecialChar \menuseparator
|
||||
Macro
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
Definition\SpecialChar \menuseparator
|
||||
Insert Optional Argument
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
</row>
|
||||
<row interlinespace="2.5mm">
|
||||
<cell alignment="center" valignment="top" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
\begin_inset Graphics
|
||||
filename ../images/math-macro-add-optional-param.png
|
||||
BoundingBox 0bp 5bp 20bp 25bp
|
||||
rotateOrigin center
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
<cell alignment="center" valignment="top" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
\family sans
|
||||
Edit\SpecialChar \menuseparator
|
||||
Math\SpecialChar \menuseparator
|
||||
Macro
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
Definition\SpecialChar \menuseparator
|
||||
Remove Optional Argument
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
</row>
|
||||
<row interlinespace="2.5mm">
|
||||
<cell alignment="center" valignment="top" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
\begin_inset Graphics
|
||||
filename ../images/math-macro-remove-greedy-param.png
|
||||
BoundingBox 0bp 5bp 20bp 25bp
|
||||
rotateOrigin center
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
<cell alignment="center" valignment="top" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
\family sans
|
||||
Edit\SpecialChar \menuseparator
|
||||
Math\SpecialChar \menuseparator
|
||||
Macro
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
Definition\SpecialChar \menuseparator
|
||||
Append Argument Eating
|
||||
\begin_inset Newline newline
|
||||
\end_inset
|
||||
|
||||
|
||||
\begin_inset ERT
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
|
||||
\backslash
|
||||
hphantom{
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
Edit\SpecialChar \menuseparator
|
||||
Math\SpecialChar \menuseparator
|
||||
Macro
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
Definition\SpecialChar \menuseparator
|
||||
|
||||
\begin_inset ERT
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
}
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
From The Right
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
</row>
|
||||
<row interlinespace="2.5mm">
|
||||
<cell alignment="center" valignment="top" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
\begin_inset Graphics
|
||||
filename ../images/math-macro-append-greedy-param.png
|
||||
BoundingBox 0bp 5bp 20bp 25bp
|
||||
rotateOrigin center
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
<cell alignment="center" valignment="top" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
\family sans
|
||||
Edit\SpecialChar \menuseparator
|
||||
Math\SpecialChar \menuseparator
|
||||
Macro
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
Definition\SpecialChar \menuseparator
|
||||
Append Optional Argument
|
||||
\begin_inset Newline newline
|
||||
\end_inset
|
||||
|
||||
|
||||
\begin_inset ERT
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
|
||||
\backslash
|
||||
hphantom{
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
Edit\SpecialChar \menuseparator
|
||||
Math\SpecialChar \menuseparator
|
||||
Macro
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
Definition\SpecialChar \menuseparator
|
||||
|
||||
\begin_inset ERT
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
}
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
Eating From The Right
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
</row>
|
||||
<row interlinespace="2.5mm">
|
||||
<cell alignment="center" valignment="top" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
\begin_inset Graphics
|
||||
filename ../images/math-macro-add-greedy-optional-param.png
|
||||
BoundingBox 0bp 5bp 20bp 25bp
|
||||
rotateOrigin center
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
<cell alignment="center" valignment="top" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
\family sans
|
||||
Edit\SpecialChar \menuseparator
|
||||
Math\SpecialChar \menuseparator
|
||||
Macro
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
Definition\SpecialChar \menuseparator
|
||||
Remove Last Argument
|
||||
\begin_inset Newline newline
|
||||
\end_inset
|
||||
|
||||
|
||||
\begin_inset ERT
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
|
||||
\backslash
|
||||
hphantom{
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
Edit\SpecialChar \menuseparator
|
||||
Math\SpecialChar \menuseparator
|
||||
Macro
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
Definition\SpecialChar \menuseparator
|
||||
|
||||
\begin_inset ERT
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
}
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
Spitting Out To The Right
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
</row>
|
||||
</lyxtabular>
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
\begin_inset Newpage newpage
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Section
|
||||
Diagrams
|
||||
\end_layout
|
||||
@ -32515,13 +33083,24 @@ reference "sec:Matrices"
|
||||
In contrary to amscd diagrams, xymatrices supports diagonal and curved arrows,
|
||||
and much more.
|
||||
All possibilities to create commutative diagrams and decorations are explained
|
||||
in detail in this manual:
|
||||
\begin_inset CommandInset href
|
||||
LatexCommand href
|
||||
target "http://wiki.lyx.org/LyX/XY-pic#xy-manual"
|
||||
|
||||
in detail in the
|
||||
\emph on
|
||||
XY-pic manual
|
||||
\emph default
|
||||
that you find in the menu
|
||||
\family sans
|
||||
Help\SpecialChar \menuseparator
|
||||
Specific
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
Manuals\SpecialChar \menuseparator
|
||||
XY-pic
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
Manual
|
||||
\family default
|
||||
.
|
||||
\end_layout
|
||||
|
||||
|
@ -23174,369 +23174,24 @@ Math ! Macros
|
||||
\end_inset
|
||||
|
||||
|
||||
\begin_inset CommandInset label
|
||||
LatexCommand label
|
||||
name "sec:math-macros"
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
LyX allows you to define macros for formulas.
|
||||
For example we assume that solutions of the quadratic equation often occur
|
||||
in our document in various forms and we want to create a macro to print
|
||||
them.
|
||||
\begin_inset Newline newline
|
||||
\end_inset
|
||||
|
||||
The general form of a quadratic equation is:
|
||||
\begin_inset Formula \[
|
||||
0=\lambda^{2}+p\lambda+q\]
|
||||
|
||||
\end_inset
|
||||
|
||||
The general form of its solution is:
|
||||
\begin_inset Formula \[
|
||||
\lambda_{1,2}=-\frac{p}{2}\pm\sqrt{\frac{p^{2}}{4}-q}\]
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
The macro should print the parameters
|
||||
\begin_inset Formula $\lambda$
|
||||
\end_inset
|
||||
|
||||
,
|
||||
\begin_inset Formula $p$
|
||||
\end_inset
|
||||
|
||||
and
|
||||
\begin_inset Formula $q$
|
||||
\end_inset
|
||||
|
||||
like in the equation above.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
A macro is created by executing the command
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
|
||||
\series bold
|
||||
math-macro
|
||||
\begin_inset ERT
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
|
||||
\backslash
|
||||
spce
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
Name
|
||||
\begin_inset ERT
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
|
||||
\backslash
|
||||
spce
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
Number
|
||||
LyX allows you to define macros for formulas what is very useful when you
|
||||
have in a document several times the same form of equations.
|
||||
Math macros are explained in section
|
||||
\emph on
|
||||
Math
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
of
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
Arguments
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
in the minibuffer at the bottom of the LyX screen.
|
||||
Name is the name of the new macro which mustn't contain numbers.
|
||||
The number of arguments can be a number in the range 1-9.
|
||||
If you want to define a macro without arguments, don't declare the number
|
||||
of arguments.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
We have three arguments and name the macro
|
||||
\begin_inset Quotes eld
|
||||
\end_inset
|
||||
|
||||
qE
|
||||
\begin_inset Quotes erd
|
||||
\end_inset
|
||||
|
||||
, so that the command is:
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
|
||||
\series bold
|
||||
math-macro
|
||||
\begin_inset ERT
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
|
||||
\backslash
|
||||
spce
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
qE
|
||||
\begin_inset ERT
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
|
||||
\backslash
|
||||
spce
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
3
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
This results in the following macro definition box:
|
||||
\begin_inset Graphics
|
||||
filename clipart/macrobox.png
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\begin_inset FormulaMacro
|
||||
\newcommand{\qE}[3]{#1_{1,\,2}=-\frac{#2}{2}\pm\sqrt{\frac{#2^{2}}{4}-#3}}
|
||||
{\textrm{qE: }#1\textrm{ , }#2\textrm{ , }#3}
|
||||
\end_inset
|
||||
|
||||
|
||||
\begin_inset Note Note
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
The first box is an image to show the behavior in the output.
|
||||
The second one is the definition box, that doesn't appear in the output.
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
The first blue box is for the definition, where you insert the formula via
|
||||
the math panel or commands.
|
||||
The placeholder for the arguments are inserted as a backslash and sharp
|
||||
followed by the argument number, e.
|
||||
\begin_inset space \thinspace{}
|
||||
\end_inset
|
||||
|
||||
g.
|
||||
\begin_inset space \space{}
|
||||
\end_inset
|
||||
|
||||
|
||||
\begin_inset Quotes eld
|
||||
\end_inset
|
||||
|
||||
|
||||
\backslash
|
||||
#1
|
||||
\begin_inset Quotes erd
|
||||
\end_inset
|
||||
|
||||
for the first argument.
|
||||
Placeholders will be displayed in red.
|
||||
The second blue box is for the appearance in LyX.
|
||||
This is useful when you have a large structure that shouldn't be displayed
|
||||
in LyX with its full size.
|
||||
If you want to see the macro as it is defined, leave the box blank.
|
||||
In our example we insert the sequence
|
||||
\begin_inset Newline newline
|
||||
\end_inset
|
||||
|
||||
|
||||
\series bold
|
||||
qE:
|
||||
\backslash
|
||||
#1
|
||||
\series default
|
||||
|
||||
\series bold
|
||||
,
|
||||
\series default
|
||||
|
||||
\series bold
|
||||
|
||||
\backslash
|
||||
#2
|
||||
\series default
|
||||
|
||||
\series bold
|
||||
,
|
||||
\series default
|
||||
|
||||
\series bold
|
||||
|
||||
\backslash
|
||||
#3
|
||||
\begin_inset Newline newline
|
||||
\end_inset
|
||||
|
||||
|
||||
\series default
|
||||
The macro will then be shown as the macro name followed by the three arguments.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
To use the macro in a formula, type its name as command, in our case
|
||||
\begin_inset Quotes eld
|
||||
\end_inset
|
||||
|
||||
|
||||
\series bold
|
||||
|
||||
\backslash
|
||||
qE
|
||||
\series default
|
||||
|
||||
\begin_inset Quotes erd
|
||||
\end_inset
|
||||
|
||||
.
|
||||
The macro is inserted with boxes for the arguments looking similar to this:
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
\align center
|
||||
\begin_inset Graphics
|
||||
filename clipart/macrouse.png
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
The arguments are inserted in the blue boxes.
|
||||
If the cursor is outside the macro, the arguments are put in the macro.
|
||||
To change the arguments, put the cursor in the formula before or after
|
||||
the macro and press the right or left arrow key respectively.
|
||||
The arguments appear now again below the macro definition.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
If you change the macro definition all macros are changed automatically
|
||||
to the new definition.
|
||||
Here an example of our macro with the arguments
|
||||
\begin_inset Formula $x$
|
||||
\end_inset
|
||||
|
||||
,
|
||||
\begin_inset Formula $\ln(x)$
|
||||
\end_inset
|
||||
|
||||
, and
|
||||
\begin_inset Formula $B$
|
||||
\end_inset
|
||||
|
||||
:
|
||||
\begin_inset Formula \[
|
||||
\qE x{\ln(y)}B\]
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
When the document is exported to LaTeX, the macro definition will be inserted
|
||||
as the command:
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
|
||||
\series bold
|
||||
|
||||
\backslash
|
||||
newcommand{
|
||||
\backslash
|
||||
qE}[3]{#1_{1,
|
||||
\backslash
|
||||
,2}=-
|
||||
\backslash
|
||||
frac{#2}{2}
|
||||
\backslash
|
||||
pm
|
||||
\begin_inset Newline newline
|
||||
\end_inset
|
||||
|
||||
|
||||
\begin_inset ERT
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
|
||||
\backslash
|
||||
hphantom{
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\backslash
|
||||
newcommand
|
||||
\begin_inset ERT
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
}
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\backslash
|
||||
sqrt{
|
||||
\backslash
|
||||
frac{#2^{2}}{4}-#3}}
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
The command is not inserted in the document preamble.
|
||||
That means you can only use macros in formulas that are below the macro
|
||||
definition box in your document.
|
||||
There are also some other restrictions: The command
|
||||
\backslash
|
||||
newcommand supports optional arguments, which are not available in LyX's
|
||||
macros.
|
||||
You can also not change subsequently the name of the macro and the number
|
||||
of arguments.
|
||||
|
||||
Macros
|
||||
\emph default
|
||||
of the
|
||||
\emph on
|
||||
Math
|
||||
\emph default
|
||||
manual.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Section
|
||||
@ -27725,18 +27380,12 @@ x^{2}-2x-2\Rightarrow\question{x_{1}}\answer{x_{2}}=1\question{+\sqrt{3}}\answer
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
Inside math, the same effect can be achieved using math macros, see section
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
|
||||
\begin_inset CommandInset ref
|
||||
LatexCommand ref
|
||||
reference "sec:math-macros"
|
||||
|
||||
\end_inset
|
||||
|
||||
.
|
||||
Inside math, the same effect can be achieved using math macros, see the
|
||||
|
||||
\emph on
|
||||
Math
|
||||
\emph default
|
||||
manual.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Section
|
||||
@ -35058,11 +34707,11 @@ Unfolds/folds the current math macro.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
More about math macros will be described in the
|
||||
Math macros are described in the
|
||||
\emph on
|
||||
Math
|
||||
\emph default
|
||||
manual.??
|
||||
manual.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Subsection
|
||||
@ -38673,7 +38322,17 @@ Toolbar ! Table
|
||||
\emph on
|
||||
Embedded Objects
|
||||
\emph default
|
||||
manual, the math macro toolbar in the
|
||||
manual, the math macro toolbar
|
||||
\begin_inset Index
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
Toolbar ! Macro
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
in the
|
||||
\emph on
|
||||
Math
|
||||
\emph default
|
||||
|
BIN
lib/doc/clipart/MacroToolbar.png
Normal file
BIN
lib/doc/clipart/MacroToolbar.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
@ -32013,7 +32013,7 @@ Makro
|
||||
|
||||
|
||||
\begin_inset FormulaMacro
|
||||
\renewcommand{\qG}[4][1,\,2]{#2_{#1}=-\frac{#3}{2}\pm\sqrt{\frac{#3^{2}}{4}-#4}}
|
||||
\newcommand{\qG}[4][1,\,2]{#2_{#1}=-\frac{#3}{2}\pm\sqrt{\frac{#3^{2}}{4}-#4}}
|
||||
\end_inset
|
||||
|
||||
|
||||
@ -32281,6 +32281,480 @@ reference "sub:Der-Befehl-newcommand"
|
||||
nicht als Makro erzeugt werden.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
Wenn der Cursor in einer Makrodefinitionsbox ist, wird die Makro-Werkzeugleiste
|
||||
in LyX angezeigt:
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
\begin_inset VSpace defskip
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
\begin_inset Graphics
|
||||
filename ../clipart/MacroToolbar.png
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\begin_inset Index
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
Makros ! Werkzeugleiste
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
\begin_inset VSpace defskip
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
Die Makro-Werkzeugleiste enthält von links nach rechts die folgenden Knöpfe:
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
\begin_inset VSpace defskip
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
\begin_inset Tabular
|
||||
<lyxtabular version="3" rows="9" columns="2">
|
||||
<features islongtable="true">
|
||||
<column alignment="left" valignment="top" width="0">
|
||||
<column alignment="left" valignment="top" width="85col%">
|
||||
<row interlinespace="2.5mm">
|
||||
<cell alignment="center" valignment="top" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
\begin_inset Graphics
|
||||
filename ../../images/math-macro-remove-param.png
|
||||
BoundingBox 0bp 5bp 20bp 25bp
|
||||
rotateOrigin center
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
<cell alignment="center" valignment="top" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
\family sans
|
||||
Bearbeiten\SpecialChar \menuseparator
|
||||
Mathe\SpecialChar \menuseparator
|
||||
Makro-Definition\SpecialChar \menuseparator
|
||||
Argument hinzufügen
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
</row>
|
||||
<row interlinespace="2.5mm">
|
||||
<cell alignment="center" valignment="top" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
\begin_inset Graphics
|
||||
filename ../../images/math-macro-add-param.png
|
||||
BoundingBox 0bp 5bp 20bp 25bp
|
||||
rotateOrigin center
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
<cell alignment="center" valignment="top" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
\family sans
|
||||
Bearbeiten\SpecialChar \menuseparator
|
||||
Mathe\SpecialChar \menuseparator
|
||||
Makro-Definition\SpecialChar \menuseparator
|
||||
Letztes Argument entfernen
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
</row>
|
||||
<row interlinespace="2.5mm">
|
||||
<cell alignment="center" valignment="top" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
\begin_inset Graphics
|
||||
filename ../../images/math-macro-make-optional.png
|
||||
BoundingBox 0bp 5bp 20bp 25bp
|
||||
rotateOrigin center
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
<cell alignment="center" valignment="top" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
\family sans
|
||||
Bearbeiten\SpecialChar \menuseparator
|
||||
Mathe\SpecialChar \menuseparator
|
||||
Makro-Definition\SpecialChar \menuseparator
|
||||
Das erste nicht-optionale
|
||||
\begin_inset Newline newline
|
||||
\end_inset
|
||||
|
||||
|
||||
\begin_inset ERT
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
|
||||
\backslash
|
||||
hphantom{
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
Bearbeiten\SpecialChar \menuseparator
|
||||
Mathe\SpecialChar \menuseparator
|
||||
Makro-Definition\SpecialChar \menuseparator
|
||||
|
||||
\begin_inset ERT
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
}
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
Argument in einen optionales
|
||||
\begin_inset Newline newline
|
||||
\end_inset
|
||||
|
||||
|
||||
\begin_inset ERT
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
|
||||
\backslash
|
||||
hphantom{
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
Bearbeiten\SpecialChar \menuseparator
|
||||
Mathe\SpecialChar \menuseparator
|
||||
Makro-Definition\SpecialChar \menuseparator
|
||||
|
||||
\begin_inset ERT
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
}
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
ändern
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
</row>
|
||||
<row interlinespace="2.5mm">
|
||||
<cell alignment="center" valignment="top" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
\begin_inset Graphics
|
||||
filename ../../images/math-macro-make-nonoptional.png
|
||||
BoundingBox 0bp 5bp 20bp 25bp
|
||||
rotateOrigin center
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
<cell alignment="center" valignment="top" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
\family sans
|
||||
Bearbeiten\SpecialChar \menuseparator
|
||||
Mathe\SpecialChar \menuseparator
|
||||
Makro-Definition\SpecialChar \menuseparator
|
||||
Das letzte optionale Argument in
|
||||
\begin_inset Newline newline
|
||||
\end_inset
|
||||
|
||||
|
||||
\begin_inset ERT
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
|
||||
\backslash
|
||||
hphantom{
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
Bearbeiten\SpecialChar \menuseparator
|
||||
Mathe\SpecialChar \menuseparator
|
||||
Makro-Definition\SpecialChar \menuseparator
|
||||
|
||||
\begin_inset ERT
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
}
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
einen nicht-optionales ändern
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
</row>
|
||||
<row interlinespace="2.5mm">
|
||||
<cell alignment="center" valignment="top" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
\begin_inset Graphics
|
||||
filename ../../images/math-macro-remove-optional-param.png
|
||||
BoundingBox 0bp 5bp 20bp 25bp
|
||||
rotateOrigin center
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
<cell alignment="center" valignment="top" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
\family sans
|
||||
Bearbeiten\SpecialChar \menuseparator
|
||||
Mathe\SpecialChar \menuseparator
|
||||
Makro-Definition\SpecialChar \menuseparator
|
||||
Optionales Argument einfügen
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
</row>
|
||||
<row interlinespace="2.5mm">
|
||||
<cell alignment="center" valignment="top" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
\begin_inset Graphics
|
||||
filename ../../images/math-macro-add-optional-param.png
|
||||
BoundingBox 0bp 5bp 20bp 25bp
|
||||
rotateOrigin center
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
<cell alignment="center" valignment="top" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
\family sans
|
||||
Bearbeiten\SpecialChar \menuseparator
|
||||
Mathe\SpecialChar \menuseparator
|
||||
Makro-Definition\SpecialChar \menuseparator
|
||||
Optionales Argument entfernen
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
</row>
|
||||
<row interlinespace="2.5mm">
|
||||
<cell alignment="center" valignment="top" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
\begin_inset Graphics
|
||||
filename ../../images/math-macro-remove-greedy-param.png
|
||||
BoundingBox 0bp 5bp 20bp 25bp
|
||||
rotateOrigin center
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
<cell alignment="center" valignment="top" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
\family sans
|
||||
Bearbeiten\SpecialChar \menuseparator
|
||||
Mathe\SpecialChar \menuseparator
|
||||
Makro-Definition\SpecialChar \menuseparator
|
||||
Letztes Argument rechts entfernen
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
</row>
|
||||
<row interlinespace="2.5mm">
|
||||
<cell alignment="center" valignment="top" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
\begin_inset Graphics
|
||||
filename ../../images/math-macro-append-greedy-param.png
|
||||
BoundingBox 0bp 5bp 20bp 25bp
|
||||
rotateOrigin center
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
<cell alignment="center" valignment="top" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
\family sans
|
||||
Bearbeiten\SpecialChar \menuseparator
|
||||
Mathe\SpecialChar \menuseparator
|
||||
Makro-Definition\SpecialChar \menuseparator
|
||||
Argument von rechts hinzufügen
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
</row>
|
||||
<row interlinespace="2.5mm">
|
||||
<cell alignment="center" valignment="top" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
\begin_inset Graphics
|
||||
filename ../../images/math-macro-add-greedy-optional-param.png
|
||||
BoundingBox 0bp 5bp 20bp 25bp
|
||||
rotateOrigin center
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
<cell alignment="center" valignment="top" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
\family sans
|
||||
Bearbeiten\SpecialChar \menuseparator
|
||||
Mathe\SpecialChar \menuseparator
|
||||
Makro-Definition\SpecialChar \menuseparator
|
||||
Optionales Argument von rechts
|
||||
\begin_inset Newline newline
|
||||
\end_inset
|
||||
|
||||
|
||||
\begin_inset ERT
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
|
||||
\backslash
|
||||
hphantom{
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
Bearbeiten\SpecialChar \menuseparator
|
||||
Mathe\SpecialChar \menuseparator
|
||||
Makro-Definition\SpecialChar \menuseparator
|
||||
|
||||
\begin_inset ERT
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
}
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
hinzufügen
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
</row>
|
||||
</lyxtabular>
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Section
|
||||
Diagramme
|
||||
\end_layout
|
||||
@ -32628,18 +33102,21 @@ reference "sec:Matrizen"
|
||||
Im Gegensatz zu amscd Diagrammen, unterstützen Xymatrixen diagonale und
|
||||
gekrümmte Pfeile und vieles mehr.
|
||||
Alle Möglichkeiten kommutative Diagramme und Dekorationen zu erzeugen,
|
||||
sind im Detail in diesem Handbuch erklärt:
|
||||
\begin_inset Newline newline
|
||||
sind im Detail im
|
||||
\emph on
|
||||
XY-pic-Handbuch
|
||||
\emph default
|
||||
erklärt, dass im Menü
|
||||
\family sans
|
||||
Hilfe\SpecialChar \menuseparator
|
||||
Spezielle
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
|
||||
\begin_inset CommandInset href
|
||||
LatexCommand href
|
||||
target "http://wiki.lyx.org/LyX/XY-pic#xy-manual"
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
Handbücher\SpecialChar \menuseparator
|
||||
XY-pic-Handbuch
|
||||
\family default
|
||||
zu finden ist.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
|
@ -108,7 +108,7 @@ Das LyX-Benutzerhandbuch
|
||||
|
||||
|
||||
\size large
|
||||
Version 2.0svn
|
||||
Version 1.6.x
|
||||
\end_layout
|
||||
|
||||
\begin_layout Author
|
||||
@ -161,8 +161,8 @@ type "mailto:"
|
||||
\end_layout
|
||||
|
||||
\begin_layout Date
|
||||
letzte Änderung: 29.
|
||||
November 2008
|
||||
letzte Änderung: 7.
|
||||
Dezember 2008
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
@ -27447,428 +27447,32 @@ reference "eq:fifth-eqn"
|
||||
\end_layout
|
||||
|
||||
\begin_layout Section
|
||||
Benutzerdefinierte Makros
|
||||
Benutzerdefinierte Mathe-Makros
|
||||
\begin_inset Index
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
Makro
|
||||
Makros
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
im
|
||||
\family typewriter
|
||||
Mathe-Modus
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
LyX erlaubt dem Benutzer, Makros zu definieren.
|
||||
Wenn Sie wie in Abschnitt
|
||||
\begin_inset CommandInset ref
|
||||
LatexCommand vref
|
||||
reference "Makro-erzeugen"
|
||||
|
||||
\end_inset
|
||||
|
||||
ein Makro erzeugt haben, erscheint an der Cursorposition ein Makro-Definitionsk
|
||||
ästchen, das in etwa so aussieht:
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
\begin_inset space \hfill{}
|
||||
\end_inset
|
||||
|
||||
|
||||
\begin_inset Tabular
|
||||
<lyxtabular version="3" rows="1" columns="1">
|
||||
<features>
|
||||
<column alignment="center" valignment="top" width="0pt">
|
||||
<row>
|
||||
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
Makro: Makroname:
|
||||
\begin_inset Formula $\Box$
|
||||
\end_inset
|
||||
|
||||
|
||||
\begin_inset Formula $\Box$
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
</row>
|
||||
</lyxtabular>
|
||||
|
||||
\end_inset
|
||||
|
||||
.
|
||||
\begin_inset space \hfill{}
|
||||
\end_inset
|
||||
|
||||
|
||||
\begin_inset FormulaMacro
|
||||
\newcommand{\Makroname}{}
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
Dabei ist die die Umrandung rot, und die beiden
|
||||
\begin_inset Formula $\Box$
|
||||
\end_inset
|
||||
|
||||
sind doppelte blaue Rechtecke, die wie im Mathed editiert werden können.
|
||||
Wenn Sie dies in LyX lesen, probieren Sie es.
|
||||
Der Inhalt des ersten Rechtecks wird während des Exports nach LaTeX benutzt,
|
||||
der Inhalt des zweiten zur Makro-Expansion auf dem Bildschirm.
|
||||
Normalerweise sind beide Inhalte gleich, so dass man das zweite Rechteck
|
||||
leer lassen kann.
|
||||
LyX wird dann den Inhalt des ersten Rechtecks automatisch für Export und
|
||||
Expansion benutzen.
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
\begin_inset FormulaMacro
|
||||
\newcommand{\macro}{a+b}
|
||||
\end_inset
|
||||
|
||||
Wollen Sie das Makro
|
||||
\begin_inset Tabular
|
||||
<lyxtabular version="3" rows="1" columns="1">
|
||||
<features>
|
||||
<column alignment="center" valignment="top" width="0pt">
|
||||
<row>
|
||||
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
Makro: macro: a + b
|
||||
\begin_inset Formula $\Box$
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
</row>
|
||||
</lyxtabular>
|
||||
|
||||
\end_inset
|
||||
|
||||
in anderen Mathed-Kästchen benutzen, müssen Sie nur seinen Namen im LaTeX-Modus
|
||||
schreiben, in diesem Fall
|
||||
\family typewriter
|
||||
|
||||
\backslash
|
||||
macro
|
||||
\family default
|
||||
, und er wird automatisch umgewandelt wie hier:
|
||||
\begin_inset Formula $c=\macro$
|
||||
\end_inset
|
||||
|
||||
.
|
||||
Wie Sie bemerken werden, können Sie den Cursor nicht ins Makro stellen,
|
||||
denn es wird als einzelnes Zeichen behandelt.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
Bei Makros mit
|
||||
Dies ist von großem Nutzen wenn man in einem Dokument mehrfach denselben
|
||||
Formeltyp hat.
|
||||
Mathe-Makros sind im Abschnitt
|
||||
\emph on
|
||||
Argumenten
|
||||
Mathe-Makro
|
||||
\emph default
|
||||
aber kann man den Cursor in das Makro stellen.
|
||||
In einer Makrodefinition sieht ein Argument aus wie ein # mit einer Nummer
|
||||
dahinter:
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
\begin_inset space \hfill{}
|
||||
\end_inset
|
||||
|
||||
|
||||
\begin_inset Tabular
|
||||
<lyxtabular version="3" rows="1" columns="1">
|
||||
<features>
|
||||
<column alignment="center" valignment="top" width="0pt">
|
||||
<row>
|
||||
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
|
||||
\begin_inset Text
|
||||
|
||||
\begin_layout Plain Layout
|
||||
Makro: macrowarg: 2 +
|
||||
\begin_inset Formula $\sqrt{\#1}$
|
||||
\end_inset
|
||||
|
||||
|
||||
\begin_inset Formula $\Box$
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
</cell>
|
||||
</row>
|
||||
</lyxtabular>
|
||||
|
||||
\end_inset
|
||||
|
||||
.
|
||||
\begin_inset space \hfill{}
|
||||
\end_inset
|
||||
|
||||
|
||||
\begin_inset FormulaMacro
|
||||
\newcommand{\macrowarg}[1]{2+\sqrt{#1}}
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
Benutzt man das Makro, wird das bekannte blaue Rechteck erscheinen, in das
|
||||
Sie dann als Argument schreiben können, was immer Sie wollen:
|
||||
\family typewriter
|
||||
|
||||
\backslash
|
||||
macrowarg =
|
||||
\begin_inset Formula $\macrowarg{\Box}$
|
||||
\end_inset
|
||||
|
||||
|
||||
\family default
|
||||
.
|
||||
Beispiel:
|
||||
\begin_inset Formula $b=\macrowarg{x-2}$
|
||||
\end_inset
|
||||
|
||||
.
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
Wenn man das Dokument als LaTeX exportiert, wird eine Makrodefinition in
|
||||
den Befehl
|
||||
\family typewriter
|
||||
|
||||
\backslash
|
||||
newcommand
|
||||
\family default
|
||||
umgesetzt, im letzten Beispiel also
|
||||
\end_layout
|
||||
|
||||
\begin_layout LyX-Code
|
||||
|
||||
\backslash
|
||||
newcommand{
|
||||
\backslash
|
||||
macrowarg}[1]{2+
|
||||
\backslash
|
||||
sqrt{#1}}.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Subsection
|
||||
Wie man Makros
|
||||
\begin_inset Index
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
Makro!erzeugen
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
erzeugt
|
||||
\begin_inset CommandInset label
|
||||
LatexCommand label
|
||||
name "Makro-erzeugen"
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
Um ein Makro zu definieren, schreiben Sie in as Befehlseingabefenster (
|
||||
\family sans
|
||||
Alt+X
|
||||
\family default
|
||||
oder
|
||||
\family sans
|
||||
Ansicht\SpecialChar \menuseparator
|
||||
Werkzeugleisten\SpecialChar \menuseparator
|
||||
Befehlseingabefenster
|
||||
\family default
|
||||
) folgendes:
|
||||
\begin_inset Foot
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
\noun on
|
||||
HHa
|
||||
\noun default
|
||||
: Makros dürfen nicht in Überschriften definiert werden!
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
|
||||
\family typewriter
|
||||
math-macro <Makroname> [Zahl der Argumente]
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
|
||||
\family typewriter
|
||||
|
||||
\backslash
|
||||
macro
|
||||
\family default
|
||||
zum Beispiel wurde mit
|
||||
\begin_inset Quotes pld
|
||||
\end_inset
|
||||
|
||||
|
||||
\family typewriter
|
||||
math-macro macro
|
||||
\family default
|
||||
|
||||
\begin_inset Quotes grd
|
||||
\end_inset
|
||||
|
||||
erzeugt und
|
||||
\family typewriter
|
||||
|
||||
\backslash
|
||||
macrowarg
|
||||
\family default
|
||||
mit
|
||||
\begin_inset Quotes pld
|
||||
\end_inset
|
||||
|
||||
|
||||
\family typewriter
|
||||
math-macro macrowarg 1
|
||||
\family default
|
||||
|
||||
\begin_inset Quotes grd
|
||||
\end_inset
|
||||
|
||||
.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
Wenn Sie den Cursor in das Makrokästchen stellen, können Sie eine Argumentmarke
|
||||
setzen, indem Sie
|
||||
\family typewriter
|
||||
#<Zahl>
|
||||
\family default
|
||||
eingeben oder im Befehlspuffer folgendes schreiben:
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
|
||||
\family typewriter
|
||||
math-macro-arg <Zahl>
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
Die Argumentmarke in
|
||||
\family typewriter
|
||||
|
||||
\backslash
|
||||
macrowarg
|
||||
\family default
|
||||
wurde mit
|
||||
\begin_inset Quotes pld
|
||||
\end_inset
|
||||
|
||||
|
||||
\family typewriter
|
||||
math-macro-arg 1
|
||||
\family default
|
||||
|
||||
\begin_inset Quotes grd
|
||||
\end_inset
|
||||
|
||||
eingefügt.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
Sie dürfen höchstens 9 Argumente benutzen, nummeriert von 1 bis 9.
|
||||
Eine Argumentmarke kann mehrfach benutzt werden, aber natürlich nur einmal
|
||||
mit einem Argument versorgt werden.
|
||||
Eine Argumentnummer darf nicht größer sein als die bei der Makrodefinition
|
||||
festgelegte.
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Subsection
|
||||
Wie man sich im Makro
|
||||
\begin_inset Index
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
Makro!sich darin bewegen
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
bewegt
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
Mit
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
den
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
Pfeiltasten: Wenn man in ein Makro von links hineingeht, wird der Cursor
|
||||
im ersten Argument stehen.
|
||||
Mit der
|
||||
\family sans
|
||||
Tab
|
||||
\family default
|
||||
-Taste gelangt man zum nächsten.
|
||||
Mit der
|
||||
\family sans
|
||||
Leertaste
|
||||
\family default
|
||||
verlässt man das Makro, und der Cursor steht dann rechts neben ihm.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
Mit
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
der
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
Maus: Wie gewöhnlich klicken Sie auf das gewünschte Argumentkästchen.
|
||||
Manchmal, wenn das Kästchen leer oder zu klein ist, schlägt das fehl.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
Zur Zeit kann man nur Befehlsmakros schreiben, aber keine Umgebungsmakros.
|
||||
s des
|
||||
\emph on
|
||||
Mathe
|
||||
\emph default
|
||||
Handbuchs beschrieben.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Section
|
||||
|
@ -32511,7 +32511,7 @@ D@<<j<E@>k>>F@=C
|
||||
\begin_layout Subsection
|
||||
Diagramas xymatrix
|
||||
\begin_inset Index
|
||||
status open
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
Diagramas ! xymatrix
|
||||
@ -32554,13 +32554,35 @@ reference "sec:Matrices"
|
||||
A diferencia de los diagramas amscd, las matrices xy soportan flechas diagonales
|
||||
y curvadas, y mucho más.
|
||||
Todas las posibilidades para generar diagamas conmutativos y decoraciones
|
||||
se explican en este manual:
|
||||
\begin_inset CommandInset href
|
||||
LatexCommand href
|
||||
target "http://wiki.lyx.org/LyX/XY-pic#xy-manual"
|
||||
|
||||
se explican en
|
||||
\lang english
|
||||
the
|
||||
\lang spanish
|
||||
|
||||
\emph on
|
||||
manual de XY-pic
|
||||
\emph default
|
||||
\lang english
|
||||
that you find in the menu
|
||||
\lang spanish
|
||||
|
||||
\family sans
|
||||
Ayuda\SpecialChar \menuseparator
|
||||
Manuales
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
specíficos\SpecialChar \menuseparator
|
||||
Manual
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
de
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
XY-pic
|
||||
\family default
|
||||
.
|
||||
\end_layout
|
||||
|
||||
@ -32758,7 +32780,7 @@ r
|
||||
\family default
|
||||
se cambia en redonda.
|
||||
\begin_inset Foot
|
||||
status open
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
véase estilos de fuentes en
|
||||
|
@ -1,4 +1,4 @@
|
||||
#LyX 1.6.0 created this file. For more info see http://www.lyx.org/
|
||||
#LyX 1.6.1svn created this file. For more info see http://www.lyx.org/
|
||||
\lyxformat 345
|
||||
\begin_document
|
||||
\begin_header
|
||||
@ -140,7 +140,7 @@ type "mailto:"
|
||||
\begin_inset Newline newline
|
||||
\end_inset
|
||||
|
||||
Versión 2.0svn
|
||||
Versión 1.6.x
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
@ -28436,17 +28436,10 @@ x^{2}-2x-2\Rightarrow\question{x_{1}}\answer{x_{2}}=1\question{+\sqrt{3}}\answer
|
||||
|
||||
\begin_layout Standard
|
||||
En ecuaciones, se puede conseguir el mismo efecto usando macros de ecuación,
|
||||
véase la sección
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
|
||||
\begin_inset CommandInset ref
|
||||
LatexCommand ref
|
||||
reference "sec:Definición de macros"
|
||||
|
||||
\end_inset
|
||||
|
||||
véase el manual
|
||||
\emph on
|
||||
Ecuaciones
|
||||
\emph default
|
||||
.
|
||||
\end_layout
|
||||
|
||||
@ -28460,7 +28453,7 @@ name "sec:Propiedades-PDF"
|
||||
|
||||
|
||||
\begin_inset Index
|
||||
status open
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
Propiedades PDF
|
||||
@ -28488,7 +28481,7 @@ hyperref
|
||||
\series default
|
||||
|
||||
\begin_inset Index
|
||||
status open
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
LaTeX, paquetes ! hyperref
|
||||
@ -35836,7 +35829,11 @@ Despliega o pliega el macro de ecuación actual.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
Más sobre macros de ecuaciones en el manual
|
||||
|
||||
\lang english
|
||||
Math macros are described
|
||||
\lang spanish
|
||||
en el manual
|
||||
\emph on
|
||||
Ecuaciones.
|
||||
\end_layout
|
||||
@ -40354,7 +40351,17 @@ Barras de herramientas ! Tabla
|
||||
\emph on
|
||||
Objetos insertados
|
||||
\emph default
|
||||
, la de ecuaciones en el manual
|
||||
, la de macros
|
||||
\begin_inset Index
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
Barras de herramientas ! Macros
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
en el manual
|
||||
\emph on
|
||||
Ecuaciones
|
||||
\emph default
|
||||
|
@ -31738,7 +31738,7 @@ D@<<j<E@>k>>F@=C
|
||||
\begin_layout Subsection
|
||||
Les diagrammes xymatrix
|
||||
\begin_inset Index
|
||||
status open
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
Diagrammes ! xymatrix
|
||||
@ -31778,13 +31778,31 @@ reference "sec:Matrices"
|
||||
Contrairement aux diagrammes amscd, les xymatrices acceptent les flèches
|
||||
diagonales ou courbes et plus encore.
|
||||
Toutes les possibilités pour créer des diagrammes commutatifs et leurs
|
||||
décorations sont expliquées en détail dans ce manuel:
|
||||
\begin_inset CommandInset href
|
||||
LatexCommand href
|
||||
target "http://wiki.lyx.org/LyX/XY-pic#xy-manual"
|
||||
|
||||
décorations sont expliquées en détail dans ce
|
||||
\emph on
|
||||
manuel pour XY-pic
|
||||
\emph default
|
||||
\lang english
|
||||
that you find in the menu
|
||||
\lang french
|
||||
|
||||
\family sans
|
||||
Aide\SpecialChar \menuseparator
|
||||
Manuels
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
spécifiques\SpecialChar \menuseparator
|
||||
Manuel
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
pour
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
XY-pic
|
||||
\family default
|
||||
.
|
||||
\end_layout
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#LyX 1.6.0 created this file. For more info see http://www.lyx.org/
|
||||
#LyX 1.6.1svn created this file. For more info see http://www.lyx.org/
|
||||
\lyxformat 345
|
||||
\begin_document
|
||||
\begin_header
|
||||
@ -182,7 +182,7 @@ eunier-Guttin-Cluzel
|
||||
\begin_inset Newline newline
|
||||
\end_inset
|
||||
|
||||
Version 2.0svn
|
||||
Version 1.6.x
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
@ -28928,17 +28928,10 @@ x^{2}-2x-2\Rightarrow\question{x_{1}}\reponse{x_{2}}=1\question{+\sqrt{3}}\repon
|
||||
|
||||
\begin_layout Standard
|
||||
À l'intérieur du mode math, on peut obtenir le même effet en utilisant des
|
||||
macros, voir section
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
|
||||
\begin_inset CommandInset ref
|
||||
LatexCommand ref
|
||||
reference "sec:Macros définies"
|
||||
|
||||
\end_inset
|
||||
|
||||
macros, voir le manuel
|
||||
\emph on
|
||||
Math
|
||||
\emph default
|
||||
.
|
||||
\end_layout
|
||||
|
||||
@ -39074,6 +39067,21 @@ Barre d'outils ! Tableau
|
||||
\emph on
|
||||
Objets insérés
|
||||
\emph default
|
||||
.
|
||||
et la barre d'outils macro
|
||||
\begin_inset Index
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
Barre d'outils ! Macro
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
dans le manuel
|
||||
\emph on
|
||||
Math
|
||||
\emph default
|
||||
.
|
||||
\end_layout
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user