]> git.lyx.org Git - lyx.git/commitdiff
Include xypic manual from Peter Gumm.
authorPavel Sanda <sanda@lyx.org>
Wed, 22 Oct 2008 22:39:10 +0000 (22:39 +0000)
committerPavel Sanda <sanda@lyx.org>
Wed, 22 Oct 2008 22:39:10 +0000 (22:39 +0000)
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg142452.html

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27031 a592a061-630c-0410-9148-cb99ea01b6c8

lib/examples/xyfigure.lyx [new file with mode: 0644]
lib/examples/xyfigure.png [new file with mode: 0644]
lib/examples/xypic.lyx [new file with mode: 0644]

diff --git a/lib/examples/xyfigure.lyx b/lib/examples/xyfigure.lyx
new file mode 100644 (file)
index 0000000..64b5433
--- /dev/null
@@ -0,0 +1,97 @@
+#LyX 1.6.0beta3 created this file. For more info see http://www.lyx.org/\r
+\lyxformat 335\r
+\begin_document\r
+\begin_header\r
+\textclass article\r
+\begin_preamble\r
+\usepackage[all]{xy}\r
+\end_preamble\r
+\language english\r
+\inputencoding auto\r
+\font_roman default\r
+\font_sans default\r
+\font_typewriter default\r
+\font_default_family default\r
+\font_sc false\r
+\font_osf false\r
+\font_sf_scale 100\r
+\font_tt_scale 100\r
+\graphics default\r
+\paperfontsize default\r
+\spacing single\r
+\use_hyperref false\r
+\papersize default\r
+\use_geometry false\r
+\use_amsmath 1\r
+\use_esint 0\r
+\cite_engine basic\r
+\use_bibtopic false\r
+\paperorientation portrait\r
+\secnumdepth 3\r
+\tocdepth 3\r
+\paragraph_separation indent\r
+\defskip medskip\r
+\quotes_language english\r
+\papercolumns 1\r
+\papersides 1\r
+\paperpagestyle default\r
+\tracking_changes false\r
+\output_changes false\r
+\author "" \r
+\end_header\r
+\r
+\begin_body\r
+\r
+\begin_layout Section*\r
+Editing \r
+\begin_inset ERT\r
+status collapsed\r
+\r
+\begin_layout Plain Layout\r
+\r
+\r
+\backslash\r
+Xy\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+-Pic figures in LyX\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+Below you see an \r
+\begin_inset ERT\r
+status collapsed\r
+\r
+\begin_layout Plain Layout\r
+\r
+\r
+\backslash\r
+Xy\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+-Pic diagram inside LyX being edited and to the right you see how the diagram\r
+ appears as soon as the cursor leaves the editing area.\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+\begin_inset Formula \xymatrix{A\ar [d]\ar [r]  &  B\ar [d]\ar @{-->}[dl] \\\r
+C\ar @{_{(}->}[r]  &  D\ar @/{}_{1pc}/[u]}\r
+\r
+\r
+\end_inset\r
+\r
\r
+\begin_inset Formula $\xymatrix{\, & \, & \mbox{}A\ar [r]\ar [d] & B\ar [d]\ar @{-->}[dl]\\\r
+\, &  & C\ar @{_{(}->}[r] & D\ar @/_{1pc}/[u]}\r
+$\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\end_body\r
+\end_document\r
diff --git a/lib/examples/xyfigure.png b/lib/examples/xyfigure.png
new file mode 100644 (file)
index 0000000..54d0637
Binary files /dev/null and b/lib/examples/xyfigure.png differ
diff --git a/lib/examples/xypic.lyx b/lib/examples/xypic.lyx
new file mode 100644 (file)
index 0000000..9c5dc0b
--- /dev/null
@@ -0,0 +1,3273 @@
+#LyX 1.6.0beta3 created this file. For more info see http://www.lyx.org/\r
+\lyxformat 335\r
+\begin_document\r
+\begin_header\r
+\textclass article\r
+\begin_preamble\r
+\usepackage[all]{xy}\r
+\r
+\r
+\makeatletter\r
+\newcommand{\xyR}[1]{\r
+  \makeatletter\r
+  \xydef@\xymatrixrowsep@{#1}\r
+  \makeatother\r
+}\r
+\makeatletter\r
+\newcommand{\xyC}[1]{\r
+  \makeatletter\r
+  \xydef@\xymatrixcolsep@{#1}\r
+  \makeatother\r
+}\r
+\r
+\newdir{|>}{!/4.5pt/@{|}*:(1,-.2)@^{>}*:(1,+.2)@_{>}}\r
+\end_preamble\r
+\language english\r
+\inputencoding auto\r
+\font_roman ae\r
+\font_sans default\r
+\font_typewriter default\r
+\font_default_family default\r
+\font_sc false\r
+\font_osf false\r
+\font_sf_scale 100\r
+\font_tt_scale 100\r
+\graphics default\r
+\paperfontsize default\r
+\spacing single\r
+\use_hyperref false\r
+\papersize a4paper\r
+\use_geometry false\r
+\use_amsmath 1\r
+\use_esint 0\r
+\cite_engine basic\r
+\use_bibtopic false\r
+\paperorientation portrait\r
+\secnumdepth 3\r
+\tocdepth 3\r
+\paragraph_separation indent\r
+\defskip medskip\r
+\quotes_language english\r
+\papercolumns 1\r
+\papersides 1\r
+\paperpagestyle default\r
+\tracking_changes false\r
+\output_changes false\r
+\author "" \r
+\author "" \r
+\end_header\r
+\r
+\begin_body\r
+\r
+\begin_layout Title\r
+Using \r
+\begin_inset ERT\r
+status collapsed\r
+\r
+\begin_layout Plain Layout\r
+\r
+\r
+\backslash\r
+Xy\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+-pic in LyX\r
+\end_layout\r
+\r
+\begin_layout Author\r
+H.\r
+ Peter Gumm\r
+\end_layout\r
+\r
+\begin_layout Abstract\r
+With the recent versions of LyX and with the \r
+\family typewriter\r
+preview\r
+\family default\r
+-style installed in the LaTeX-System, the graph drawing package \r
+\family typewriter\r
+\r
+\begin_inset ERT\r
+status collapsed\r
+\r
+\begin_layout Plain Layout\r
+\r
+\r
+\backslash\r
+Xy\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+\r
+\family default\r
+-Pic can be conveniently used inside LyX.\r
+ Diagrams can be edited and displayed inside the main LyX editing window.\r
+ Here, we shall describe how to use the \r
+\family typewriter\r
+\r
+\backslash\r
+xymatrix\r
+\family default\r
+ command from \r
+\family typewriter\r
+xypic\r
+\family default\r
+ inside LyX in order to draw, to edit and to preview diagrams as typically\r
+ used in category theory, algebra, and related fields.\r
\r
+\end_layout\r
+\r
+\begin_layout Abstract\r
+\begin_inset CommandInset toc\r
+LatexCommand tableofcontents\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\begin_layout Section\r
+Introduction \r
+\end_layout\r
+\r
+\begin_layout Standard\r
+The \r
+\family typewriter\r
+xypic\r
+\family default\r
+-package has long served as a convenient tool for easily constructing graphs\r
+ and diagrams in LaTeX.\r
+ Unfortunately, its use in LyX had long been restricted to the infamous\r
+ ERT-boxes, meaning that the LyX editor could only display the LaTeX-source\r
+ and not the finished diagram.\r
+ The new \r
+\family typewriter\r
+preview\r
+\family default\r
+-style of LaTeX which is part of the AUCTeX project\r
+\begin_inset CommandInset citation\r
+LatexCommand cite\r
+key "AUCTeX"\r
+\r
+\end_inset\r
+\r
+, finally enables the editing and displaying of \r
+\family typewriter\r
+xypic\r
+\family default\r
+-diagrams, constructed, displayed and interactively edited inside LyX.\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+\begin_inset VSpace defskip\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+\begin_inset Graphics\r
+       filename xyfigure.png\r
+       scale 50\r
+       BoundingBox 0bp 0bp 580bp 440bp\r
+       clip\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+\begin_inset VSpace defskip\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+In this note, we describe how \r
+\begin_inset ERT\r
+status collapsed\r
+\r
+\begin_layout Plain Layout\r
+\r
+\r
+\backslash\r
+Xy\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+-pic can be used from inside LyX, how diagrams can be created and edited.\r
+ We have tested the following using LyX versions 1.3.7 up to 1.6, running under\r
+ WindowsXP and under Windows Vista.\r
\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+There are two modes of operations: For a start, and for some first tests,\r
+ it may be easiest to first enter the \r
+\begin_inset ERT\r
+status collapsed\r
+\r
+\begin_layout Plain Layout\r
+\r
+\r
+\backslash\r
+Xy\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+-Pic code inside the LyX-window, select it all and convert it to a graphical\r
+ representation by pressing \r
+\family sans\r
+Ctrl-m\r
+\family default\r
+ or \r
+\family sans\r
+Ctrl-M\r
+\family default\r
+.\r
+ If you use \r
+\begin_inset ERT\r
+status collapsed\r
+\r
+\begin_layout Plain Layout\r
+\r
+\r
+\backslash\r
+Xy\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+-Pic more frequently, or if you want to modify your initial figure, you\r
+ will want to assemble and modify your figures using LyX's math editor.\r
\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+Once the cursor is moved over a diagram, this is displayed as an array of\r
+ nodes and arrow-commands.\r
+ These can be changed interactively.\r
+ When the cursor leaves the editing area, the diagram reappears.\r
\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+In the first two sections of this documentation, we explain how to use LyX\r
+ in the first mentioned mode and we introduce all \r
+\begin_inset ERT\r
+status collapsed\r
+\r
+\begin_layout Plain Layout\r
+\r
+\r
+\backslash\r
+Xy\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+-Pic features that might be of use for drawing commutative diagrams, graphs\r
+ or automata.\r
+ Section 3 explains how to use the \r
+\begin_inset ERT\r
+status collapsed\r
+\r
+\begin_layout Plain Layout\r
+\r
+\r
+\backslash\r
+Xy\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+-Pic commands inside a math-editing area.\r
\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+It is not our intention to write another introduction to \r
+\begin_inset ERT\r
+status collapsed\r
+\r
+\begin_layout Plain Layout\r
+\r
+\r
+\backslash\r
+Xy\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+-Pic, rather our motivation is to give an introduction how the most important\r
+ commands work inside LyX, since the keystrokes as explained in the \r
+\begin_inset ERT\r
+status collapsed\r
+\r
+\begin_layout Plain Layout\r
+\r
+\r
+\backslash\r
+Xy\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+-Pic manual\r
+\begin_inset CommandInset citation\r
+LatexCommand cite\r
+key "xypic manual"\r
+\r
+\end_inset\r
+\r
+ will not always function correctly inside LyX.\r
\r
+\end_layout\r
+\r
+\begin_layout Section\r
+Preparation\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+The following requires that the LaTeX-packages \r
+\family typewriter\r
+xypic\r
+\family default\r
+ and \r
+\family typewriter\r
+preview\r
+\family default\r
+ are installed in the LaTeX system.\r
+ They are available from CTAN, see at \r
+\begin_inset CommandInset citation\r
+LatexCommand cite\r
+key "instant-preview"\r
+\r
+\end_inset\r
+\r
+, resp.\r
+ at \r
+\begin_inset CommandInset citation\r
+LatexCommand cite\r
+key "xypic"\r
+\r
+\end_inset\r
+\r
+.\r
+ After freshly installing them, it may be necessary, to run \r
+\family sans\r
+Edit\SpecialChar \menuseparator\r
+Reconfigure\r
+\family default\r
+ from the main LyX menu.\r
+ The steps to a first diagram output in LyX are then:\r
+\end_layout\r
+\r
+\begin_layout Enumerate\r
+Activate and test \r
+\family typewriter\r
+preview\r
+\end_layout\r
+\r
+\begin_deeper\r
+\begin_layout Enumerate\r
+Open LyX, choose \r
+\family sans\r
+Edit\SpecialChar \menuseparator\r
+Preferences\SpecialChar \menuseparator\r
+Look and Feel\SpecialChar \menuseparator\r
+Graphics\r
+\family default\r
+ and place a check-mark at \r
+\emph on\r
+Instant Preview\r
+\emph default\r
+.\r
\r
+\end_layout\r
+\r
+\begin_layout Enumerate\r
+Test, if \r
+\family typewriter\r
+instant-preview\r
+\family default\r
+ works by opening a LyX-document and entering any math-formula, e.g.\r
\r
+\begin_inset Formula $a+b=c$\r
+\end_inset\r
+\r
+.\r
\r
+\end_layout\r
+\r
+\begin_layout Enumerate\r
+Move the cursor out of the formula, and watch it change its appearance to\r
+ look just like in the finished dvi- or postscript document.\r
\r
+\end_layout\r
+\r
+\end_deeper\r
+\begin_layout Enumerate\r
+Activate and test \r
+\family typewriter\r
+xypic\r
+\end_layout\r
+\r
+\begin_deeper\r
+\begin_layout Enumerate\r
+Choose \r
+\family sans\r
+Layout\SpecialChar \menuseparator\r
+Document\SpecialChar \menuseparator\r
+Preamble\r
+\family default\r
+ and type \r
+\family typewriter\r
+\r
+\begin_inset Newline newline\r
+\end_inset\r
+\r
+\r
+\backslash\r
+usepackage[all]{xy}.\r
+\end_layout\r
+\r
+\begin_layout Enumerate\r
+Inside your LyX-Document, enter the text \r
+\family typewriter\r
+\r
+\begin_inset Newline newline\r
+\end_inset\r
+\r
+\r
+\backslash\r
+xymatrix{A \r
+\backslash\r
+ar[r] & B}\r
+\family default\r
+ .\r
+\end_layout\r
+\r
+\begin_layout Enumerate\r
+Select the whole text and choose \r
+\family sans\r
+Insert\SpecialChar \menuseparator\r
+Math\SpecialChar \menuseparator\r
+Display Formula\r
+\family default\r
+, or use the corresponding keyboard shortcut \r
+\family sans\r
+Ctrl-M\r
+\family default\r
+.\r
\r
+\end_layout\r
+\r
+\begin_layout Enumerate\r
+Move the mouse cursor out of the editing box and wait for a split second\r
+ to see an arrow appear: \r
+\begin_inset Formula $\xymatrix{A\ar [r] & B}\r
+$\r
+\end_inset\r
+\r
+.\r
\r
+\end_layout\r
+\r
+\end_deeper\r
+\begin_layout Section\r
+Commutative diagrams\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+The following diagram, which is taken from the documentation of \r
+\begin_inset ERT\r
+status collapsed\r
+\r
+\begin_layout Plain Layout\r
+\r
+\r
+\backslash\r
+Xy\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+-Pic\r
+\begin_inset CommandInset citation\r
+LatexCommand cite\r
+key "xypic manual"\r
+\r
+\end_inset\r
+\r
+ by its creator Kristoffer H.\r
+ Rose, will provide an example for many of the features available with that\r
+ package.\r
+ Its source code is: \r
+\end_layout\r
+\r
+\begin_layout LyX-Code\r
+\r
+\backslash\r
+xymatrix{\r
+\begin_inset Newline newline\r
+\end_inset\r
+\r
+  U     \r
+\backslash\r
+ar@/_{1pc}/[ddr]_\r
+\backslash\r
+psi\r
+\backslash\r
+ar@/^{1pc}/[drr]^\r
+\backslash\r
+varphi\r
+\begin_inset Newline newline\r
+\end_inset\r
+\r
+\r
+\backslash\r
+ar@{.>}[dr]|-{(x,y)}\r
+\backslash\r
+\r
+\backslash\r
+\r
+\begin_inset Newline newline\r
+\end_inset\r
+\r
+    & X \r
+\backslash\r
+times_Z Y \r
+\backslash\r
+ar[d]^q \r
+\backslash\r
+ar[r]_p  &  X \r
+\backslash\r
+ar[d]_f\r
+\backslash\r
+\r
+\backslash\r
+\r
+\begin_inset Newline newline\r
+\end_inset\r
+\r
+    & Y \r
+\backslash\r
+ar[r]^g                      &  Z }\r
+\end_layout\r
+\r
+\begin_layout LyX-Code\r
+\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+Again, to turn this code into a graphical output, select it all at once\r
+ starting from the \r
+\family typewriter\r
+\r
+\backslash\r
+xymatrix{\r
+\family default\r
+ \SpecialChar \ldots{}\r
+ up to the closing brace \SpecialChar \ldots{}\r
\r
+\family typewriter\r
+}\r
+\family default\r
+ and turn it into display-math as explained above.\r
+ A moment after the cursor leaves the math-area, you should see the diagram\r
+ in its full graphical glory as shown below.\r
\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+\begin_inset Formula $\xymatrix{U\ar @/_{1pc}/[ddr]_{\psi}\ar @/{}^{1pc}/[drr]^{\varphi}\ar @{.>}[dr]|-{(x,y)}\\\r
+ & X\times_{Z}Y\ar [d]^{q}\ar [r]_{p} & X\ar [d]_{f}\\\r
+ & Y\ar [r]^{g} & Z}\r
+$\r
+\end_inset\r
+\r
\r
+\end_layout\r
+\r
+\begin_layout Subsection\r
+The matrix layout of diagrams\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+\r
+\family typewriter\r
+xymatrix\r
+\family default\r
+ uses a matrix to define the layout of the vertices of a diagram.\r
+ For the above example, we need a \r
+\begin_inset Formula $3\times3$\r
+\end_inset\r
+\r
+-matrix of which 5 entries are used for the vertices \r
+\begin_inset Formula $U$\r
+\end_inset\r
+\r
+, \r
+\begin_inset Formula $X\times_{Z}Y$\r
+\end_inset\r
+\r
+, \r
+\begin_inset Formula $X$\r
+\end_inset\r
+\r
+, \r
+\begin_inset Formula $Y$\r
+\end_inset\r
+\r
+, \r
+\begin_inset Formula $Z$\r
+\end_inset\r
+\r
+, the other positions remaining empty.\r
+ In this case, the following matrix determines the layout:\r
+\end_layout\r
+\r
+\begin_layout LyX-Code\r
+\r
+\backslash\r
+xymatrix{\r
+\begin_inset Newline newline\r
+\end_inset\r
+\r
+    U                       \r
+\backslash\r
+\r
+\backslash\r
\r
+\begin_inset Newline newline\r
+\end_inset\r
+\r
+       & X\r
+\backslash\r
+times_Z Y   & X  \r
+\backslash\r
+\r
+\backslash\r
\r
+\begin_inset Newline newline\r
+\end_inset\r
+\r
+       & Y             & Z    } \r
+\end_layout\r
+\r
+\begin_layout Standard\r
+The pattern should be familiar from LaTeX: We see three rows, the first\r
+ two being terminated by the end-of-line-marker \r
+\family typewriter\r
+\r
+\backslash\r
+\r
+\backslash\r
+\r
+\family default\r
+ .\r
+ Each line consists of entries, separated by the ampersand \r
+\family typewriter\r
+&\r
+\family default\r
+.\r
\r
+\end_layout\r
+\r
+\begin_layout Subsection\r
+Arrows\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+Having entered the vertices, we add arrows between them.\r
+ The basic \r
+\family typewriter\r
+xypic\r
+\family default\r
+-command to produce an arrow is \r
+\family typewriter\r
+\r
+\backslash\r
+ar\r
+\family default\r
+ , it is entered into the cell of the matrix where the arrow is to start.\r
+ The target of the arrow is defined by direction commands \r
+\family typewriter\r
+u\r
+\family default\r
+ (up) \r
+\family typewriter\r
+d\r
+\family default\r
+ (down) \r
+\family typewriter\r
+l\r
+\family default\r
+ (left), or \r
+\family typewriter\r
+r\r
+\family default\r
+ (right).\r
+ These can be combined to a path and enclosed in square brackets.\r
+ As an example, the arrows from the vertex \r
+\begin_inset Formula $U$\r
+\end_inset\r
+\r
+ in the upper left corner down and right to the vertices \r
+\begin_inset Formula $X\times_{Z}Y$\r
+\end_inset\r
+\r
+, \r
+\begin_inset Formula $Y$\r
+\end_inset\r
+\r
+, and \r
+\begin_inset Formula $X$\r
+\end_inset\r
+\r
+ are, respectively, defined as \r
+\family typewriter\r
+\r
+\backslash\r
+ar[dr]\r
+\family default\r
+, \r
+\family typewriter\r
+\r
+\backslash\r
+ar[ddr]\r
+\family default\r
+ and \r
+\family typewriter\r
+\r
+\backslash\r
+ar[drr]\r
+\family default\r
+.\r
+ Thus the above diagram with all arrows added becomes:\r
+\end_layout\r
+\r
+\begin_layout LyX-Code\r
+\r
+\backslash\r
+xymatrix{\r
+\begin_inset Newline newline\r
+\end_inset\r
+\r
+    U \r
+\backslash\r
+ar[ddr] \r
+\backslash\r
+ar[drr] \r
+\backslash\r
+ar[dr]\r
+\backslash\r
+\r
+\backslash\r
+\r
+\begin_inset Newline newline\r
+\end_inset\r
+\r
+    & X \r
+\backslash\r
+times_Z Y \r
+\backslash\r
+ar[d] \r
+\backslash\r
+ar[r]& X \r
+\backslash\r
+ar[d]\r
+\backslash\r
+\r
+\backslash\r
+\r
+\begin_inset Newline newline\r
+\end_inset\r
+\r
+    & Y \r
+\backslash\r
+ar[r] & Z }\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+\begin_inset Formula \xymatrix{ U \ar [ddr] \ar [drr] \ar [dr]\\\r
+ &  X \times_{Z} Y \ar [d] \ar [r]  &  X \ar [d]\\\r
+ &  Y \ar [r]  &  Z }\r
+\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\begin_layout LyX-Code\r
+\r
+\end_layout\r
+\r
+\begin_layout LyX-Code\r
+\r
+\end_layout\r
+\r
+\begin_layout Subsection\r
+Labels\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+Labels are attached to arrows by affixing them as upper or lower indices\r
+ to the \r
+\family typewriter\r
+\r
+\backslash\r
+ar\r
+\family default\r
+-command.\r
+ Thus, \r
+\family typewriter\r
+\r
+\backslash\r
+ar[drr]^\r
+\backslash\r
+varphi\r
+\family default\r
+ defines an arrow going one cell down, two to the right and having the label\r
\r
+\begin_inset Formula $\varphi$\r
+\end_inset\r
+\r
+ attached above.\r
+ To attach a label below the arrow, make it a lower index as in \r
+\family typewriter\r
+\r
+\backslash\r
+ar[ddr]_\r
+\backslash\r
+psi\r
+\family default\r
+.\r
+ This explanation is correct only for arrows pointing to the right.\r
+ More precisely, imagine looking along the arrow in the direction it is\r
+ pointing.\r
+ Then an upper index places a label to the left and a lower index places\r
+ it to the right.\r
+ Consequently, an arrow pointing from right to left, such as \r
+\family typewriter\r
+\r
+\backslash\r
+ar[l]^\r
+\backslash\r
+alpha_\r
+\backslash\r
+beta\r
+\family default\r
+ will have label \r
+\begin_inset Formula $\alpha$\r
+\end_inset\r
+\r
+ below and label \r
+\begin_inset Formula $\beta$\r
+\end_inset\r
+\r
+ above the arrow, i.e.\r
+\begin_inset Formula $\xymatrix{\  & \ \ar [l]_{\beta}^{\alpha}.}\r
+$\r
+\end_inset\r
+\r
+Using the character | instead of ^ or _ , it is even possible to place the\r
+ label right onto the arrow, obscuring part of its shaft.\r
\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+Normally, a label is placed halfway between an arrow's start and target\r
+ objects.\r
+ In the first diagram, the central arrow starting in \r
+\begin_inset Formula $U$\r
+\end_inset\r
+\r
+ has the label \r
+\begin_inset Formula $(x,y)$\r
+\end_inset\r
+\r
+ in the middle of the arrow's shaft, rather than in the middle between the\r
+ two objects it connects.\r
+ This is achieved by prefixing the label with a minus sign, here: \r
+\family typewriter\r
+\r
+\backslash\r
+ar[dr]|-{(x,y)}\r
+\family default\r
+.\r
+\end_layout\r
+\r
+\begin_layout LyX-Code\r
+\r
+\backslash\r
+xymatrix{\r
+\begin_inset Newline newline\r
+\end_inset\r
+\r
+    U \r
+\backslash\r
+ar[ddr]_\r
+\backslash\r
+psi \r
+\backslash\r
+ar[drr]^\r
+\backslash\r
+varphi\r
+\backslash\r
+ar[dr]|-{(x,y)}\r
+\backslash\r
+\r
+\backslash\r
+\r
+\begin_inset Newline newline\r
+\end_inset\r
+\r
+    & X \r
+\backslash\r
+times_Z Y \r
+\backslash\r
+ar[d]^q \r
+\backslash\r
+ar[r]_p& X \r
+\backslash\r
+ar[d]_f\r
+\backslash\r
+\r
+\backslash\r
+\r
+\begin_inset Newline newline\r
+\end_inset\r
+\r
+    & Y \r
+\backslash\r
+ar[r]^g & Z }\r
+\end_layout\r
+\r
+\begin_layout LyX-Code\r
+\begin_inset Formula \xymatrix{ U \ar [ddr]_{\psi}\ar [drr]^{\varphi}\ar [dr]|-{(x,y)}\\\r
+ &  X \times_{Z} Y \ar [d]^{q} \ar [r]_{p}  &  X \ar [d]_{f}\\\r
+ &  Y \ar [r]^{g}  &  Z }\r
+\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+\begin_inset ERT\r
+status collapsed\r
+\r
+\begin_layout Plain Layout\r
+\r
+\r
+\backslash\r
+Xy\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+-pic normally permits labels to be shifted towards the tip or towards the\r
+ start of an arrow by prefixing the label with a ratio, such as e.g.\r
\r
+\family typewriter\r
+(.3)\r
+\family default\r
+.\r
+ In LyX this works only for labels which are placed on top of the arrow,\r
+ such as \r
+\family typewriter\r
+\r
+\backslash\r
+ar[r]|(0.3){\r
+\backslash\r
+phi}\r
+\family default\r
+.\r
\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+For labels placed to the left or to the right of the arrow this does not\r
+ work.\r
+ The corresponding \r
+\begin_inset ERT\r
+status collapsed\r
+\r
+\begin_layout Plain Layout\r
+\r
+\r
+\backslash\r
+Xy\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+-pic code such as e.g.\r
\r
+\family typewriter\r
+\r
+\backslash\r
+ar[r]^(.3)\r
+\backslash\r
+phi\r
+\family default\r
+ or \r
+\family typewriter\r
+\r
+\backslash\r
+ar[r]_(.3)\r
+\backslash\r
+psi\r
+\family default\r
+ is not correctly interpreted by LyX's math editor.\r
+ Two workarounds are suggested in the last section of this note.\r
+\end_layout\r
+\r
+\begin_layout Subsection\r
+Arrow modification \r
+\end_layout\r
+\r
+\begin_layout Standard\r
+Modification of the design, the form or the positioning of arrows are introduced\r
+ by the \r
+\family typewriter\r
+@\r
+\family default\r
+-character.\r
+ This is followed by a pair of matching brackets, where the form of the\r
+ bracket pair, \r
+\family typewriter\r
+{ }\r
+\family default\r
+ or \r
+\family typewriter\r
+< >\r
+\family default\r
+ or \r
+\family typewriter\r
+/ /\r
+\family default\r
+ indicates, whether we want to modify the design, the or the curvature of\r
+ the arrow.\r
+ Various modifactions can be applied to an arrow at the same time.\r
+\end_layout\r
+\r
+\begin_layout Subsubsection\r
+Arrow design \r
+\end_layout\r
+\r
+\begin_layout Standard\r
+Various designs such as \r
+\emph on\r
+solid\r
+\emph default\r
+, \r
+\emph on\r
+dotted\r
+\emph default\r
+, \r
+\emph on\r
+dashed\r
+\emph default\r
+ or \r
+\emph on\r
+double\r
+\emph default\r
+ are possible for the shaft of an arrow.\r
+ These can be combined with various ends and various tips.\r
+ In general, the design of an arrow is described by following the command\r
\r
+\family typewriter\r
+\r
+\backslash\r
+ar\r
+\family default\r
+ immediately by an \r
+\family typewriter\r
+@\r
+\family default\r
+-sign and a pair of braces {\SpecialChar \ldots{}\r
+} containing characters describing the end,\r
+ the shaft and the tip of the arrow.\r
+ These characters are chosen to give some form of ASCII-rendering of the\r
+ real thing.\r
+ For instance \r
+\family typewriter\r
+\r
+\backslash\r
+ar@{>..>>}\r
+\family default\r
+ produces an arrow with split end, a dotted shaft and double head.\r
+ A number of other arrow designs is given in the table below.\r
+ Note that the ends of embedding arrows \r
+\begin_inset Formula $\xymatrix{A\ar @{^{(}->}[r] & B}\r
+$\r
+\end_inset\r
+\r
+ are described by raising or lowering opening parentheses, such as in \r
+\family typewriter\r
+\r
+\backslash\r
+ar@{^(->}[r].\r
+\begin_inset Newline newline\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+\begin_inset Tabular\r
+<lyxtabular version="3" rows="11" columns="2">\r
+<features islongtable="true">\r
+<column alignment="center" valignment="top" width="0">\r
+<column alignment="center" valignment="top" width="0">\r
+<row>\r
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+Result\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+Source code in LyX\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+</row>\r
+<row>\r
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+\begin_inset Formula \xymatrix{\ \ar [r]  &  \ }\r
+\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+\r
+\family typewriter\r
+\r
+\backslash\r
+ar \r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+</row>\r
+<row>\r
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+\begin_inset Formula \xymatrix{\ \ar @{-->}[r]  &  \ }\r
+\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+\r
+\family typewriter\r
+\r
+\backslash\r
+ar@{-->}\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+</row>\r
+<row>\r
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+\begin_inset Formula \xymatrix{\ \ar @{..>}[r]  &  \ }\r
+\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+\r
+\family typewriter\r
+\r
+\backslash\r
+ar@{..>}\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+</row>\r
+<row>\r
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+\begin_inset Formula \xymatrix{\ \ar @{~>}[r]  &  \ }\r
+\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+\r
+\family typewriter\r
+\r
+\backslash\r
+ar@{~>}\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+</row>\r
+<row>\r
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+\begin_inset Formula \xymatrix{\ \ar @{->>}[r]  &  \ }\r
+\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+\r
+\family typewriter\r
+\r
+\backslash\r
+ar@{->>}\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+</row>\r
+<row>\r
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+\begin_inset Formula \xymatrix{\ \ar @{-->>}[r]  &  \ }\r
+\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+\r
+\family typewriter\r
+\r
+\backslash\r
+ar@{-->>}\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+</row>\r
+<row>\r
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+\begin_inset Formula \xymatrix{\ \ar @{>->>}[r]  &  \ }\r
+\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+\r
+\family typewriter\r
+\r
+\backslash\r
+ar@{>->>}\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+</row>\r
+<row>\r
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+\begin_inset Formula \xymatrix{\ \ar @{_{(}->}[r]  &  \ }\r
+\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+\r
+\family typewriter\r
+\r
+\backslash\r
+ar@{_(->}\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+</row>\r
+<row>\r
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+\begin_inset Formula \xymatrix{\ \ar @{^{(}->}[r]  &  \ }\r
+\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+\r
+\family typewriter\r
+\r
+\backslash\r
+ar@{^(->}\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+</row>\r
+<row>\r
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+\begin_inset Formula \xymatrix{\ \ar @{|-|}[r]  &  \ }\r
+\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+\r
+\family typewriter\r
+\r
+\backslash\r
+ar@{|-|}\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+</row>\r
+</lyxtabular>\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+\begin_inset ERT\r
+status collapsed\r
+\r
+\begin_layout Plain Layout\r
+\r
+\r
+\backslash\r
+noindent\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+ Following the @-character by either a 2, 3, _,or a ^, we can produce arrows\r
+ with double, triple shaft or arrows showing only the lower or upper half\r
+ of their tips and ends.\r
+ Arrows need not have tips nor ends, as the last example shows :\r
+\begin_inset Newline newline\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+\begin_inset Tabular\r
+<lyxtabular version="3" rows="8" columns="2">\r
+<features islongtable="true">\r
+<column alignment="center" valignment="top" width="0">\r
+<column alignment="center" valignment="top" width="0">\r
+<row>\r
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+Result\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+Source code for LyX\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+</row>\r
+<row>\r
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+\begin_inset Formula \xymatrix{\ \ar @2[r]  &  \ }\r
+\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+\r
+\family typewriter\r
+\r
+\backslash\r
+ar@2\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+</row>\r
+<row>\r
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+\begin_inset Formula \xymatrix{\ \ar @3[r]  &  \ }\r
+\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+\r
+\family typewriter\r
+\r
+\backslash\r
+ar@3\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+</row>\r
+<row>\r
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+\begin_inset Formula \xymatrix{\ \ar @_{->}[r]  &  \ }\r
+\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+\r
+\family typewriter\r
+\r
+\backslash\r
+ar@_{->}\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+</row>\r
+<row>\r
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+\begin_inset Formula \xymatrix{\ \ar @^{->}[r]  &  \ }\r
+\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+\r
+\family typewriter\r
+\r
+\backslash\r
+ar@^{->}\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+</row>\r
+<row>\r
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+\begin_inset Formula \xymatrix{\ \ar @^{>>->>}[r]  &  \ }\r
+\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+\r
+\family typewriter\r
+\r
+\backslash\r
+ar@^{>>->>}\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+</row>\r
+<row>\r
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+\begin_inset Formula \xymatrix{\ \ar @{^{<}-_{>}}[r]  &  \ }\r
+\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+\r
+\family typewriter\r
+\r
+\backslash\r
+ar@{^<-_>}\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+</row>\r
+<row>\r
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+\begin_inset Formula \xymatrix{\ \ar @2{--}[r]  &  \ }\r
+\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">\r
+\begin_inset Text\r
+\r
+\begin_layout Plain Layout\r
+\r
+\family typewriter\r
+\r
+\backslash\r
+ar@2{--}\r
+\end_layout\r
+\r
+\end_inset\r
+</cell>\r
+</row>\r
+</lyxtabular>\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\begin_layout Subsubsection\r
+Designing your own arrows\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+Within certain limits there is even a way to design your own arrows.\r
+ Using some the characters \r
+\family typewriter\r
+><|ox+/()[\r
+\family default\r
+ one can even design one's own arrow tips using the \r
+\family typewriter\r
+\r
+\backslash\r
+newdir\r
+\family default\r
+ command in the preample.\r
+ For explanations, we refer to the \r
+\family typewriter\r
+\r
+\begin_inset ERT\r
+status collapsed\r
+\r
+\begin_layout Plain Layout\r
+\r
+\r
+\backslash\r
+Xy\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+\r
+\family default\r
+-manual, from which we take the example: \r
+\end_layout\r
+\r
+\begin_layout Standard\r
+\r
+\family typewriter\r
+\r
+\backslash\r
+newdir{|>}{!/4.5pt/@{|}*:(1,-.2)@^{>}*:(1,+.2)@_{>}}\r
+\family default\r
+.\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+\begin_inset ERT\r
+status collapsed\r
+\r
+\begin_layout Plain Layout\r
+\r
+\r
+\backslash\r
+noindent \r
+\end_layout\r
+\r
+\end_inset\r
+\r
+This defines a new arrow tip, referred to as \r
+\family typewriter\r
+|>\r
+\family default\r
+ in \r
+\family typewriter\r
+\r
+\backslash\r
+ar@{-|>}[r]\r
+\family default\r
+ and which displays correctly in LyX as:\r
+\begin_inset Formula \[\r
+\xymatrix{A\ar @{-|>}[r] & \ \  B}\r
+\]\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\begin_layout Subsection\r
+Arrow positioning\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+Arrows are shifted sideways with the modifier \r
+\family typewriter\r
+@<\r
+\family default\r
+\r
+\begin_inset Formula $\ldots$\r
+\end_inset\r
+\r
\r
+\family typewriter\r
+>\r
+\family default\r
+ where the ellipsis is replaced by a positive or negative measure.\r
+ For instance, to design a pair of mutually opposing arrows between two\r
+ nodes, we shift them to see them apart.\r
+ Note that the direction of the shift (positive) is to the left if one looks\r
+ along the arrow.\r
+ Thus\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+\r
+\family typewriter\r
+\r
+\backslash\r
+xymatrix{\r
+\backslash\r
+circ \r
+\backslash\r
+ar@<1ex>[r]& \r
+\backslash\r
+circ \r
+\backslash\r
+ar@<1ex>[l]}\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+\begin_inset ERT\r
+status collapsed\r
+\r
+\begin_layout Plain Layout\r
+\r
+\r
+\backslash\r
+noindent\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+ produces\r
+\begin_inset space ~\r
+\end_inset\r
+\r
+\r
+\begin_inset space ~\r
+\end_inset\r
+\r
+\r
+\begin_inset Formula \[\r
+\xymatrix{\circ\ar @<1ex>[r] & \circ\ar @<1ex>[l]}\r
+\]\r
\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\begin_layout Subsubsection\r
+Inline or centered diagrams\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+Arrows and diagrams can be used inline, such as this one: \r
+\begin_inset Formula $\xymatrix{\circ\ar @<1ex>[r] & \circ\ar @<1ex>[l]}\r
+$\r
+\end_inset\r
+\r
+.\r
+ When their code is written inside LyX as above, select it and choose either\r
\r
+\family sans\r
+Ctrl-m\r
+\family default\r
+ for inline appearence or \r
+\family sans\r
+Ctrl-M\r
+\family default\r
+ for displaystyle.\r
+ Diagrams constructed inline can later be centered, or, conversely, centered\r
+ diagrams can be changed to inline formulas with \r
+\family sans\r
+Edit\SpecialChar \menuseparator\r
+Math\r
+\family default\r
\r
+\family sans\r
+\SpecialChar \menuseparator\r
+Alignment.\r
+\end_layout\r
+\r
+\begin_layout Subsection\r
+Bending arrows \r
+\end_layout\r
+\r
+\begin_layout Standard\r
+There are two simple methods to make arrows bend.\r
+ The first is giving an explicit value by which the midpoint of the arrow's\r
+ shaft is raised or depressed, the other is by forcing the arrow to leave\r
+ its origin in a prescribed compass direction and to make him enter the\r
+ target at another direction.\r
+ The necessary bending of the arrow is determined automatically.\r
+ We describe both methods.\r
+\end_layout\r
+\r
+\begin_layout Subsubsection\r
+Raising the shaft\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+For bending arrows we use the modifier @/\r
+\begin_inset Formula $\ldots$\r
+\end_inset\r
+\r
+/ .\r
+ The ellipsis stands for a TeX-measure which needs to be entered as a lower\r
+ or upper index.\r
+ Whereas in \r
+\family typewriter\r
+xypic\r
+\family default\r
+, we could simply write, e.g.\r
\r
+\family typewriter\r
+\r
+\backslash\r
+ar@/_1pc/\r
+\family default\r
+ for an arrow bending \r
+\family typewriter\r
+1pc\r
+\family default\r
+ downwards, this cannot directly be done in LyX.\r
+ It is necessary, to enclose the measure in a pair of braces, such as e.g.\r
\r
+\family typewriter\r
+\r
+\backslash\r
+ar@/_{1pc}/\r
+\family default\r
+.\r
+ As an example, here are two opposing arrows between \r
+\begin_inset Formula $A$\r
+\end_inset\r
+\r
+ and \r
+\begin_inset Formula $B$\r
+\end_inset\r
+\r
+, each bending by .5 pica, given by the following source code: \r
+\end_layout\r
+\r
+\begin_layout Standard\r
+\r
+\family typewriter\r
+\r
+\backslash\r
+xymatrix{A \r
+\backslash\r
+ar@/_{.5pc}/[r] & B \r
+\backslash\r
+ar@/_{.5pc}/[l]}\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+\begin_inset Formula \[\r
+\xymatrix{A\ar @/{}_{.5pc}/[r] & B\ar @/{}_{.5pc}/[l]}\r
+\]\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\begin_layout Subsubsection\r
+Specifying exit- and entrance directions.\r
\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+An alternative for making arrows bend is by specifying their compass direction\r
+ as they are leaving their source and their direction from which they enter\r
+ their target.\r
+ Instead of north, north-east, east, etc., the directions are named \r
+\family typewriter\r
+u\r
+\family default\r
+, \r
+\family typewriter\r
+ur\r
+\family default\r
+, \r
+\family typewriter\r
+r\r
+\family default\r
+, \r
+\family typewriter\r
+dr\r
+\family default\r
+, \r
+\family typewriter\r
+d\r
+\family default\r
+, \r
+\family typewriter\r
+dl\r
+\family default\r
+, \r
+\family typewriter\r
+l\r
+\family default\r
+, \r
+\family typewriter\r
+ul\r
+\family default\r
+, standing for up, up-right, right, down-right, etc..\r
+ A direction is specified as @(\r
+\emph on\r
+out\r
+\emph default\r
+,\r
+\emph on\r
+in\r
+\emph default\r
+) where \r
+\emph on\r
+out\r
+\emph default\r
+ stands for the direction the first object is left and \r
+\emph on\r
+in\r
+\emph default\r
+ stands for the direction from which the target is entered.\r
+ As an example, we show some bending arrows and a loop, which arises when\r
+ we do not specify a target for an arrow, just its incoming and outgoing\r
+ direction:\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+\begin_inset Formula \[\r
+\xymatrix{A\ar @(dr,dl)[r]\ar @(dr,dl)[rr] & B\ar @(d,r)[dl] & C\\\r
+E\ar @(ul,ur)}\r
+\]\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\begin_layout LyX-Code\r
+\r
+\backslash\r
+xymatrix{A \r
+\backslash\r
+ar@(dr,dl)[r]\r
+\backslash\r
+ar@(dr,dl)[rr] \r
+\begin_inset Newline newline\r
+\end_inset\r
+\r
+                    &B\r
+\backslash\r
+ar@(d,r)[dl]  &C \r
+\backslash\r
+\r
+\backslash\r
\r
+\begin_inset Newline newline\r
+\end_inset\r
+\r
+            E \r
+\backslash\r
+ar@(ul,ur)}\r
+\end_layout\r
+\r
+\begin_layout Subsection\r
+Modifying vertices\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+The above example is reminiscent of an automata diagram, except that in\r
+ such a diagram states would be enclosed in small circles, with double circles\r
+ denoting final states.\r
\r
+\end_layout\r
+\r
+\begin_layout Subsubsection\r
+Framing objects \r
+\end_layout\r
+\r
+\begin_layout Standard\r
+With \r
+\begin_inset ERT\r
+status collapsed\r
+\r
+\begin_layout Plain Layout\r
+\r
+\r
+\backslash\r
+Xy\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+-Pic, entries can obtain a single or a double frame, such as \r
+\begin_inset Formula $\xymatrix{*+[F]{A}}\r
+$\r
+\end_inset\r
+\r
+ or \r
+\begin_inset Formula $\xymatrix{*+[F=]{B}}\r
+$\r
+\end_inset\r
+\r
+ by prefixing an entry with \r
+\family typewriter\r
+*[F-]\r
+\family default\r
+ or \r
+\family typewriter\r
+*[F=]\r
+\family default\r
+ and enclosing the portion of the entry to be framed in braces.\r
+ Normally, the frame will be very tight so that it must be widened by prefixing\r
+ with \r
+\family typewriter\r
++\r
+\family default\r
+ or with \r
+\family typewriter\r
+++\r
+\family default\r
+.\r
+ Round frames, such as \r
+\begin_inset Formula $\xymatrix{*++[o][F]{A}}\r
+$\r
+\end_inset\r
+\r
+ and \r
+\begin_inset Formula $\xymatrix{*++[o][F=]{B}}\r
+$\r
+\end_inset\r
+\r
+ are obtained by specifying the shape as \r
+\family typewriter\r
+[o].\r
+\r
+\family default\r
+ So the latter figure was constructed as *++[o][F=]{B}.\r
+ This way, the following automaton \r
+\end_layout\r
+\r
+\begin_layout Standard\r
+\begin_inset Formula \[\r
+\xymatrix{\txt {start}\ar [r] & *++[o][F]{1}\ar [r] & *++[o][F=]{2}\ar @(ur,dr)\ar @(ur,ul)[l]}\r
+\]\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+\begin_inset ERT\r
+status collapsed\r
+\r
+\begin_layout Plain Layout\r
+\r
+\r
+\backslash\r
+noindent\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+ can be typeset as\r
+\end_layout\r
+\r
+\begin_layout LyX-Code\r
+\r
+\backslash\r
+xymatrix{\r
+\backslash\r
+txt{start}\r
+\backslash\r
+ar[r]\r
+\end_layout\r
+\r
+\begin_layout LyX-Code\r
+            & *++[o][F]{1}\r
+\backslash\r
+ar[r]\r
+\end_layout\r
+\r
+\begin_layout LyX-Code\r
+            & *++[o][F=]{2}\r
+\backslash\r
+ar@(ur,dr)\r
+\backslash\r
+ar@(ur,ul)[l]\r
+\end_layout\r
+\r
+\begin_layout LyX-Code\r
+           }.\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+The LaTeX command \r
+\family typewriter\r
+\r
+\backslash\r
+entrymodifiers={\r
+\family default\r
+\SpecialChar \ldots{}\r
+\r
+\family typewriter\r
+}\r
+\family default\r
+ will make a certain entry style the default, that can, of course be overridden\r
+ for individual entries.\r
+ Thus, after \r
+\family typewriter\r
+\r
+\backslash\r
+entrymodifiers={++[o][F-]}\r
+\family default\r
+, all following entries inside \r
+\begin_inset ERT\r
+status collapsed\r
+\r
+\begin_layout Plain Layout\r
+\r
+\r
+\backslash\r
+Xy\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+-matrices would be encircled.\r
+\end_layout\r
+\r
+\begin_layout Subsubsection\r
+Framing rectangles\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+Framing a whole rectangle inside an xymatrix is done with the macro pair\r
\r
+\family typewriter\r
+\r
+\backslash\r
+save ...\r
\r
+\backslash\r
+restore\r
+\family default\r
+.\r
\r
+\family roman\r
+\series medium\r
+\shape up\r
+\size normal\r
+\emph off\r
+\bar no\r
+\noun off\r
+\color none\r
+The dimension of the rectangle is given as a dotted pair \r
+\begin_inset Formula $P_{0}.P_{1}$\r
+\end_inset\r
+\r
+ of points denoting the top left and lower right corners of the rectangle.\r
+ Each point, in turn,is given as a doubly quoted comma separated pair \r
+\begin_inset Quotes eld\r
+\end_inset\r
+\r
+\r
+\begin_inset Formula $x,y$\r
+\end_inset\r
+\r
+\r
+\begin_inset Quotes erd\r
+\end_inset\r
+\r
+ specifying row \r
+\begin_inset Formula $x$\r
+\end_inset\r
+\r
+ and column \r
+\begin_inset Formula $y$\r
+\end_inset\r
+\r
+.\r
+ These are followed by the framing commands, to produce figures such as\r
+ the following: \r
+\begin_inset Formula \[\r
+\xymatrix{A & B\ar @(d,r)[dl]\sp (0.2)\phi\sp (0.7)\psi\save "1,1"."2,1"*+[F=]\frm {}\restore \,\\\r
+C & \save "1,1"."1,2"*++[F]\frm {}\restore }\r
+\]\r
+\r
+\end_inset\r
+\r
+ Here, the code \r
+\family typewriter\r
+\series default\r
+\shape default\r
+\size default\r
+\emph default\r
+\bar default\r
+\noun default\r
+\color inherit\r
+\r
+\backslash\r
+save"1,1"."2,1"*+[F=]\r
+\backslash\r
+frm{}\r
+\backslash\r
+restore\r
+\family roman\r
+\series medium\r
+\shape up\r
+\size normal\r
+\emph off\r
+\bar no\r
+\noun off\r
+\color none\r
+ produces the doubly framed rectangle, and the code for the extra wide horizonta\r
+l rectangle is \r
+\family typewriter\r
+\series default\r
+\shape default\r
+\size default\r
+\emph default\r
+\bar default\r
+\noun default\r
+\color inherit\r
+\r
+\backslash\r
+save"1,1"."1,2"*++[F]\r
+\backslash\r
+frm{}\r
+\backslash\r
+restore\r
+\family roman\r
+\series medium\r
+\shape up\r
+\size normal\r
+\emph off\r
+\bar no\r
+\noun off\r
+\color none\r
+.\r
+ This code can be placed in arbitrary cells of the xymatrix.\r
\r
+\end_layout\r
+\r
+\begin_layout Section\r
+Using LyX's math editor\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+As an alternative to writing the \r
+\family typewriter\r
+xypic\r
+\family default\r
+ code, then transforming it into a math-editing environment by marking it\r
+ and applying \r
+\family sans\r
+Ctrl-m\r
+\family default\r
+, or \r
+\family sans\r
+Ctrl-M\r
+\family default\r
+, one may construct and modify the whole xypic-diagram inside LyX's math\r
+ editor.\r
+ We describe the editing steps for a figure just like the one above.\r
\r
+\end_layout\r
+\r
+\begin_layout Subsection\r
+Caveat - how to enter braces\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+Recall that in LyX's math-editor any pair of braces \r
+\family typewriter\r
+{\r
+\family default\r
+ and \r
+\family typewriter\r
+}\r
+\family default\r
+ that are to enclose a macro-parameter must be entered by typing just \r
+\family typewriter\r
+\r
+\backslash\r
+{\r
+\family default\r
+ .\r
+ The closing brace is automatically supplied and in between a box into which\r
+ to the parameter is entered.\r
+ In connection with \r
+\begin_inset ERT\r
+status collapsed\r
+\r
+\begin_layout Plain Layout\r
+\r
+\r
+\backslash\r
+Xy\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+-diagrams, this applies in particular to arrow modifications that are normally\r
+ given in the form \r
+\family typewriter\r
+@{\r
+\family default\r
+ \SpecialChar \ldots{}\r
\r
+\family typewriter\r
+}\r
+\family default\r
+ with the ellipsis standing for the description of end, shaft and tip of\r
+ the arrow.\r
+ Inside the math-editor, enter just \r
+\family typewriter\r
+@\r
+\backslash\r
+{\r
+\family default\r
+ and let LyX provide the closing brace and the box into which to enter the\r
+ description of the arrow.\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+Braces that are entered without the backslash \r
+\family typewriter\r
+\r
+\backslash\r
+\r
+\family default\r
+ will just appear as typed, but cannot be used to receive a macro parameter.\r
+ They are useful, for instance to denote sets, e.g.\r
\r
+\family typewriter\r
+{x\r
+\backslash\r
+in X \r
+\backslash\r
+mid x\r
+\backslash\r
+notin x}\r
+\family default\r
+ will display as \r
+\begin_inset Formula $\{x\in X\mid x\notin x\}$\r
+\end_inset\r
+\r
+.\r
+\end_layout\r
+\r
+\begin_layout Subsection\r
+Setting up the matrix\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+With \r
+\family sans\r
+Ctrl-m\r
+\family default\r
+ or \r
+\family sans\r
+Ctrl-M\r
+\family default\r
+ open a formula environment and enter: \r
+\family typewriter\r
+\r
+\backslash\r
+xymatrix\r
+\family default\r
+.\r
+ This produces a 1\r
+\begin_inset Formula $\times$\r
+\end_inset\r
+\r
+1- \r
+\begin_inset ERT\r
+status collapsed\r
+\r
+\begin_layout Plain Layout\r
+\r
+\r
+\backslash\r
+Xy\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+-matrix.\r
+ Add extra rows by typing \r
+\family sans\r
+Ctrl-Enter\r
+\family default\r
+ and add columns by typing \r
+\family sans\r
+Alt-m c i.\r
\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+At any time, further rows or columns can be entered or deleted using commands\r
+ available from \r
+\family sans\r
+Edit\SpecialChar \menuseparator\r
+Math,\r
+\family default\r
+ resp.\r
+ their shortcuts, beginning with \r
+\family sans\r
+Alt-m c\r
+\family default\r
+ for the column commands or \r
+\family sans\r
+Alt-m w\r
+\family default\r
+ for the row commands.\r
\r
+\end_layout\r
+\r
+\begin_layout Subsection\r
+Entering nodes, arrows and labels\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+Type the nodes into the correct positions of the matrix.\r
+ If you move the cursor out of the matrix, you should see a first rendering\r
+ of the node layout.\r
+ Next, add the arrows at the nodes from where they should emanate by typing\r
\r
+\family typewriter\r
+\r
+\backslash\r
+ar[\r
+\family default\r
+\emph on\r
+p\r
+\family typewriter\r
+\emph default\r
+]\r
+\family default\r
+, where \r
+\emph on\r
+p\r
+\emph default\r
+ can be any path made up from the characters \r
+\family typewriter\r
+u\r
+\family default\r
+, \r
+\family typewriter\r
+d\r
+\family default\r
+, \r
+\family typewriter\r
+l\r
+\family default\r
+, \r
+\family typewriter\r
+r\r
+\family default\r
+.\r
+ Make sure that the path indeed leads to an existing node within the matrix.\r
+ Otherwise, the figure will not display when the cursor leaves the editing\r
+ area.\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+Next, label the arrows by attaching a label text as upper or lower indices\r
+ to the end of the arrow's path.\r
+ As always in LyX's math editor, an underscore \r
+\family typewriter\r
+_\r
+\family default\r
+ opens a box for a lower index and a \r
+\family typewriter\r
+^\r
+\family default\r
+ followed by a space opens a box for an upper index.\r
+ You can enter any LaTeX-code as a label.\r
\r
+\end_layout\r
+\r
+\begin_layout Subsection\r
+Modifying arrows \r
+\end_layout\r
+\r
+\begin_layout Standard\r
+Finally, modify the appearance of the arrows by entering @-modifiers @{\SpecialChar \ldots{}\r
+},\r
+ @<\SpecialChar \ldots{}\r
+>, @(\SpecialChar \ldots{}\r
+,\SpecialChar \ldots{}\r
+) or @/\SpecialChar \ldots{}\r
+/.\r
+ The above caveat applies to the first form only.\r
+ It must be entered as \r
+\family typewriter\r
+@\r
+\backslash\r
+{\r
+\family default\r
+ with the arrow description entered inside the LyX-supplied box.\r
+ If this box remains empty, you have specified an empty arrow.\r
+ This is a useful construction, too, as you will see in the next section.\r
\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+The other modifiers, @<\SpecialChar \ldots{}\r
+>, @(\SpecialChar \ldots{}\r
+,\SpecialChar \ldots{}\r
+) and @/\SpecialChar \ldots{}\r
+/ are typed as shown with the arrow\r
+ description replacing the ellipsis.\r
+ The code for bending arrows, which in \r
+\family typewriter\r
+xypic\r
+\family default\r
+ is @/_\r
+\emph on\r
+measure\r
+\emph default\r
+/ or @/\r
+\emph on\r
+^measure\r
+\emph default\r
+/ where \r
+\emph on\r
+measure\r
+\emph default\r
+ is any valid TeX-measure, should be entered as upper or lower index to\r
+ the first slash / .\r
+ Make sure that the ending slash does not end up being part of the upper\r
+ or lower index.\r
+\end_layout\r
+\r
+\begin_layout Subsection\r
+What if something goes wrong\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+When constructing a diagram, you should at times check it by just moving\r
+ the cursor out of the editing area to see whether instant preview can successfu\r
+lly convert it into graphical output.\r
+ If this does not happen, it may either be that instant preview for some\r
+ reason is not aware that it should retranslate the graphics.\r
+ Moving the cursor into the editing area and out again sometimes wakes up\r
+ instant preview.\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+A more serious reason could be a syntactical error in your input.\r
+ If necessary, redo the last editing steps, using Ctrl-z, or try to translate\r
+ the LyX-file into dvi using Ctrl-d or \r
+\family sans\r
+View\SpecialChar \menuseparator\r
+Dvi\r
+\family default\r
+.\r
+ There should be some error generated, which hopefully gives you a hint\r
+ as to the source of the mistake.\r
+\end_layout\r
+\r
+\begin_layout Section\r
+Hacks\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+Certain things do not work correctly inside LyX.\r
+ The ones that we (used to) miss most are the horizontal and vertical scaling\r
+ of diagrams, and the correct positioning of arrows.\r
+ There are some workarounds that we are explaining here.\r
\r
+\end_layout\r
+\r
+\begin_layout Subsection\r
+Horizontal and vertical scaling\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+It is often convenient to stretch the horizontal or the vertical dimensions\r
+ of an entire diagram by using spacing commands for rows and/or columns.\r
+ According to the \r
+\begin_inset ERT\r
+status collapsed\r
+\r
+\begin_layout Plain Layout\r
+\r
+\r
+\backslash\r
+Xy\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+-manual, for instance, \r
+\family typewriter\r
+\r
+\backslash\r
+xymatrix@R=1pc{\r
+\family default\r
+\SpecialChar \ldots{}\r
+\r
+\family typewriter\r
+}\r
+\family default\r
+ defines an \r
+\begin_inset ERT\r
+status collapsed\r
+\r
+\begin_layout Plain Layout\r
+\r
+\r
+\backslash\r
+Xy\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+-matrix with row spacing of 1 pica.\r
+ Similarly, \r
+\family typewriter\r
+\r
+\backslash\r
+xymatrix@C=\r
+\family default\r
+\SpecialChar \ldots{}\r
+\r
+\family typewriter\r
+{\r
+\family default\r
+\SpecialChar \ldots{}\r
+\r
+\family typewriter\r
+}\r
+\family default\r
+ allows to modify the space between columns.\r
+ Unfortunately, these commands do currently not work inside LyX, as the\r
+ @-character is interpreted by LyX as ending the \r
+\begin_inset ERT\r
+status collapsed\r
+\r
+\begin_layout Plain Layout\r
+\r
+\r
+\backslash\r
+Xy\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+-matrix-macro.\r
\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+Knowing that \r
+\begin_inset ERT\r
+status collapsed\r
+\r
+\begin_layout Plain Layout\r
+\r
+\r
+\backslash\r
+Xy\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+\r
+\begin_inset space ~\r
+\end_inset\r
+\r
+ stores the values for row-spacing and column-spacing in the variables \r
+\family typewriter\r
+\r
+\backslash\r
+xymatrixrowsep@\r
+\family default\r
+ and \r
+\family typewriter\r
+\r
+\backslash\r
+xymatrixrowsep@\r
+\family default\r
+, add the following macro to the preamble (\r
+\family sans\r
+Layout\SpecialChar \menuseparator\r
+Document\SpecialChar \menuseparator\r
+Preamble)\r
+\end_layout\r
+\r
+\begin_layout LyX-Code\r
+\r
+\backslash\r
+makeatletter\r
+\end_layout\r
+\r
+\begin_layout LyX-Code\r
+\r
+\backslash\r
+newcommand{\r
+\backslash\r
+xyR}[1]{% \r
+\end_layout\r
+\r
+\begin_layout LyX-Code\r
+\r
+\backslash\r
+makeatletter\r
+\end_layout\r
+\r
+\begin_layout LyX-Code\r
+\r
+\backslash\r
+xydef@\r
+\backslash\r
+xymatrixrowsep@{#1}\r
+\end_layout\r
+\r
+\begin_layout LyX-Code\r
+\r
+\backslash\r
+makeatother\r
+\end_layout\r
+\r
+\begin_layout LyX-Code\r
+} % end of \r
+\backslash\r
+xyR\r
+\end_layout\r
+\r
+\begin_layout LyX-Code\r
+\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+A macro \r
+\family typewriter\r
+\r
+\backslash\r
+xyC\r
+\family default\r
+ can be defined correspondingly by replacing \r
+\family typewriter\r
+\r
+\backslash\r
+xymatrixrowsep@\r
+\family default\r
+ with \r
+\family typewriter\r
+\r
+\backslash\r
+xymatrixcolsep@\r
+\family default\r
+.\r
+ Now, a figure can be scaled by entering \r
+\backslash\r
+xyR{...} into the \r
+\begin_inset ERT\r
+status collapsed\r
+\r
+\begin_layout Plain Layout\r
+\r
+\r
+\backslash\r
+Xy\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+-matrix.\r
+ Place the cursor inside the matrix, just before the first entry.\r
+ Then enter \r
+\family typewriter\r
+\r
+\backslash\r
+xyR\r
+\backslash\r
+{\r
+\family default\r
+ or \r
+\family typewriter\r
+\r
+\backslash\r
+xyC\r
+\backslash\r
+{\r
+\family default\r
+ or both.\r
+ Dont't forget the backslashes and remember, that the closing brace is automatic\r
+ally supplied by LyX.\r
+ Inside the braces enter the dimensions.\r
+ The default is \r
+\family typewriter\r
+2pt\r
+\family default\r
+.\r
+ Here you see a diagram which is squashed vertically and stretched horizontally\r
+ with \r
+\family typewriter\r
+\r
+\backslash\r
+xyR{9pc}\r
+\backslash\r
+xyC{.5pc}\r
+\family default\r
+:\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+\begin_inset Formula \[\r
+\xyC {.5pc}\xyC {9pc}\xymatrix{A\ar [r]\ar [d] & B\\\r
+C\ar @{}[ur]|{\text{{horizontal stretch}}}}\r
+\]\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\begin_layout Subsection\r
+Label positioning\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+Another useful \r
+\begin_inset ERT\r
+status collapsed\r
+\r
+\begin_layout Plain Layout\r
+\r
+\r
+\backslash\r
+Xy\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+-vcommand allows the correct positioning of labels along the shaft of arrows.\r
+ This feature is sometimes necessary, when the default position of a label\r
+ would otherwise clutter the picture, or would even coincide with other\r
+ items, such as the intersection of the arrows in the figure below.\r
+ In order to shift a label position alongside the shaft of an arrow, \r
+\begin_inset ERT\r
+status open\r
+\r
+\begin_layout Plain Layout\r
+\r
+\r
+\backslash\r
+Xy\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+\r
+\begin_inset space ~\r
+\end_inset\r
+\r
+ allows to prefix the label by a decimal number in parentheses, specifying\r
+ the fraction of distance alongside the arrow where the label is to be placed.\r
+ For instance, the code \r
+\family typewriter\r
+\r
+\backslash\r
+ar[r]|(0.3)\r
+\backslash\r
+varphi\r
+\family default\r
+, will place the label on the shaft, but only about one third of the way.\r
\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+Doing the same with labels above or below arrows as \r
+\family typewriter\r
+\r
+\backslash\r
+ar[dr]^(0.3)\r
+\backslash\r
+varphi,\r
+\family default\r
+ respectively \r
+\family typewriter\r
+\r
+\backslash\r
+ar[ur]_(0.3)\r
+\backslash\r
+phi\r
+\family default\r
+, does not work from inside LyX.\r
+ Instead, one has to replace the hat-symbol ^, resp.\r
+ the underscore _ , by the macros \r
+\family typewriter\r
+\r
+\backslash\r
+sp\r
+\family default\r
+, resp.\r
\r
+\family typewriter\r
+\r
+\backslash\r
+sb\r
+\family default\r
+, obtaining \r
+\family typewriter\r
+\r
+\backslash\r
+ar[dr]\r
+\backslash\r
+sp(0.3)\r
+\backslash\r
+varphi \r
+\family default\r
+and\r
+\family typewriter\r
\r
+\backslash\r
+ar[ur]\r
+\backslash\r
+sb(0.3)\r
+\backslash\r
+phi.\r
\r
+\family default\r
+It is, in fact, possible to enter several labels this way and those labels\r
+ are placed correctly, even if the arrow bends.\r
+ In the following figure, the bending arrow with its four labels has been\r
+ produced with \r
+\family typewriter\r
+\r
+\backslash\r
+ar@(r,r)[d] \r
+\backslash\r
+sp(0.2){\r
+\backslash\r
+phi_{1}} \r
+\backslash\r
+sp(0.4){\r
+\backslash\r
+phi_{2}} \r
+\backslash\r
+sb(0.6){\r
+\backslash\r
+phi_{3}} \r
+\backslash\r
+sp(0.8){\r
+\backslash\r
+phi_{4}}.\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+\begin_inset Formula \[\r
+\xyC {4pc}\xymatrix{\bullet\ar [dr]\sp (0.3)\varphi & \circ\ar @{}[d]|\vdots\ar @(r,r)[d]\sp (0.2){\phi_{1}}\sp (0.4){\phi_{2}}\sb (0.6){\phi_{3}}\sp (0.8){\phi_{4}}\\\r
+\circ\ar [ur]\sb (0.3)\phi & \bullet}\r
+\]\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\begin_layout Subsection\r
+Invisible stretched arrows\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+A more general trick uses invisible arrows to place any object almost anywhere\r
+ inside a diagram.\r
+ Produce an invisible arrow, shorten (or prolong) it past its goal by adding\r
+ a decimal stretching ratio, e.g.\r
\r
+\family typewriter\r
+(0.6)\r
+\family default\r
+ or \r
+\family typewriter\r
+(1.4)\r
+\family default\r
+ to its path.\r
+ Attach a label to this invisible arrow.\r
\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+Thus, the down pointing arrow with its label \r
+\begin_inset Formula $\varphi$\r
+\end_inset\r
+\r
+ at (0.3) of its way along the shaft might as well have been produced by\r
+ adding to the regular arrow \r
+\family typewriter\r
+\r
+\backslash\r
+ar[dr] \r
+\family default\r
+an invisible \r
+\begin_inset Formula $\varphi$\r
+\end_inset\r
+\r
+-labelled arrow \r
+\family typewriter\r
+\r
+\backslash\r
+ar@{}[dr(0.6)]^\r
+\backslash\r
+varphi\r
+\family default\r
+, reaching only 0.6 of the way.\r
+ Its label will now appear at 0.3 of the way of the original visible arrow.\r
\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+This workaround has two minor drawbacks: First, it does not work with bending\r
+ arrows.\r
+ Secondly, prolonging an invisible arrow beyond the normal dimension of\r
+ the figure will invisibly extend the figure box, and thereby cause too\r
+ much vertical space between the figure and the preceding or the following\r
+ paragraph.\r
\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+Nevertheless, invisible arrows are an important tool, since they can, in\r
+ principle, be used to place information at any chosen place in a diagram.\r
+ In the above figure, for instance, we have used an invisible arrow to carry\r
+ the \r
+\family typewriter\r
+\r
+\backslash\r
+vdots\r
+\family default\r
+ as label and at the earlier figure we had used an invisible arrow to carry\r
+ the text \r
+\begin_inset Quotes eld\r
+\end_inset\r
+\r
+\r
+\family typewriter\r
+horizontal stretch\r
+\family default\r
+\r
+\begin_inset Quotes erd\r
+\end_inset\r
+\r
+ into the center of the figure.\r
+\end_layout\r
+\r
+\begin_layout Bibliography\r
+\begin_inset CommandInset bibitem\r
+LatexCommand bibitem\r
+label "1"\r
+key "xypic manual"\r
+\r
+\end_inset\r
+\r
+Kristoffer H.\r
+ Rose: \r
+\begin_inset ERT\r
+status collapsed\r
+\r
+\begin_layout Plain Layout\r
+\r
+\r
+\backslash\r
+Xy\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+\r
+\emph on\r
+-Pic User's Guide\r
+\emph default\r
+.\r
+ Version 3.7, Feb.\r
+ 16, 1999.\r
+ Available as part of the \r
+\family typewriter\r
+xypic\r
+\family default\r
+ LaTeX package.\r
\r
+\end_layout\r
+\r
+\begin_layout Bibliography\r
+\begin_inset CommandInset bibitem\r
+LatexCommand bibitem\r
+label "2"\r
+key "instant-preview"\r
+\r
+\end_inset\r
+\r
+\r
+\begin_inset Flex URL\r
+status collapsed\r
+\r
+\begin_layout Plain Layout\r
+\r
+http://www.tug.org/tex-archive/help/Catalogue/entries/preview-latex.html\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\begin_layout Bibliography\r
+\begin_inset CommandInset bibitem\r
+LatexCommand bibitem\r
+label "3"\r
+key "xypic"\r
+\r
+\end_inset\r
+\r
+\r
+\begin_inset Flex URL\r
+status collapsed\r
+\r
+\begin_layout Plain Layout\r
+\r
+http://www.tug.org/tex-archive/help/Catalogue/entries/xypic.html\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\begin_layout Bibliography\r
+\begin_inset CommandInset bibitem\r
+LatexCommand bibitem\r
+label "4"\r
+key "AUCTeX"\r
+\r
+\end_inset\r
+\r
+\r
+\begin_inset Flex URL\r
+status collapsed\r
+\r
+\begin_layout Plain Layout\r
+\r
+http://www.gnu.org/software/auctex/\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\end_body\r
+\end_document\r