\usepackage[all]{xy}
-\makeatletter
+% define new commands used in sec. 5.1
\newcommand{\xyR}[1]{
- \makeatletter
- \xydef@\xymatrixrowsep@{#1}
- \makeatother
-}
-\makeatletter
+ \xydef@\xymatrixrowsep@{#1}}
\newcommand{\xyC}[1]{
- \makeatletter
- \xydef@\xymatrixcolsep@{#1}
- \makeatother
-}
+ \xydef@\xymatrixcolsep@{#1}}
\newdir{|>}{!/4.5pt/@{|}*:(1,-.2)@^{>}*:(1,+.2)@_{>}}
\begin_layout Title
Using
\begin_inset ERT
-status collapsed
+status open
\begin_layout Plain Layout
\family typewriter
\begin_inset ERT
-status collapsed
+status open
\begin_layout Plain Layout
-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
- ERT-boxes, meaning that the LyX editor could only display the LaTeX-source
+ TeX code boxes, meaning that the LyX editor could only display the LaTeX-source
and not the finished diagram.
The new
\family typewriter
\begin_layout Standard
In this note, we describe how
\begin_inset ERT
-status collapsed
+status open
\begin_layout Plain Layout
-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
- WindowsXP and under Windows Vista.
+ Windows
+\begin_inset space \thinspace{}
+\end_inset
+
+XP and under Windows Vista.
\end_layout
There are two modes of operations: For a start, and for some first tests,
it may be easiest to first enter the
\begin_inset ERT
-status collapsed
+status open
\begin_layout Plain Layout
.
If you use
\begin_inset ERT
-status collapsed
+status open
\begin_layout Plain Layout
In the first two sections of this documentation, we explain how to use LyX
in the first mentioned mode and we introduce all
\begin_inset ERT
-status collapsed
+status open
\begin_layout Plain Layout
explains how to use the
\begin_inset ERT
-status collapsed
+status open
\begin_layout Plain Layout
\begin_layout Standard
It is not our intention to write another introduction to
\begin_inset ERT
-status collapsed
+status open
\begin_layout Plain Layout
-Pic, rather our motivation is to give an introduction how the most important
commands work inside LyX, since the keystrokes as explained in the
\begin_inset ERT
-status collapsed
+status open
\begin_layout Plain Layout
\begin_layout Enumerate
Move the cursor out of the formula, and watch it change its appearance to
- look just like in the finished dvi- or postscript document.
+ look just like in the finished DVI- or PostScript document.
\end_layout
\begin_layout Enumerate
Activate and test
\begin_inset ERT
-status collapsed
+status open
\begin_layout Plain Layout
\begin_layout Standard
The following diagram, which is taken from the documentation of
\begin_inset ERT
-status collapsed
+status open
\begin_layout Plain Layout
\begin_layout Standard
\begin_inset ERT
-status collapsed
+status open
\begin_layout Plain Layout
work.
The corresponding
\begin_inset ERT
-status collapsed
+status open
\begin_layout Plain Layout
\end_layout
\begin_layout Subsection
-Arrow modification
+Arrow modification
\end_layout
\begin_layout Standard
\family default
indicates, whether we want to modify the design, the or the curvature of
the arrow.
- Various modifactions can be applied to an arrow at the same time.
+ Various modifications can be applied to an arrow at the same time.
\end_layout
\begin_layout Subsubsection
-Arrow design
+Arrow design
\end_layout
\begin_layout Standard
\backslash
newdir
\family default
- command in the preample.
+ command in the preamble.
For explanations, we refer to the
\family typewriter
\begin_inset ERT
-status collapsed
+status open
\begin_layout Plain Layout
\family sans
Ctrl-m
\family default
- for inline appearence or
+ for inline appearance or
\family sans
Ctrl-M
\family default
\end_layout
\begin_layout Subsection
-Bending arrows
+Bending arrows
\end_layout
\begin_layout Standard
\end_layout
\begin_layout Subsubsection
-Specifying exit- and entrance directions.
-
+Specifying exit- and entrance directions
\end_layout
\begin_layout Standard
\end_layout
\begin_layout Subsubsection
-Framing objects
+Framing objects
\end_layout
\begin_layout Standard
With
\begin_inset ERT
-status collapsed
+status open
\begin_layout Plain Layout
\end_layout
\begin_layout Standard
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-noindent
-\end_layout
-
-\end_inset
-
- can be typeset as
+\noindent
+can be typeset as
\end_layout
\begin_layout LyX-Code
\family default
, all following entries inside
\begin_inset ERT
-status collapsed
+status open
\begin_layout Plain Layout
to the parameter is entered.
In connection with
\begin_inset ERT
-status collapsed
+status open
\begin_layout Plain Layout
1-
\begin_inset ERT
-status collapsed
+status open
\begin_layout Plain Layout
\family default
followed by a space opens a box for an upper index.
You can enter any LaTeX-code as a label.
-
\end_layout
\begin_layout Subsection
-Modifying arrows
+Modifying arrows
\end_layout
\begin_layout Standard
\emph on
measure
\emph default
- is any valid
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-TeX
-\end_layout
-
-\end_inset
-
--measure that should be entered as upper or lower index to the first slash
- /.
+ is any valid 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.
\end_layout
A more serious reason could be a syntactical error in your input.
If necessary, redo the last editing steps, using
\emph on
-Ctrl-z
+Ctrl+Z
\emph default
-, or try to translate the
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-LyX
-\end_layout
-
-\end_inset
-
--file into
+, or try to translate the LyX-file into
\emph on
-dvi
+DVI
\emph default
using
\emph on
-Ctrl-d
+Ctrl+D
\emph default
or
\family sans
View\SpecialChar \menuseparator
-Dvi
+DVI
\family default
.
There should be some error generated, which hopefully gives you a hint
\end_layout
\begin_layout Standard
-Certain things do not work correctly inside
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-LyX
-\end_layout
-
-\end_inset
-
-.
+Certain things do not work correctly inside 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.
of an entire diagram by using spacing commands for rows and/or columns.
According to the
\begin_inset ERT
-status collapsed
+status open
\begin_layout Plain Layout
\family default
defines an
\begin_inset ERT
-status collapsed
+status open
\begin_layout Plain Layout
Unfortunately, these commands do currently not work inside LyX, as the
@-character is interpreted by LyX as ending the
\begin_inset ERT
-status collapsed
+status open
\begin_layout Plain Layout
\begin_layout Standard
Knowing that
\begin_inset ERT
-status collapsed
+status open
\begin_layout Plain Layout
\family sans
Layout\SpecialChar \menuseparator
Document\SpecialChar \menuseparator
-Preamble)
-\end_layout
+Preamble
+\family default
+):
+\begin_inset Newpage pagebreak
+\end_inset
-\begin_layout LyX-Code
-\backslash
-makeatletter
\end_layout
\begin_layout LyX-Code
\begin_layout LyX-Code
-\backslash
-makeatletter
-\end_layout
-
-\begin_layout LyX-Code
-
\backslash
xydef@
\backslash
-xymatrixrowsep@{#1}
-\end_layout
-
-\begin_layout LyX-Code
-
-\backslash
-makeatother
-\end_layout
-
-\begin_layout LyX-Code
-} % end of
-\backslash
-xyR
+xymatrixrowsep@{#1}}
\end_layout
\begin_layout LyX-Code
\backslash
xyR{...} into the
\begin_inset ERT
-status collapsed
+status open
\begin_layout Plain Layout
{
\family default
or both.
- Dont't forget the backslashes and remember, that the closing brace is automatic
-ally supplied by LyX.
+ Don't forget the backslashes and remember, that the closing brace is automatica
+lly supplied by LyX.
Inside the braces enter the dimensions.
The default is
\family typewriter
\begin_layout Standard
Another useful
\begin_inset ERT
-status collapsed
+status open
\begin_layout Plain Layout
\end_inset
--vcommand allows the correct positioning of labels along the shaft of arrows.
+-command allows the correct positioning of labels along the shaft of arrows.
This feature is sometimes necessary, when the default position of a label
would otherwise clutter the picture, or would even coincide with other
items, such as the intersection of the arrows in the figure below.
In order to shift a label position alongside the shaft of an arrow,
\begin_inset ERT
-status collapsed
+status open
\begin_layout Plain Layout
\family typewriter
\begin_inset ERT
-status collapsed
+status open
\begin_layout Plain Layout
\family typewriter
\begin_inset ERT
-status collapsed
+status open
\begin_layout Plain Layout
\family typewriter
\begin_inset ERT
-status collapsed
+status open
\begin_layout Plain Layout
explains how to use
\begin_inset ERT
-status collapsed
+status open
\begin_layout Plain Layout
\family typewriter
\begin_inset ERT
-status collapsed
+status open
\begin_layout Plain Layout
Kristoffer H.
Rose:
\begin_inset ERT
-status collapsed
+status open
\begin_layout Plain Layout
Aarlon Lauda:
\begin_inset ERT
-status collapsed
+status open
\begin_layout Plain Layout
Filipp Ouvaton:
\begin_inset ERT
-status collapsed
+status open
\begin_layout Plain Layout