-#LyX 2.1 created this file. For more info see http://www.lyx.org/
-\lyxformat 474
+#LyX 2.2 created this file. For more info see http://www.lyx.org/
+\lyxformat 503
\begin_document
\begin_header
+\origin /systemlyxdir/examples/
\textclass scrartcl
\begin_preamble
% DO NOT ALTER THIS PREAMBLE!!!
\language_package default
\inputencoding auto
\fontencoding global
-\font_roman default
-\font_sans default
-\font_typewriter default
-\font_math auto
+\font_roman "default" "default"
+\font_sans "default" "default"
+\font_typewriter "default" "default"
+\font_math "auto" "auto"
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
-\font_sf_scale 100
-\font_tt_scale 100
+\font_sf_scale 100 100
+\font_tt_scale 100 100
\graphics default
\default_output_format default
\output_sync 0
\end_inset
--pic in LyX
+-pic in \SpecialCharNoPassThru LyX
\end_layout
\begin_layout Author
\end_layout
\begin_layout Abstract
-With the recent versions of LyX and with the
+With the recent versions of \SpecialCharNoPassThru LyX
+ and with the
\family typewriter
preview
\family default
--style installed in the LaTeX-System, the graph drawing package
+-style installed in the \SpecialCharNoPassThru LaTeX
+-System, the graph drawing package
\family typewriter
\begin_inset ERT
\family default
--pic can be conveniently used inside LyX.
- Diagrams can be edited and displayed inside the main LyX editing window.
+-pic can be conveniently used inside \SpecialCharNoPassThru LyX
+.
+ Diagrams can be edited and displayed inside the main \SpecialCharNoPassThru LyX
+ editing window.
Here, we shall describe how to use the
\family typewriter
\family typewriter
xypic
\family default
- inside LyX in order to draw, to edit and to preview diagrams as typically
+ inside \SpecialCharNoPassThru LyX
+ in order to draw, to edit and to preview diagrams as typically
used in category theory, algebra, and related fields.
\end_layout
xypic
\family default
-package has long served as a convenient tool for easily constructing graphs
- and diagrams in LaTeX.
- Unfortunately, its use in LyX had long been restricted to the infamous
- TeX code boxes, meaning that the LyX editor could only display the LaTeX-source
+ and diagrams in \SpecialCharNoPassThru LaTeX
+.
+ Unfortunately, its use in \SpecialCharNoPassThru LyX
+ had long been restricted to the infamous
+ \SpecialCharNoPassThru TeX
+ code boxes, meaning that the \SpecialCharNoPassThru LyX
+ editor could only display the \SpecialCharNoPassThru LaTeX
+-source
and not the finished diagram.
The new
\family typewriter
preview
\family default
--style of LaTeX which is part of the AUCTeX project
+-style of \SpecialCharNoPassThru LaTeX
+ which is part of the AUC\SpecialCharNoPassThru TeX
+ project
\begin_inset CommandInset citation
LatexCommand cite
key "AUCTeX"
\family typewriter
xypic
\family default
--diagrams, constructed, displayed and interactively edited inside LyX.
+-diagrams, constructed, displayed and interactively edited inside \SpecialCharNoPassThru LyX
+.
\end_layout
\begin_layout Standard
\end_inset
--pic can be used from inside LyX, how diagrams can be created and edited.
- We have tested the following using LyX versions 1.3.7 up to 1.6, running under
+-pic can be used from inside \SpecialCharNoPassThru LyX
+, how diagrams can be created and edited.
+ We have tested the following using \SpecialCharNoPassThru LyX
+ versions 1.3.7 up to 1.6, running under
Windows
\begin_inset space \thinspace{}
\end_inset
\end_inset
--pic code inside the LyX-window, select it all and convert it to a graphical
+-pic code inside the \SpecialCharNoPassThru LyX
+-window, select it all and convert it to a graphical
representation by pressing
\family sans
Ctrl-m
\end_inset
-pic more frequently, or if you want to modify your initial figure, you
- will want to assemble and modify your figures using LyX's math editor.
+ will want to assemble and modify your figures using \SpecialCharNoPassThru LyX
+'s math editor.
\end_layout
\end_layout
\begin_layout Standard
-In the first two sections of this documentation, we explain how to use LyX
+In the first two sections of this documentation, we explain how to use \SpecialCharNoPassThru LyX
in the first mentioned mode and we introduce all
\begin_inset ERT
status collapsed
\end_inset
-pic, rather our motivation is to give an introduction how the most important
- commands work inside LyX, since the keystrokes as explained in the
+ commands work inside \SpecialCharNoPassThru LyX
+, since the keystrokes as explained in the
\begin_inset ERT
status collapsed
\end_inset
- will not always function correctly inside LyX.
+ will not always function correctly inside \SpecialCharNoPassThru LyX
+.
\end_layout
\end_layout
\begin_layout Standard
-The following requires that the LaTeX-packages
+The following requires that the \SpecialCharNoPassThru LaTeX
+-packages
\family typewriter
xypic
\family default
\family typewriter
preview
\family default
- are installed in the LaTeX system.
+ are installed in the \SpecialCharNoPassThru LaTeX
+ system.
They are available from CTAN, see at
\begin_inset CommandInset citation
LatexCommand cite
.
After freshly installing them, it may be necessary, to run
\family sans
-Tools\SpecialChar \menuseparator
+Tools\SpecialChar menuseparator
Reconfigure
\family default
- from the main LyX menu.
- The steps to a first diagram output in LyX are then:
+ from the main \SpecialCharNoPassThru LyX
+ menu.
+ The steps to a first diagram output in \SpecialCharNoPassThru LyX
+ are then:
\end_layout
\begin_layout Enumerate
Activate and test
\family typewriter
preview
+\family default
+\begin_inset Separator parbreak
+\end_inset
+
\end_layout
\begin_deeper
\begin_layout Enumerate
-Open LyX, choose
+Open \SpecialCharNoPassThru LyX
+, choose
\family sans
-Tools\SpecialChar \menuseparator
-Preferences\SpecialChar \menuseparator
-Look and Feel\SpecialChar \menuseparator
+Tools\SpecialChar menuseparator
+Preferences\SpecialChar menuseparator
+Look and Feel\SpecialChar menuseparator
Display
\family default
and turn
\begin_layout Enumerate
In
\family sans
-Document\SpecialChar \menuseparator
-Settings\SpecialChar \menuseparator
+Document\SpecialChar menuseparator
+Settings\SpecialChar menuseparator
Math
\begin_inset space ~
\end_inset
\family typewriter
instant-preview
\family default
- works by opening a LyX-document and entering any math-formula, e.
+ works by opening a \SpecialCharNoPassThru LyX
+-document and entering any math-formula, e.
\begin_inset space \thinspace{}
\end_inset
-pic
\family typewriter
:
+\family default
+\begin_inset Separator parbreak
+\end_inset
+
\end_layout
\begin_deeper
\begin_layout Enumerate
-Inside your LyX-Document, enter the text
+Inside your \SpecialCharNoPassThru LyX
+-Document, enter the text
\family typewriter
\begin_inset Newline newline
\begin_layout Enumerate
Select the whole text and choose
\family sans
-Insert\SpecialChar \menuseparator
-Math\SpecialChar \menuseparator
+Insert\SpecialChar menuseparator
+Math\SpecialChar menuseparator
Display Formula
\family default
, or use the corresponding keyboard shortcut
\backslash
xymatrix{
\family default
- \SpecialChar \ldots{}
- up to the closing brace \SpecialChar \ldots{}
+ \SpecialChar ldots
+ up to the closing brace \SpecialChar ldots
\family typewriter
}
\end_layout
\begin_layout Standard
-The pattern should be familiar from LaTeX: We see three rows, the first
+The pattern should be familiar from \SpecialCharNoPassThru LaTeX
+: We see three rows, the first
two being terminated by the end-of-line-marker
\family typewriter
(.3)
\family default
.
- In LyX this works only for labels which are placed on top of the arrow,
+ In \SpecialCharNoPassThru LyX
+ this works only for labels which are placed on top of the arrow,
such as
\family typewriter
\backslash
psi
\family default
- is not correctly interpreted by LyX's math editor.
+ is not correctly interpreted by \SpecialCharNoPassThru LyX
+'s math editor.
Two workarounds are suggested in the last section of this note.
\end_layout
\family typewriter
@
\family default
--sign and a pair of braces {\SpecialChar \ldots{}
+-sign and a pair of braces {\SpecialChar ldots
} containing characters describing the end,
the shaft and the tip of the arrow.
These characters are chosen to give some form of ASCII-rendering of the
\backslash
ar@{^(->}[r].
+\family default
+\begin_inset Separator parbreak
+\end_inset
+
\end_layout
\begin_layout Standard
\begin_inset Text
\begin_layout Plain Layout
-Source code in LyX
+Source code in \SpecialCharNoPassThru LyX
\end_layout
\end_inset
\family typewriter
\backslash
-ar@{-->}
+ar@{\twohyphens
+>}
\end_layout
\end_inset
\family typewriter
\backslash
-ar@{-->>}
+ar@{\twohyphens
+>>}
\end_layout
\end_inset
with double, triple shaft or arrows showing only the lower or upper half
of their tips and ends.
Arrows need not have tips nor ends, as the last example shows:
+\begin_inset Separator parbreak
+\end_inset
+
\end_layout
\begin_layout Standard
\begin_inset Text
\begin_layout Plain Layout
-Source code for LyX
+Source code for \SpecialCharNoPassThru LyX
\end_layout
\end_inset
\family typewriter
\backslash
-ar@^{>\SpecialChar \textcompwordmark{}
->->\SpecialChar \textcompwordmark{}
+ar@^{>\SpecialChar ligaturebreak
+>->\SpecialChar ligaturebreak
>}
\end_layout
\family typewriter
\backslash
-ar@2{--}
+ar@2{\twohyphens
+}
\end_layout
\end_inset
\backslash
ar@{-|>}[r]
\family default
- and which displays correctly in LyX as:
+ and which displays correctly in \SpecialCharNoPassThru LyX
+ as:
\begin_inset Formula
\[
\xymatrix{A\ar@{-|>}[r] & \ \ B}
\end_inset
.
- When their code is written inside LyX as above, select it and choose either
+ When their code is written inside \SpecialCharNoPassThru LyX
+ as above, select it and choose either
\family sans
Ctrl-m
Diagrams constructed inline can later be centered, or, conversely, centered
diagrams can be changed to inline formulas with
\family sans
-Edit\SpecialChar \menuseparator
+Edit\SpecialChar menuseparator
Math
\family default
\family sans
-\SpecialChar \menuseparator
+\SpecialChar menuseparator
Change Formula Type.
\end_layout
\end_inset
/ .
- The ellipsis stands for a TeX-measure which needs to be entered as a lower
+ The ellipsis stands for a \SpecialCharNoPassThru TeX
+-measure which needs to be entered as a lower
or upper index.
Whereas in
\family typewriter
\family typewriter
1pc
\family default
- downwards, this cannot directly be done in LyX.
+ downwards, this cannot directly be done in \SpecialCharNoPassThru LyX
+.
It is necessary, to enclose the measure in a pair of braces, such as e.
\begin_inset space \thinspace{}
\end_inset
\end_layout
\begin_layout Standard
-The LaTeX command
+The \SpecialCharNoPassThru LaTeX
+ command
\family typewriter
\backslash
entrymodifiers={
\family default
-\SpecialChar \ldots{}
+\SpecialChar ldots
\family typewriter
}
\end_layout
\begin_layout Section
-Using LyX's math editor
+Using \SpecialCharNoPassThru LyX
+'s math editor
\begin_inset CommandInset label
LatexCommand label
name "sec:math-editor"
\family sans
Ctrl-M
\family default
-, one may construct and modify the whole xypic-diagram inside LyX's math
+, one may construct and modify the whole xypic-diagram inside \SpecialCharNoPassThru LyX
+'s math
editor.
We describe the editing steps for a figure just like the one above.
\end_layout
\begin_layout Standard
-Recall that in LyX's math-editor any pair of braces
+Recall that in \SpecialCharNoPassThru LyX
+'s math-editor any pair of braces
\family typewriter
{
\family default
\family typewriter
@{
\family default
- \SpecialChar \ldots{}
+ \SpecialChar ldots
\family typewriter
}
\backslash
{
\family default
- and let LyX provide the closing brace and the box into which to enter the
+ and let \SpecialCharNoPassThru LyX
+ provide the closing brace and the box into which to enter the
description of the arrow.
\end_layout
At any time, further rows or columns can be entered or deleted using commands
available from
\family sans
-Edit\SpecialChar \menuseparator
+Edit\SpecialChar menuseparator
Math,
\family default
resp.
A more direct way uses the icons in the math toolbar once it has been activated
via
\family sans
-View\SpecialChar \menuseparator
+View\SpecialChar menuseparator
Toolbars.
\end_layout
\begin_layout Standard
Next, label the arrows by attaching a label text as upper or lower indices
to the end of the arrow's path.
- As always in LyX's math editor, an underscore
+ As always in \SpecialCharNoPassThru LyX
+'s math editor, an underscore
\family typewriter
_
\family default
^
\family default
followed by a space opens a box for an upper index.
- You can enter any LaTeX-code as a label.
+ You can enter any \SpecialCharNoPassThru LaTeX
+-code as a label.
\end_layout
\begin_layout Subsection
\family typewriter
@{
\family default
-\SpecialChar \ldots{}
+\SpecialChar ldots
\family typewriter
}
\family typewriter
@<
\family default
-\SpecialChar \ldots{}
+\SpecialChar ldots
>,
\family typewriter
@(
\family default
-\SpecialChar \ldots{}
-,\SpecialChar \ldots{}
+\SpecialChar ldots
+,\SpecialChar ldots
) or
\family typewriter
@/
\family default
-\SpecialChar \ldots{}
+\SpecialChar ldots
\family typewriter
/
\backslash
{
\family default
- with the arrow description entered inside the LyX-supplied box.
+ with the arrow description entered inside the \SpecialCharNoPassThru LyX
+-supplied box.
If this box remains empty, you have specified an empty arrow.
This is a useful construction, too, as you will see in the next section.
\family typewriter
@<
\family default
-\SpecialChar \ldots{}
+\SpecialChar ldots
\family typewriter
>
\family typewriter
@(
\family default
-\SpecialChar \ldots{}
-,\SpecialChar \ldots{}
+\SpecialChar ldots
+,\SpecialChar ldots
\family typewriter
)
\family typewriter
@/
\family default
-\SpecialChar \ldots{}
+\SpecialChar ldots
\family typewriter
/
\emph on
measure
\emph default
- is any valid TeX-measure that should be entered as upper or lower index
+ is any valid \SpecialCharNoPassThru TeX
+-measure that should be entered as upper or lower index
to the first slash /.
Make sure that the ending slash does not end up being part of the upper
or lower index.
\family sans
Ctrl+Z
\family default
-, or try to translate the LyX-file into
+, or try to translate the \SpecialCharNoPassThru LyX
+-file into
\family sans
DVI
\family default
\family default
or
\family sans
-View\SpecialChar \menuseparator
+View\SpecialChar menuseparator
DVI
\family default
.
\end_layout
\begin_layout Standard
-Certain things do not work correctly inside LyX.
+Certain things do not work correctly inside \SpecialCharNoPassThru LyX
+.
The ones that we (used to) miss most are the horizontal and vertical scaling
of diagrams, and the correct positioning of arrows.
There are some workarounds that we are explaining here.
\backslash
xymatrix@R=1pc{
\family default
-\SpecialChar \ldots{}
+\SpecialChar ldots
\family typewriter
}
\backslash
xymatrix@C=
\family default
-\SpecialChar \ldots{}
+\SpecialChar ldots
\family typewriter
{
\family default
-\SpecialChar \ldots{}
+\SpecialChar ldots
\family typewriter
}
\end_inset
into a formula to get the desired matrix because the @-character is interpreted
- by LyX as ending the
+ by \SpecialCharNoPassThru LyX
+ as ending the
\family typewriter
\backslash
.
So one can add the following macro to the preamble (
\family sans
-Layout\SpecialChar \menuseparator
-Document\SpecialChar \menuseparator
+Layout\SpecialChar menuseparator
+Document\SpecialChar menuseparator
Preamble
\family default
):
+\family default
+\begin_inset Separator parbreak
+\end_inset
+
\end_layout
\begin_deeper
\family default
or both.
Don't forget the backslashes and remember, that the closing brace is automatica
-lly supplied by LyX.
+lly supplied by \SpecialCharNoPassThru LyX
+.
Inside the braces enter the dimensions.
\begin_inset Newline newline
\end_inset
\backslash
phi
\family default
-, does not work from inside LyX.
+, does not work from inside \SpecialCharNoPassThru LyX
+.
Instead, one has to replace the hat-symbol ^, resp.
the underscore _ , by the macros
\family typewriter
\family typewriter
inset_preview.lyx
\family default
- example shipped with LyX, which demonstrates how to use more advanced
+ example shipped with \SpecialCharNoPassThru LyX
+, which demonstrates how to use more advanced
\begin_inset ERT
status collapsed
-commands via
\family typewriter
-ERT
+\SpecialCharNoPassThru TeX
+\begin_inset space ~
+\end_inset
+
+Code
\family default
and
\family typewriter
\end_inset
-Homepage of AUCTeX:
+Homepage of AUC\SpecialCharNoPassThru TeX
+:
\begin_inset Flex URL
status collapsed