mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 11:16:55 +00:00
Some spellchecker corrections
This commit is contained in:
parent
9267f177b9
commit
e7c3fe6abd
@ -1,53 +1,93 @@
|
|||||||
#LyX 1.5.2 created this file. For more info see http://www.lyx.org/
|
#LyX 2.2 created this file. For more info see http://www.lyx.org/
|
||||||
\lyxformat 276
|
\lyxformat 503
|
||||||
\begin_document
|
\begin_document
|
||||||
\begin_header
|
\begin_header
|
||||||
|
\origin unavailable
|
||||||
\textclass article
|
\textclass article
|
||||||
\language english
|
\use_default_options false
|
||||||
|
\maintain_unincluded_children false
|
||||||
|
\language british
|
||||||
|
\language_package default
|
||||||
\inputencoding auto
|
\inputencoding auto
|
||||||
\font_roman default
|
\fontencoding global
|
||||||
\font_sans default
|
\font_roman "default" "default"
|
||||||
\font_typewriter default
|
\font_sans "default" "default"
|
||||||
|
\font_typewriter "default" "default"
|
||||||
|
\font_math "auto" "auto"
|
||||||
\font_default_family default
|
\font_default_family default
|
||||||
|
\use_non_tex_fonts false
|
||||||
\font_sc false
|
\font_sc false
|
||||||
\font_osf false
|
\font_osf false
|
||||||
\font_sf_scale 100
|
\font_sf_scale 100 100
|
||||||
\font_tt_scale 100
|
\font_tt_scale 100 100
|
||||||
\graphics default
|
\graphics default
|
||||||
|
\default_output_format default
|
||||||
|
\output_sync 0
|
||||||
|
\bibtex_command default
|
||||||
|
\index_command default
|
||||||
\paperfontsize default
|
\paperfontsize default
|
||||||
|
\spacing single
|
||||||
|
\use_hyperref false
|
||||||
\papersize default
|
\papersize default
|
||||||
\use_geometry false
|
\use_geometry false
|
||||||
\use_amsmath 1
|
\use_package amsmath 1
|
||||||
\use_esint 1
|
\use_package amssymb 1
|
||||||
|
\use_package cancel 1
|
||||||
|
\use_package esint 1
|
||||||
|
\use_package mathdots 0
|
||||||
|
\use_package mathtools 1
|
||||||
|
\use_package mhchem 0
|
||||||
|
\use_package stackrel 1
|
||||||
|
\use_package stmaryrd 1
|
||||||
|
\use_package undertilde 1
|
||||||
\cite_engine basic
|
\cite_engine basic
|
||||||
|
\cite_engine_type default
|
||||||
|
\biblio_style plain
|
||||||
\use_bibtopic false
|
\use_bibtopic false
|
||||||
|
\use_indices false
|
||||||
\paperorientation portrait
|
\paperorientation portrait
|
||||||
|
\suppress_date false
|
||||||
|
\justification true
|
||||||
|
\use_refstyle 0
|
||||||
|
\index Index
|
||||||
|
\shortcut idx
|
||||||
|
\color #008000
|
||||||
|
\end_index
|
||||||
\secnumdepth 3
|
\secnumdepth 3
|
||||||
\tocdepth 3
|
\tocdepth 3
|
||||||
\paragraph_separation indent
|
\paragraph_separation indent
|
||||||
\defskip medskip
|
\paragraph_indentation default
|
||||||
\quotes_language english
|
\quotes_language english
|
||||||
\papercolumns 1
|
\papercolumns 1
|
||||||
\papersides 1
|
\papersides 1
|
||||||
\paperpagestyle default
|
\paperpagestyle default
|
||||||
\tracking_changes false
|
\tracking_changes false
|
||||||
|
\html_math_output 0
|
||||||
|
\html_css_as_file 0
|
||||||
\output_changes false
|
\output_changes false
|
||||||
\author ""
|
\html_be_strict false
|
||||||
\author ""
|
|
||||||
\end_header
|
\end_header
|
||||||
|
|
||||||
\begin_body
|
\begin_body
|
||||||
|
|
||||||
\begin_layout Title
|
\begin_layout Title
|
||||||
Dynamic Macros for LyX
|
Dynamic Macros for \SpecialChar LyX
|
||||||
|
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Author
|
\begin_layout Author
|
||||||
Stefan Schimanski
|
Stefan Schimanski
|
||||||
\newline
|
\begin_inset Newline newline
|
||||||
|
\end_inset
|
||||||
|
|
||||||
\begin_inset LatexCommand url
|
|
||||||
target "sts@1stein.org"
|
\begin_inset Flex URL
|
||||||
|
status collapsed
|
||||||
|
|
||||||
|
\begin_layout Plain Layout
|
||||||
|
|
||||||
|
sts@1stein.org
|
||||||
|
\end_layout
|
||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
|
|
||||||
@ -63,18 +103,21 @@ The old system
|
|||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
LyX has the concept of math macros for quite some time.
|
\SpecialChar LyX
|
||||||
In LyX 1.4 or 1.5 you can create one in your document by calling the
|
has the concept of math macros for quite some time.
|
||||||
|
In \SpecialChar LyX
|
||||||
|
1.4 or 1.5 you can create one in your document by calling the
|
||||||
\family typewriter
|
\family typewriter
|
||||||
math-macro
|
math-macro
|
||||||
\family default
|
\family default
|
||||||
command in the mini buffer.
|
command in the mini buffer.
|
||||||
Visually this results in something equivalent to a TeX macro:
|
Visually this results in something equivalent to a \SpecialChar TeX
|
||||||
|
macro:
|
||||||
\begin_inset listings
|
\begin_inset listings
|
||||||
inline false
|
inline false
|
||||||
status open
|
status open
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
|
|
||||||
|
|
||||||
\backslash
|
\backslash
|
||||||
@ -91,8 +134,9 @@ frac{1}{2}}
|
|||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
After LyX processed this, the command is available in math environments
|
After \SpecialChar LyX
|
||||||
in the same documents.
|
processed this, the command is available in math environments in
|
||||||
|
the same documents.
|
||||||
But internally there is nothing more than
|
But internally there is nothing more than
|
||||||
\series bold
|
\series bold
|
||||||
one
|
one
|
||||||
@ -104,13 +148,16 @@ one
|
|||||||
If two buffers use the same macro name with different definitions, you
|
If two buffers use the same macro name with different definitions, you
|
||||||
are in trouble.
|
are in trouble.
|
||||||
The behaviour is undefined.
|
The behaviour is undefined.
|
||||||
If you are lucky LyX will not crash.
|
If you are lucky \SpecialChar LyX
|
||||||
|
will not crash.
|
||||||
Nothing must be said about redefining a macro later in the document: the
|
Nothing must be said about redefining a macro later in the document: the
|
||||||
behaviour of LyX will not be what you expect.
|
behaviour of \SpecialChar LyX
|
||||||
|
will not be what you expect.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
LyX 1.4 and 1.5 do not show the support for this kind of macro very prominently.
|
\SpecialChar LyX
|
||||||
|
1.4 and 1.5 do not show the support for this kind of macro very prominently.
|
||||||
In fact it is described in the
|
In fact it is described in the
|
||||||
\begin_inset Quotes eld
|
\begin_inset Quotes eld
|
||||||
\end_inset
|
\end_inset
|
||||||
@ -131,7 +178,8 @@ Ctrl-L
|
|||||||
|
|
||||||
short cut to convert a raw
|
short cut to convert a raw
|
||||||
\backslash
|
\backslash
|
||||||
newcommand into a LyX math macro.
|
newcommand into a \SpecialChar LyX
|
||||||
|
math macro.
|
||||||
Hence the role of macro is more of a power user tool for users who know
|
Hence the role of macro is more of a power user tool for users who know
|
||||||
what they are doing.
|
what they are doing.
|
||||||
\end_layout
|
\end_layout
|
||||||
@ -143,7 +191,7 @@ A wish list for a new macro implementation
|
|||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
In the following usecases are shown which can be wished to be supported
|
In the following usecases are shown which can be wished to be supported
|
||||||
if macros are reimplemented.
|
if macros are reimplemented.
|
||||||
Most of them are not possible in the old implemention, or at least very
|
Most of them are not possible in the old implementation, or at least very
|
||||||
hard to do.
|
hard to do.
|
||||||
|
|
||||||
\end_layout
|
\end_layout
|
||||||
@ -178,10 +226,13 @@ newcommand
|
|||||||
\series bold
|
\series bold
|
||||||
not accessible
|
not accessible
|
||||||
\series default
|
\series default
|
||||||
as a LyX macro in another way, and then define the command as a native
|
as a \SpecialChar LyX
|
||||||
LyX math macro later.
|
macro in another way, and then define the command as a native \SpecialChar LyX
|
||||||
|
math
|
||||||
|
macro later.
|
||||||
All the uses of the old command should then turn into instances of the
|
All the uses of the old command should then turn into instances of the
|
||||||
LyX math macro.
|
\SpecialChar LyX
|
||||||
|
math macro.
|
||||||
|
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
@ -198,8 +249,8 @@ Rename
|
|||||||
\series bold
|
\series bold
|
||||||
Change the arity
|
Change the arity
|
||||||
\series default
|
\series default
|
||||||
of a macro (normaly probably increase it), maybe with a default value used
|
of a macro (normally probably increase it), maybe with a default value
|
||||||
in instances of the macro (possibly empty).
|
used in instances of the macro (possibly empty).
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Enumerate
|
\begin_layout Enumerate
|
||||||
@ -229,8 +280,9 @@ Moving
|
|||||||
\begin_layout Enumerate
|
\begin_layout Enumerate
|
||||||
|
|
||||||
\series bold
|
\series bold
|
||||||
\begin_inset LatexCommand label
|
\begin_inset CommandInset label
|
||||||
name "sub:listedit"
|
LatexCommand label
|
||||||
|
name "subsec:listedit"
|
||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
|
|
||||||
@ -265,8 +317,9 @@ editing behaviour
|
|||||||
of
|
of
|
||||||
\series bold
|
\series bold
|
||||||
|
|
||||||
\begin_inset LatexCommand ref
|
\begin_inset CommandInset ref
|
||||||
reference "sub:listedit"
|
LatexCommand ref
|
||||||
|
reference "subsec:listedit"
|
||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
|
|
||||||
@ -336,7 +389,7 @@ frac{#1}{#2}}
|
|||||||
\series bold
|
\series bold
|
||||||
Higher order
|
Higher order
|
||||||
\series default
|
\series default
|
||||||
substitution (or call-by-name text substition) like
|
substitution (or call-by-name text substitution) like
|
||||||
\family typewriter
|
\family typewriter
|
||||||
|
|
||||||
\backslash
|
\backslash
|
||||||
@ -409,7 +462,7 @@ redefine
|
|||||||
\series default
|
\series default
|
||||||
,
|
,
|
||||||
\series bold
|
\series bold
|
||||||
not accesible
|
not accessible
|
||||||
\series default
|
\series default
|
||||||
,
|
,
|
||||||
\series bold
|
\series bold
|
||||||
@ -528,8 +581,10 @@ A new approach
|
|||||||
The goal of a new macro approach must be to support as many use cases subsection
|
The goal of a new macro approach must be to support as many use cases subsection
|
||||||
1.2 as possible, or at least make an implementation possible of the remaining
|
1.2 as possible, or at least make an implementation possible of the remaining
|
||||||
ones.
|
ones.
|
||||||
Moreover a proper implementation better brings most of TeX's power of math
|
Moreover a proper implementation better brings most of \SpecialChar TeX
|
||||||
command into LyX.
|
's power of math
|
||||||
|
command into \SpecialChar LyX
|
||||||
|
.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
@ -558,7 +613,7 @@ spit out
|
|||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Itemize
|
\begin_layout Itemize
|
||||||
Macros are resolved again everytime it is redrawn on screen if the macro
|
Macros are resolved again every time it is redrawn on screen if the macro
|
||||||
definition changed which is valid at the position.
|
definition changed which is valid at the position.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
@ -675,22 +730,26 @@ aAbBCD
|
|||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
This process is done automatically, transparent to the user and in a fast
|
This process is done automatically, transparent to the user and in a fast
|
||||||
way everytime the macro is rendered and the definition has changed.
|
way every time the macro is rendered and the definition has changed.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
If you look at the produced TeX code of the
|
If you look at the produced \SpecialChar TeX
|
||||||
|
code of the
|
||||||
\family typewriter
|
\family typewriter
|
||||||
|
|
||||||
\backslash
|
\backslash
|
||||||
foo ABCD
|
foo ABCD
|
||||||
\family default
|
\family default
|
||||||
you will notice that it didn't change during all this eating and spitting.
|
you will notice that it didn't change during all this eating and spitting.
|
||||||
This is what you expect from a macro in TeX.
|
This is what you expect from a macro in \SpecialChar TeX
|
||||||
|
.
|
||||||
There the whole sense of command (i.e.
|
There the whole sense of command (i.e.
|
||||||
macros) is that you keep the same TeX code, independently from the macro
|
macros) is that you keep the same \SpecialChar TeX
|
||||||
definition.
|
code, independently from the macro definitio
|
||||||
This approach carries this over to the LyX world.
|
n.
|
||||||
|
This approach carries this over to the \SpecialChar LyX
|
||||||
|
world.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Subsection
|
\begin_layout Subsection
|
||||||
@ -736,9 +795,10 @@ MathData
|
|||||||
\family default
|
\family default
|
||||||
object.
|
object.
|
||||||
The macro updating though does changes of course.
|
The macro updating though does changes of course.
|
||||||
Technically this is true, semantically (taking the produced TeX code as
|
Technically this is true, semantically (taking the produced \SpecialChar TeX
|
||||||
semantics) it is not because nothing changes by eating/spitting or folding/unfo
|
code as semantics)
|
||||||
lding with the later output.
|
it is not because nothing changes by eating/spitting or folding/unfolding
|
||||||
|
with the later output.
|
||||||
To still allow these changes in
|
To still allow these changes in
|
||||||
\family typewriter
|
\family typewriter
|
||||||
MathData::metrics
|
MathData::metrics
|
||||||
@ -848,13 +908,14 @@ BufferView::processUpdateFlags
|
|||||||
\family default
|
\family default
|
||||||
very often.
|
very often.
|
||||||
This sounds slow, but it turned out that it is not noticable in fact.
|
This sounds slow, but it turned out that it is not noticable in fact.
|
||||||
In LyX 1.5 the same is done as well already.
|
In \SpecialChar LyX
|
||||||
|
1.5 the same is done as well already.
|
||||||
Maybe some optimisation could help though, but was not investigated.
|
Maybe some optimisation could help though, but was not investigated.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
To support master documents there will a last lookup (if the previous lookup
|
To support master documents there will a last lookup (if the previous lookup
|
||||||
were not successfull) by asking the master buffer.
|
were not successful) by asking the master buffer.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Subsection
|
\begin_layout Subsection
|
||||||
@ -865,8 +926,10 @@ File Format
|
|||||||
The file format concerning macros in the old macro implementation is not
|
The file format concerning macros in the old macro implementation is not
|
||||||
well defined.
|
well defined.
|
||||||
As described above there is a big difference between the visual semantics
|
As described above there is a big difference between the visual semantics
|
||||||
(what the user sees inside LyX 1.5) and the latex semantics (what LaTeX
|
(what the user sees inside \SpecialChar LyX
|
||||||
will make out of the document) are not the same.
|
1.5) and the latex semantics (what \SpecialChar LaTeX
|
||||||
|
will make
|
||||||
|
out of the document) are not the same.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
@ -892,14 +955,14 @@ Macro definitions are stored in the following way:
|
|||||||
inline false
|
inline false
|
||||||
status open
|
status open
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
|
|
||||||
|
|
||||||
\backslash
|
\backslash
|
||||||
begin_inset FormulaMacro
|
begin_inset FormulaMacro
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
|
|
||||||
|
|
||||||
\backslash
|
\backslash
|
||||||
@ -916,7 +979,7 @@ frac{-3}{#1}
|
|||||||
right)}
|
right)}
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
|
|
||||||
|
|
||||||
\backslash
|
\backslash
|
||||||
@ -929,12 +992,13 @@ end_inset
|
|||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
The resulting LaTeX code is as expected:
|
The resulting \SpecialChar LaTeX
|
||||||
|
code is as expected:
|
||||||
\begin_inset listings
|
\begin_inset listings
|
||||||
inline false
|
inline false
|
||||||
status open
|
status open
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
|
|
||||||
|
|
||||||
\backslash
|
\backslash
|
||||||
@ -961,19 +1025,20 @@ One Optional Argument
|
|||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
With one optional argument the LyX code looks like this:
|
With one optional argument the \SpecialChar LyX
|
||||||
|
code looks like this:
|
||||||
\begin_inset listings
|
\begin_inset listings
|
||||||
inline false
|
inline false
|
||||||
status open
|
status open
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
|
|
||||||
|
|
||||||
\backslash
|
\backslash
|
||||||
begin_inset FormulaMacro
|
begin_inset FormulaMacro
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
|
|
||||||
|
|
||||||
\backslash
|
\backslash
|
||||||
@ -990,7 +1055,7 @@ frac{-3}{#1}
|
|||||||
right)}
|
right)}
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
|
|
||||||
|
|
||||||
\backslash
|
\backslash
|
||||||
@ -999,12 +1064,13 @@ end_inset
|
|||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
|
|
||||||
and the LaTeX code again is the same:
|
and the \SpecialChar LaTeX
|
||||||
|
code again is the same:
|
||||||
\begin_inset listings
|
\begin_inset listings
|
||||||
inline false
|
inline false
|
||||||
status open
|
status open
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
|
|
||||||
|
|
||||||
\backslash
|
\backslash
|
||||||
@ -1031,30 +1097,34 @@ Multi Optional Argument Macro
|
|||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
More than one optional argument is not supported by LaTeX.
|
More than one optional argument is not supported by \SpecialChar LaTeX
|
||||||
|
.
|
||||||
There are several solutions to allow them by defining some custom
|
There are several solutions to allow them by defining some custom
|
||||||
\family typewriter
|
\family typewriter
|
||||||
|
|
||||||
\backslash
|
\backslash
|
||||||
newcommand
|
newcommand
|
||||||
\family default
|
\family default
|
||||||
, but this is not standarized.
|
, but this is not standardized.
|
||||||
It might make sense for LyX to also support those when importing, but this
|
It might make sense for \SpecialChar LyX
|
||||||
|
to also support those when importing, but this
|
||||||
is not implemented.
|
is not implemented.
|
||||||
Instead the new implementation will create valid standard LaTeX code by
|
Instead the new implementation will create valid standard \SpecialChar LaTeX
|
||||||
outputting what the user sees on screen in LyX:
|
code by outputting
|
||||||
|
what the user sees on screen in \SpecialChar LyX
|
||||||
|
:
|
||||||
\begin_inset listings
|
\begin_inset listings
|
||||||
inline false
|
inline false
|
||||||
status open
|
status open
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
|
|
||||||
|
|
||||||
\backslash
|
\backslash
|
||||||
begin_inset FormulaMacro
|
begin_inset FormulaMacro
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
|
|
||||||
|
|
||||||
\backslash
|
\backslash
|
||||||
@ -1073,7 +1143,7 @@ frac{#2}{82}
|
|||||||
right)}
|
right)}
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
|
|
||||||
|
|
||||||
\backslash
|
\backslash
|
||||||
@ -1082,12 +1152,13 @@ end_inset
|
|||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
|
|
||||||
with the LaTeX code:
|
with the \SpecialChar LaTeX
|
||||||
|
code:
|
||||||
\begin_inset listings
|
\begin_inset listings
|
||||||
inline false
|
inline false
|
||||||
status open
|
status open
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
|
|
||||||
|
|
||||||
\backslash
|
\backslash
|
||||||
@ -1116,7 +1187,7 @@ xyz without substituting the optional argument, e.g.
|
|||||||
inline false
|
inline false
|
||||||
status open
|
status open
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
|
|
||||||
|
|
||||||
\backslash
|
\backslash
|
||||||
@ -1125,12 +1196,15 @@ xyz
|
|||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
|
|
||||||
LyX will create the following LaTeX code when exporting to LaTeX:
|
\SpecialChar LyX
|
||||||
|
will create the following \SpecialChar LaTeX
|
||||||
|
code when exporting to \SpecialChar LaTeX
|
||||||
|
:
|
||||||
\begin_inset listings
|
\begin_inset listings
|
||||||
inline false
|
inline false
|
||||||
status open
|
status open
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
|
|
||||||
|
|
||||||
\backslash
|
\backslash
|
||||||
@ -1139,7 +1213,7 @@ xyz{28}
|
|||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
|
|
||||||
So the optional argument is not optional anymore after export, but explicit.
|
So the optional argument is not optional any more after export, but explicit.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Subsubsection
|
\begin_layout Subsubsection
|
||||||
@ -1156,7 +1230,8 @@ Last but not least, as in the old implementation you can use
|
|||||||
def
|
def
|
||||||
\family default
|
\family default
|
||||||
macros, i.e.
|
macros, i.e.
|
||||||
TeX style definitions.
|
\SpecialChar TeX
|
||||||
|
style definitions.
|
||||||
They don't support optional arguments.
|
They don't support optional arguments.
|
||||||
They don't support
|
They don't support
|
||||||
\begin_inset Quotes eld
|
\begin_inset Quotes eld
|
||||||
@ -1188,7 +1263,8 @@ Redefinition
|
|||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
On export LyX will correctly use
|
On export \SpecialChar LyX
|
||||||
|
will correctly use
|
||||||
\family typewriter
|
\family typewriter
|
||||||
|
|
||||||
\backslash
|
\backslash
|
||||||
@ -1201,7 +1277,8 @@ newcommand
|
|||||||
renewcommand
|
renewcommand
|
||||||
\family default
|
\family default
|
||||||
if needed.
|
if needed.
|
||||||
This is not visible in the LyX file format though.
|
This is not visible in the \SpecialChar LyX
|
||||||
|
file format though.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Subsection
|
\begin_layout Subsection
|
||||||
@ -1244,7 +1321,8 @@ foo
|
|||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
A second way to create them is to write down the LaTeX definition like
|
A second way to create them is to write down the \SpecialChar LaTeX
|
||||||
|
definition like
|
||||||
\family typewriter
|
\family typewriter
|
||||||
|
|
||||||
\backslash
|
\backslash
|
||||||
@ -1272,34 +1350,34 @@ The are the following actions defined:
|
|||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
\begin_inset Tabular
|
\begin_inset Tabular
|
||||||
<lyxtabular version="3" rows="12" columns="2">
|
<lyxtabular version="3" rows="12" columns="2">
|
||||||
<features>
|
<features tabularvalignment="middle">
|
||||||
<column alignment="center" valignment="top" leftline="true" width="0">
|
<column alignment="center" valignment="top">
|
||||||
<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
|
<column alignment="center" valignment="top">
|
||||||
<row topline="true" bottomline="true">
|
<row>
|
||||||
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
|
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
|
||||||
\begin_inset Text
|
\begin_inset Text
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
Action
|
Action
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
</cell>
|
</cell>
|
||||||
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
|
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
|
||||||
\begin_inset Text
|
\begin_inset Text
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
Menu
|
Menu
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
</cell>
|
</cell>
|
||||||
</row>
|
</row>
|
||||||
<row topline="true">
|
<row>
|
||||||
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
|
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
|
||||||
\begin_inset Text
|
\begin_inset Text
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
math-macro-unfold
|
math-macro-unfold
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
@ -1308,18 +1386,18 @@ math-macro-unfold
|
|||||||
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
|
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
|
||||||
\begin_inset Text
|
\begin_inset Text
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
View/Unfold Math Macro
|
View/Unfold Math Macro
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
</cell>
|
</cell>
|
||||||
</row>
|
</row>
|
||||||
<row topline="true">
|
<row>
|
||||||
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
|
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
|
||||||
\begin_inset Text
|
\begin_inset Text
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
math-macro-fold
|
math-macro-fold
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
@ -1328,18 +1406,18 @@ math-macro-fold
|
|||||||
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
|
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
|
||||||
\begin_inset Text
|
\begin_inset Text
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
View/Fold Math Macro
|
View/Fold Math Macro
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
</cell>
|
</cell>
|
||||||
</row>
|
</row>
|
||||||
<row topline="true">
|
<row>
|
||||||
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
|
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
|
||||||
\begin_inset Text
|
\begin_inset Text
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
math-macro-add-param
|
math-macro-add-param
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
@ -1348,18 +1426,18 @@ math-macro-add-param
|
|||||||
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
|
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
|
||||||
\begin_inset Text
|
\begin_inset Text
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
Edit/Math/Macro/Append Parameter
|
Edit/Math/Macro/Append Parameter
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
</cell>
|
</cell>
|
||||||
</row>
|
</row>
|
||||||
<row topline="true">
|
<row>
|
||||||
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
|
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
|
||||||
\begin_inset Text
|
\begin_inset Text
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
math-macro-remove-param
|
math-macro-remove-param
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
@ -1368,18 +1446,18 @@ math-macro-remove-param
|
|||||||
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
|
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
|
||||||
\begin_inset Text
|
\begin_inset Text
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
Edit/Math/Macro/Remove Last Parameter
|
Edit/Math/Macro/Remove Last Parameter
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
</cell>
|
</cell>
|
||||||
</row>
|
</row>
|
||||||
<row topline="true">
|
<row>
|
||||||
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
|
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
|
||||||
\begin_inset Text
|
\begin_inset Text
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
math-macro-append-greedy-param
|
math-macro-append-greedy-param
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
@ -1388,18 +1466,18 @@ math-macro-append-greedy-param
|
|||||||
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
|
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
|
||||||
\begin_inset Text
|
\begin_inset Text
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
Edit/Math/Macro/Append Parameter Eating From the Right
|
Edit/Math/Macro/Append Parameter Eating From the Right
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
</cell>
|
</cell>
|
||||||
</row>
|
</row>
|
||||||
<row topline="true">
|
<row>
|
||||||
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
|
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
|
||||||
\begin_inset Text
|
\begin_inset Text
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
math-macro-make-optional
|
math-macro-make-optional
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
@ -1408,18 +1486,18 @@ math-macro-make-optional
|
|||||||
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
|
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
|
||||||
\begin_inset Text
|
\begin_inset Text
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
Edit/Math/Macro/Make First Non-Optional into Optional Parameter
|
Edit/Math/Macro/Make First Non-Optional into Optional Parameter
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
</cell>
|
</cell>
|
||||||
</row>
|
</row>
|
||||||
<row topline="true">
|
<row>
|
||||||
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
|
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
|
||||||
\begin_inset Text
|
\begin_inset Text
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
math-macro-remove-greedy-param
|
math-macro-remove-greedy-param
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
@ -1428,18 +1506,18 @@ math-macro-remove-greedy-param
|
|||||||
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
|
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
|
||||||
\begin_inset Text
|
\begin_inset Text
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
Edit/Math/Macro/Remove Last Parameter Spitting Out To The Right
|
Edit/Math/Macro/Remove Last Parameter Spitting Out To The Right
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
</cell>
|
</cell>
|
||||||
</row>
|
</row>
|
||||||
<row topline="true">
|
<row>
|
||||||
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
|
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
|
||||||
\begin_inset Text
|
\begin_inset Text
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
math-macro-make-nonoptional
|
math-macro-make-nonoptional
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
@ -1448,18 +1526,18 @@ math-macro-make-nonoptional
|
|||||||
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
|
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
|
||||||
\begin_inset Text
|
\begin_inset Text
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
Edit/Math/Macro/Make Last Optional into Non-Optional Parameter
|
Edit/Math/Macro/Make Last Optional into Non-Optional Parameter
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
</cell>
|
</cell>
|
||||||
</row>
|
</row>
|
||||||
<row topline="true">
|
<row>
|
||||||
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
|
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
|
||||||
\begin_inset Text
|
\begin_inset Text
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
math-macro-add-optional-param
|
math-macro-add-optional-param
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
@ -1468,18 +1546,18 @@ math-macro-add-optional-param
|
|||||||
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
|
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
|
||||||
\begin_inset Text
|
\begin_inset Text
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
Edit/Math/Macro/Insert Optional Parameter
|
Edit/Math/Macro/Insert Optional Parameter
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
</cell>
|
</cell>
|
||||||
</row>
|
</row>
|
||||||
<row topline="true">
|
<row>
|
||||||
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
|
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
|
||||||
\begin_inset Text
|
\begin_inset Text
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
math-macro-remove-optional-param
|
math-macro-remove-optional-param
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
@ -1488,27 +1566,27 @@ math-macro-remove-optional-param
|
|||||||
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
|
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
|
||||||
\begin_inset Text
|
\begin_inset Text
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
Edit/Math/Macro/Remove Optional Parameter
|
Edit/Math/Macro/Remove Optional Parameter
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
</cell>
|
</cell>
|
||||||
</row>
|
</row>
|
||||||
<row topline="true" bottomline="true">
|
<row>
|
||||||
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
|
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
|
||||||
\begin_inset Text
|
\begin_inset Text
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
math-macro-add-greedy-optional-param
|
math-macro-add-greedy-optional-param
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
</cell>
|
</cell>
|
||||||
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
|
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
|
||||||
\begin_inset Text
|
\begin_inset Text
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Plain Layout
|
||||||
Edit/Math/Macro/Append Optional Parameter Eating From the Right
|
Edit/Math/Macro/Append Optional Parameter Eating From the Right
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
@ -1541,9 +1619,9 @@ Hence if the arity is increased (i.e.
|
|||||||
this is done greedily the macro tries to eat up another inset from the
|
this is done greedily the macro tries to eat up another inset from the
|
||||||
right.
|
right.
|
||||||
This is the natural way if you import a document and then start to define
|
This is the natural way if you import a document and then start to define
|
||||||
a macros with LyX's math macros.
|
a macros with \SpecialChar LyX
|
||||||
Then you want that the macros take the (existing) paramenters from the
|
's math macros.
|
||||||
right.
|
Then you want that the macros take the (existing) parameters from the right.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
@ -1553,7 +1631,7 @@ The second case is the non-greedy use case.
|
|||||||
out that your notation needs another index.
|
out that your notation needs another index.
|
||||||
Then you want to insert this non-greedily.
|
Then you want to insert this non-greedily.
|
||||||
All macro instances in your text should get another parameter without touching
|
All macro instances in your text should get another parameter without touching
|
||||||
the surrouindings.
|
the surroundings.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
@ -1569,7 +1647,7 @@ greedy
|
|||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
Some of the actions also take a paramenter to define the position to act
|
Some of the actions also take a parameter to define the position to act
|
||||||
on in the parameter list.
|
on in the parameter list.
|
||||||
E.g.
|
E.g.
|
||||||
you can write
|
you can write
|
||||||
@ -1584,8 +1662,8 @@ Folding/Unfolding
|
|||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
Sometimes it is desireable to switch to the TeX code of a macro instance,
|
Sometimes it is desirable to switch to the \SpecialChar TeX
|
||||||
i.e.
|
code of a macro instance, i.e.
|
||||||
without any substitution using the macro definition.
|
without any substitution using the macro definition.
|
||||||
This can be done with the fold/unfold actions.
|
This can be done with the fold/unfold actions.
|
||||||
You can use the
|
You can use the
|
||||||
@ -1655,7 +1733,7 @@ For implementing this one has to customize the
|
|||||||
\family typewriter
|
\family typewriter
|
||||||
MathInsetNest
|
MathInsetNest
|
||||||
\family default
|
\family default
|
||||||
a lot to handle the keypresses correctly, because it's probably not directly
|
a lot to handle the key presses correctly, because it's probably not directly
|
||||||
doable with
|
doable with
|
||||||
\family typewriter
|
\family typewriter
|
||||||
MathInsetNest
|
MathInsetNest
|
||||||
|
Loading…
Reference in New Issue
Block a user