]> git.lyx.org Git - lyx.git/blobdiff - lib/examples/xypic.lyx
Make sweave example working. Patch from Liviu.
[lyx.git] / lib / examples / xypic.lyx
index 301389e830a2c8bbd5bd5ba463fef0f23b57c14d..5de1b08fa5a9e3a4b616c01d8efc042ee390cbe1 100644 (file)
@@ -1,60 +1,93 @@
-#LyX 1.6.0beta3 created this file. For more info see http://www.lyx.org/
-\lyxformat 335
+#LyX 2.0.0svn created this file. For more info see http://www.lyx.org/
+\lyxformat 382
 \begin_document
 \begin_header
-\textclass article
+\textclass scrartcl
 \begin_preamble
 \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)@_{>}}
+
+% a pdf-bookmark for the TOC is added
+\let\myTOC\tableofcontents
+\renewcommand\tableofcontents{%
+  \pdfbookmark[1]{\contentsname}{}
+  \myTOC }
+
+% redefine the \LyX macro for PDF bookmarks
+\def\LyX{\texorpdfstring{%
+  L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
+  {LyX}}
 \end_preamble
+\options BCOR7.5mm
+\use_default_options false
+\maintain_unincluded_children false
 \language english
 \inputencoding auto
+\fontencoding global
 \font_roman ae
 \font_sans default
 \font_typewriter default
 \font_default_family default
+\use_xetex false
 \font_sc false
 \font_osf false
 \font_sf_scale 100
 \font_tt_scale 100
+
 \graphics default
-\paperfontsize default
+\default_output_format default
+\bibtex_command default
+\index_command default
+\paperfontsize 12
 \spacing single
-\use_hyperref false
+\use_hyperref true
+\pdf_title "Using XY-pc in LyX"
+\pdf_author "H. Peter Gumm"
+\pdf_subject "LyX's XY-pic manual"
+\pdf_keywords "LyX, documentation"
+\pdf_bookmarks true
+\pdf_bookmarksnumbered true
+\pdf_bookmarksopen true
+\pdf_bookmarksopenlevel 2
+\pdf_breaklinks false
+\pdf_pdfborder false
+\pdf_colorlinks true
+\pdf_backref false
+\pdf_pdfusetitle false
+\pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true,pdfstartview=XYZ, plainpages=false, pdfpagelabels"
 \papersize a4paper
 \use_geometry false
 \use_amsmath 1
 \use_esint 0
+\use_mhchem 1
 \cite_engine basic
 \use_bibtopic false
+\use_indices false
 \paperorientation portrait
+\suppress_date false
+\index Index
+\shortcut idx
+\color #008000
+\end_index
 \secnumdepth 3
 \tocdepth 3
 \paragraph_separation indent
-\defskip medskip
+\paragraph_indentation default
 \quotes_language english
 \papercolumns 1
-\papersides 1
+\papersides 2
 \paperpagestyle default
 \tracking_changes false
 \output_changes false
-\author "" 
-\author "" 
+\html_math_output 0
+\html_be_strict true
 \end_header
 
 \begin_body
@@ -103,7 +136,7 @@ Xy
 
 
 \family default
--Pic can be conveniently used inside LyX.
+-pic can be conveniently used inside LyX.
  Diagrams can be edited and displayed inside the main LyX editing window.
  Here, we shall describe how to use the 
 \family typewriter
@@ -141,7 +174,7 @@ xypic
 -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
@@ -169,9 +202,10 @@ xypic
 \end_layout
 
 \begin_layout Standard
+\align center
 \begin_inset Graphics
        filename xyfigure.png
-       scale 50
+       width 75col%
        BoundingBox 0bp 0bp 580bp 440bp
        clip
 
@@ -203,7 +237,11 @@ Xy
 
 -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
 
@@ -222,7 +260,7 @@ Xy
 
 \end_inset
 
--Pic code inside the LyX-window, select it all and convert it to a graphical
+-pic code inside the LyX-window, select it all and convert it to a graphical
  representation by pressing 
 \family sans
 Ctrl-m
@@ -245,7 +283,7 @@ Xy
 
 \end_inset
 
--Pic more frequently, or if you want to modify your initial figure, you
+-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.
  
 \end_layout
@@ -273,9 +311,16 @@ Xy
 
 \end_inset
 
--Pic features that might be of use for drawing commutative diagrams, graphs
+-pic features that might be of use for drawing commutative diagrams, graphs
  or automata.
- Section 3 explains how to use the 
+ Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:math-editor"
+
+\end_inset
+
+ explains how to use the 
 \begin_inset ERT
 status collapsed
 
@@ -288,7 +333,7 @@ Xy
 
 \end_inset
 
--Pic commands inside a math-editing area.
+-pic commands inside a math-editing area.
  
 \end_layout
 
@@ -306,7 +351,7 @@ Xy
 
 \end_inset
 
--Pic, rather our motivation is to give an introduction how the most important
+-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
@@ -320,7 +365,7 @@ Xy
 
 \end_inset
 
--Pic manual
+-pic manual
 \begin_inset CommandInset citation
 LatexCommand cite
 key "xypic manual"
@@ -363,7 +408,7 @@ key "xypic"
 .
  After freshly installing them, it may be necessary, to run 
 \family sans
-Edit\SpecialChar \menuseparator
+Tools\SpecialChar \menuseparator
 Reconfigure
 \family default
  from the main LyX menu.
@@ -380,17 +425,38 @@ preview
 \begin_layout Enumerate
 Open LyX, choose 
 \family sans
-Edit\SpecialChar \menuseparator
+Tools\SpecialChar \menuseparator
 Preferences\SpecialChar \menuseparator
 Look and Feel\SpecialChar \menuseparator
-Graphics
+Display
 \family default
- and place a check-mark at 
+ and turn 
 \emph on
 Instant Preview
+\emph default
+ on.
+\end_layout
+
+\begin_layout Enumerate
+In 
+\family sans
+Document\SpecialChar \menuseparator
+Settings\SpecialChar \menuseparator
+Math
+\begin_inset space ~
+\end_inset
+
+Options
+\family default
+, uncheck 
+\emph on
+Use AMS Math package automatically
+\emph default
+ and check 
+\emph on
+Use AMS Math package
 \emph default
 .
 \end_layout
 
 \begin_layout Enumerate
@@ -398,7 +464,11 @@ Test, if
 \family typewriter
 instant-preview
 \family default
- works by opening a LyX-document and entering any math-formula, e.g.
+ works by opening a LyX-document and entering any math-formula, e.
+\begin_inset space \thinspace{}
+\end_inset
+
+g.
  
 \begin_inset Formula $a+b=c$
 \end_inset
@@ -409,36 +479,31 @@ instant-preview
 
 \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
 
 \end_deeper
 \begin_layout Enumerate
 Activate and test 
-\family typewriter
-xypic
-\end_layout
-
-\begin_deeper
-\begin_layout Enumerate
-Choose 
-\family sans
-Layout\SpecialChar \menuseparator
-Document\SpecialChar \menuseparator
-Preamble
-\family default
- and type 
-\family typewriter
+\begin_inset ERT
+status collapsed
 
-\begin_inset Newline newline
-\end_inset
+\begin_layout Plain Layout
 
 
 \backslash
-usepackage[all]{xy}.
+Xy
+\end_layout
+
+\end_inset
+
+-pic
+\family typewriter
+:
 \end_layout
 
+\begin_deeper
 \begin_layout Enumerate
 Inside your LyX-Document, enter the text 
 \family typewriter
@@ -473,12 +538,11 @@ Ctrl-M
 \begin_layout Enumerate
 Move the mouse cursor out of the editing box and wait for a split second
  to see an arrow appear: 
-\begin_inset Formula $\xymatrix{A\ar [r] & B}
+\begin_inset Formula $\xymatrix{A\ar[r] & B}
 $
 \end_inset
 
 .
 \end_layout
 
 \end_deeper
@@ -500,7 +564,7 @@ Xy
 
 \end_inset
 
--Pic
+-pic
 \begin_inset CommandInset citation
 LatexCommand cite
 key "xypic manual"
@@ -588,9 +652,10 @@ xymatrix{
 \end_layout
 
 \begin_layout Standard
-\begin_inset Formula $\xymatrix{U\ar @/_{1pc}/[ddr]_{\psi}\ar @/{}^{1pc}/[drr]^{\varphi}\ar @{.>}[dr]|-{(x,y)}\\
- & X\times_{Z}Y\ar [d]^{q}\ar [r]_{p} & X\ar [d]_{f}\\
- & Y\ar [r]^{g} & Z}
+\begin_inset Formula $\xymatrix{U\ar@/_{1pc}/[ddr]_{\psi}\ar@/{}^{1pc}/[drr]^{\varphi}\ar@{.>}[dr]|-{(x,y)}\\
+ & X\times_{Z}Y\ar[d]^{q}\ar[r]_{p} & X\ar[d]_{f}\\
+ & Y\ar[r]^{g} & Z
+}
 $
 \end_inset
 
@@ -798,9 +863,10 @@ ar[r] & Z }
 \end_layout
 
 \begin_layout Standard
-\begin_inset Formula \xymatrix{ U \ar [ddr] \ar [drr] \ar [dr]\\
- &  X \times_{Z} Y \ar [d] \ar [r]  &  X \ar [d]\\
- &  Y \ar [r]  &  Z }
+\begin_inset Formula \xymatrix{ U \ar[ddr] \ar[drr] \ar[dr]\\
+ &  X \times_{Z} Y \ar[d] \ar[r]  &  X \ar[d]\\
+ &  Y \ar[r]  &  Z 
+}
 
 
 \end_inset
@@ -875,8 +941,16 @@ beta
 \begin_inset Formula $\beta$
 \end_inset
 
- above the arrow, i.e.
-\begin_inset Formula $\xymatrix{\  & \ \ar [l]_{\beta}^{\alpha}.}
+ above the arrow, e.
+\begin_inset space \thinspace{}
+\end_inset
+
+g.
+\begin_inset space \space{}
+\end_inset
+
+
+\begin_inset Formula $\xymatrix{\  & \ \ar[l]_{\beta}^{\alpha}.}
 $
 \end_inset
 
@@ -954,9 +1028,10 @@ ar[r]^g & Z }
 \end_layout
 
 \begin_layout LyX-Code
-\begin_inset Formula \xymatrix{ U \ar [ddr]_{\psi}\ar [drr]^{\varphi}\ar [dr]|-{(x,y)}\\
- &  X \times_{Z} Y \ar [d]^{q} \ar [r]_{p}  &  X \ar [d]_{f}\\
- &  Y \ar [r]^{g}  &  Z }
+\begin_inset Formula \xymatrix{ U \ar[ddr]_{\psi}\ar[drr]^{\varphi}\ar[dr]|-{(x,y)}\\
+ &  X \times_{Z} Y \ar[d]^{q} \ar[r]_{p}  &  X \ar[d]_{f}\\
+ &  Y \ar[r]^{g}  &  Z 
+}
 
 
 \end_inset
@@ -978,7 +1053,11 @@ Xy
 \end_inset
 
 -pic normally permits labels to be shifted towards the tip or towards the
- start of an arrow by prefixing the label with a ratio, such as e.g.
+ start of an arrow by prefixing the label with a ratio, such as e.
+\begin_inset space \thinspace{}
+\end_inset
+
+g.
  
 \family typewriter
 (.3)
@@ -1013,7 +1092,11 @@ Xy
 
 \end_inset
 
--pic code such as e.g.
+-pic code such as e.
+\begin_inset space \thinspace{}
+\end_inset
+
+g.
  
 \family typewriter
 
@@ -1035,7 +1118,7 @@ psi
 \end_layout
 
 \begin_layout Subsection
-Arrow modification 
+Arrow modification
 \end_layout
 
 \begin_layout Standard
@@ -1060,11 +1143,11 @@ Modification of the design, the form or the positioning of arrows are introduced
 \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
@@ -1111,7 +1194,7 @@ ar@{>..>>}
  produces an arrow with split end, a dotted shaft and double head.
  A number of other arrow designs is given in the table below.
  Note that the ends of embedding arrows 
-\begin_inset Formula $\xymatrix{A\ar @{^{(}->}[r] & B}
+\begin_inset Formula $\xymatrix{A\ar@{^{(}->}[r] & B}
 $
 \end_inset
 
@@ -1129,7 +1212,7 @@ ar@{^(->}[r].
 \begin_layout Standard
 \begin_inset Tabular
 <lyxtabular version="3" rows="11" columns="2">
-<features islongtable="true">
+<features islongtable="true" longtabularalignment="center">
 <column alignment="center" valignment="top" width="0">
 <column alignment="center" valignment="top" width="0">
 <row>
@@ -1157,7 +1240,7 @@ Source code in LyX
 \begin_inset Text
 
 \begin_layout Plain Layout
-\begin_inset Formula \xymatrix{\ \ar [r]  &  \ }
+\begin_inset Formula \xymatrix{\ \ar[r]  &  \ }
 
 
 \end_inset
@@ -1186,7 +1269,7 @@ ar
 \begin_inset Text
 
 \begin_layout Plain Layout
-\begin_inset Formula \xymatrix{\ \ar @{-->}[r]  &  \ }
+\begin_inset Formula \xymatrix{\ \ar@{-->}[r]  &  \ }
 
 
 \end_inset
@@ -1215,7 +1298,7 @@ ar@{-->}
 \begin_inset Text
 
 \begin_layout Plain Layout
-\begin_inset Formula \xymatrix{\ \ar @{..>}[r]  &  \ }
+\begin_inset Formula \xymatrix{\ \ar@{..>}[r]  &  \ }
 
 
 \end_inset
@@ -1244,7 +1327,7 @@ ar@{..>}
 \begin_inset Text
 
 \begin_layout Plain Layout
-\begin_inset Formula \xymatrix{\ \ar @{~>}[r]  &  \ }
+\begin_inset Formula \xymatrix{\ \ar@{~>}[r]  &  \ }
 
 
 \end_inset
@@ -1273,7 +1356,7 @@ ar@{~>}
 \begin_inset Text
 
 \begin_layout Plain Layout
-\begin_inset Formula \xymatrix{\ \ar @{->>}[r]  &  \ }
+\begin_inset Formula \xymatrix{\ \ar@{->>}[r]  &  \ }
 
 
 \end_inset
@@ -1302,7 +1385,7 @@ ar@{->>}
 \begin_inset Text
 
 \begin_layout Plain Layout
-\begin_inset Formula \xymatrix{\ \ar @{-->>}[r]  &  \ }
+\begin_inset Formula \xymatrix{\ \ar@{-->>}[r]  &  \ }
 
 
 \end_inset
@@ -1331,7 +1414,7 @@ ar@{-->>}
 \begin_inset Text
 
 \begin_layout Plain Layout
-\begin_inset Formula \xymatrix{\ \ar @{>->>}[r]  &  \ }
+\begin_inset Formula \xymatrix{\ \ar@{>->>}[r]  &  \ }
 
 
 \end_inset
@@ -1360,7 +1443,7 @@ ar@{>->>}
 \begin_inset Text
 
 \begin_layout Plain Layout
-\begin_inset Formula \xymatrix{\ \ar @{_{(}->}[r]  &  \ }
+\begin_inset Formula \xymatrix{\ \ar@{_{(}->}[r]  &  \ }
 
 
 \end_inset
@@ -1389,7 +1472,7 @@ ar@{_(->}
 \begin_inset Text
 
 \begin_layout Plain Layout
-\begin_inset Formula \xymatrix{\ \ar @{^{(}->}[r]  &  \ }
+\begin_inset Formula \xymatrix{\ \ar@{^{(}->}[r]  &  \ }
 
 
 \end_inset
@@ -1418,7 +1501,7 @@ ar@{^(->}
 \begin_inset Text
 
 \begin_layout Plain Layout
-\begin_inset Formula \xymatrix{\ \ar @{|-|}[r]  &  \ }
+\begin_inset Formula \xymatrix{\ \ar@{|-|}[r]  &  \ }
 
 
 \end_inset
@@ -1450,19 +1533,8 @@ ar@{|-|}
 \end_layout
 
 \begin_layout Standard
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-noindent
-\end_layout
-
-\end_inset
-
- Following the @-character by either a 2, 3, _,or a ^, we can produce arrows
+\noindent
+Following the @-character by either a 2, 3, _,or a ^, we can produce arrows
  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 :
@@ -1475,7 +1547,7 @@ noindent
 \begin_layout Standard
 \begin_inset Tabular
 <lyxtabular version="3" rows="8" columns="2">
-<features islongtable="true">
+<features islongtable="true" longtabularalignment="center">
 <column alignment="center" valignment="top" width="0">
 <column alignment="center" valignment="top" width="0">
 <row>
@@ -1503,7 +1575,7 @@ Source code for LyX
 \begin_inset Text
 
 \begin_layout Plain Layout
-\begin_inset Formula \xymatrix{\ \ar @2[r]  &  \ }
+\begin_inset Formula \xymatrix{\ \ar@2[r]  &  \ }
 
 
 \end_inset
@@ -1532,7 +1604,7 @@ ar@2
 \begin_inset Text
 
 \begin_layout Plain Layout
-\begin_inset Formula \xymatrix{\ \ar @3[r]  &  \ }
+\begin_inset Formula \xymatrix{\ \ar@3[r]  &  \ }
 
 
 \end_inset
@@ -1561,7 +1633,7 @@ ar@3
 \begin_inset Text
 
 \begin_layout Plain Layout
-\begin_inset Formula \xymatrix{\ \ar @_{->}[r]  &  \ }
+\begin_inset Formula \xymatrix{\ \ar@_{->}[r]  &  \ }
 
 
 \end_inset
@@ -1590,7 +1662,7 @@ ar@_{->}
 \begin_inset Text
 
 \begin_layout Plain Layout
-\begin_inset Formula \xymatrix{\ \ar @^{->}[r]  &  \ }
+\begin_inset Formula \xymatrix{\ \ar@^{->}[r]  &  \ }
 
 
 \end_inset
@@ -1619,7 +1691,7 @@ ar@^{->}
 \begin_inset Text
 
 \begin_layout Plain Layout
-\begin_inset Formula \xymatrix{\ \ar @^{>>->>}[r]  &  \ }
+\begin_inset Formula \xymatrix{\ \ar@^{>>->>}[r]  &  \ }
 
 
 \end_inset
@@ -1648,7 +1720,7 @@ ar@^{>>->>}
 \begin_inset Text
 
 \begin_layout Plain Layout
-\begin_inset Formula \xymatrix{\ \ar @{^{<}-_{>}}[r]  &  \ }
+\begin_inset Formula \xymatrix{\ \ar@{^{<}-_{>}}[r]  &  \ }
 
 
 \end_inset
@@ -1677,7 +1749,7 @@ ar@{^<-_>}
 \begin_inset Text
 
 \begin_layout Plain Layout
-\begin_inset Formula \xymatrix{\ \ar @2{--}[r]  &  \ }
+\begin_inset Formula \xymatrix{\ \ar@2{--}[r]  &  \ }
 
 
 \end_inset
@@ -1724,7 +1796,7 @@ Within certain limits there is even a way to design your own arrows.
 \backslash
 newdir
 \family default
- command in the preample.
+ command in the preamble.
  For explanations, we refer to the 
 \family typewriter
 
@@ -1756,18 +1828,7 @@ newdir{|>}{!/4.5pt/@{|}*:(1,-.2)@^{>}*:(1,+.2)@_{>}}
 \end_layout
 
 \begin_layout Standard
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-noindent 
-\end_layout
-
-\end_inset
-
+\noindent
 This defines a new arrow tip, referred to as 
 \family typewriter
 |>
@@ -1780,7 +1841,7 @@ ar@{-|>}[r]
 \family default
  and which displays correctly in LyX as:
 \begin_inset Formula \[
-\xymatrix{A\ar @{-|>}[r] & \ \  B}
+\xymatrix{A\ar@{-|>}[r] & \ \ B}
 \]
 
 \end_inset
@@ -1830,19 +1891,8 @@ ar@<1ex>[l]}
 \end_layout
 
 \begin_layout Standard
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-noindent
-\end_layout
-
-\end_inset
-
- produces
+\noindent
+produces
 \begin_inset space ~
 \end_inset
 
@@ -1852,7 +1902,7 @@ noindent
 
 
 \begin_inset Formula \[
-\xymatrix{\circ\ar @<1ex>[r] & \circ\ar @<1ex>[l]}
+\xymatrix{\circ\ar@<1ex>[r] & \circ\ar@<1ex>[l]}
 \]
  
 
@@ -1867,7 +1917,7 @@ Inline or centered diagrams
 
 \begin_layout Standard
 Arrows and diagrams can be used inline, such as this one: 
-\begin_inset Formula $\xymatrix{\circ\ar @<1ex>[r] & \circ\ar @<1ex>[l]}
+\begin_inset Formula $\xymatrix{\circ\ar@<1ex>[r] & \circ\ar@<1ex>[l]}
 $
 \end_inset
 
@@ -1877,7 +1927,7 @@ $
 \family sans
 Ctrl-m
 \family default
- for inline appearence or 
+ for inline appearance or 
 \family sans
 Ctrl-M
 \family default
@@ -1891,11 +1941,11 @@ Math
  
 \family sans
 \SpecialChar \menuseparator
-Alignment.
+Change Formula Type.
 \end_layout
 
 \begin_layout Subsection
-Bending arrows 
+Bending arrows
 \end_layout
 
 \begin_layout Standard
@@ -1924,7 +1974,11 @@ For bending arrows we use the modifier @/
 \family typewriter
 xypic
 \family default
-, we could simply write, e.g.
+, we could simply write, e.
+\begin_inset space \thinspace{}
+\end_inset
+
+g.
  
 \family typewriter
 
@@ -1936,7 +1990,11 @@ ar@/_1pc/
 1pc
 \family default
  downwards, this cannot directly be done in LyX.
- It is necessary, to enclose the measure in a pair of braces, such as e.g.
+ It is necessary, to enclose the measure in a pair of braces, such as e.
+\begin_inset space \thinspace{}
+\end_inset
+
+g.
  
 \family typewriter
 
@@ -1969,7 +2027,7 @@ ar@/_{.5pc}/[l]}
 
 \begin_layout Standard
 \begin_inset Formula \[
-\xymatrix{A\ar @/{}_{.5pc}/[r] & B\ar @/{}_{.5pc}/[l]}
+\xymatrix{A\ar@/{}_{.5pc}/[r] & B\ar@/{}_{.5pc}/[l]}
 \]
 
 \end_inset
@@ -1978,8 +2036,7 @@ ar@/_{.5pc}/[l]}
 \end_layout
 
 \begin_layout Subsubsection
-Specifying exit- and entrance directions.
+Specifying exit- and entrance directions
 \end_layout
 
 \begin_layout Standard
@@ -2043,8 +2100,9 @@ in
 
 \begin_layout Standard
 \begin_inset Formula \[
-\xymatrix{A\ar @(dr,dl)[r]\ar @(dr,dl)[rr] & B\ar @(d,r)[dl] & C\\
-E\ar @(ul,ur)}
+\xymatrix{A\ar@(dr,dl)[r]\ar@(dr,dl)[rr] & B\ar@(d,r)[dl] & C\\
+E\ar@(ul,ur)
+}
 \]
 
 \end_inset
@@ -2090,7 +2148,7 @@ The above example is reminiscent of an automata diagram, except that in
 \end_layout
 
 \begin_layout Subsubsection
-Framing objects 
+Framing objects
 \end_layout
 
 \begin_layout Standard
@@ -2107,7 +2165,7 @@ Xy
 
 \end_inset
 
--Pic, entries can obtain a single or a double frame, such as 
+-pic, entries can obtain a single or a double frame, such as 
 \begin_inset Formula $\xymatrix{*+[F]{A}}
 $
 \end_inset
@@ -2157,7 +2215,7 @@ $
 
 \begin_layout Standard
 \begin_inset Formula \[
-\xymatrix{\txt {start}\ar [r] & *++[o][F]{1}\ar [r] & *++[o][F=]{2}\ar @(ur,dr)\ar @(ur,ul)[l]}
+\xymatrix{\txt{start}\ar[r] & *++[o][F]{1}\ar[r] & *++[o][F=]{2}\ar@(ur,dr)\ar@(ur,ul)[l]}
 \]
 
 \end_inset
@@ -2166,19 +2224,8 @@ $
 \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
@@ -2299,8 +2346,9 @@ The dimension of the rectangle is given as a dotted pair
  These are followed by the framing commands, to produce figures such as
  the following: 
 \begin_inset Formula \[
-\xymatrix{A & B\ar @(d,r)[dl]\sp (0.2)\phi\sp (0.7)\psi\save "1,1"."2,1"*+[F=]\frm {}\restore \,\\
-C & \save "1,1"."1,2"*++[F]\frm {}\restore }
+\xymatrix{A & B\ar@(d,r)[dl]\sp(0.2)\phi\sp(0.7)\psi\save"1,1"."2,1"*+[F=]\frm{}\restore\,\\
+C & \save"1,1"."1,2"*++[F]\frm{}\restore
+}
 \]
 
 \end_inset
@@ -2361,6 +2409,13 @@ restore
 
 \begin_layout Section
 Using LyX's math editor
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:math-editor"
+
+\end_inset
+
+
 \end_layout
 
 \begin_layout Standard
@@ -2448,7 +2503,11 @@ Braces that are entered without the backslash
 
 \family default
  will just appear as typed, but cannot be used to receive a macro parameter.
- They are useful, for instance to denote sets, e.g.
+ They are useful, for instance to denote sets, e.
+\begin_inset space \thinspace{}
+\end_inset
+
+g.
  
 \family typewriter
 {x
@@ -2531,7 +2590,11 @@ Alt-m c
 Alt-m w
 \family default
  for the row commands.
+ A more direct way uses the icons in the math toolbar once it has been activated
+ via 
+\family sans
+View\SpecialChar \menuseparator
+Toolbars.
 \end_layout
 
 \begin_layout Subsection
 \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
-Finally, modify the appearance of the arrows by entering @-modifiers @{\SpecialChar \ldots{}
-},
- @<\SpecialChar \ldots{}
->, @(\SpecialChar \ldots{}
+Finally, you can modify the appearance of the arrows by entering @-modifiers
+\family typewriter
+@{
+\family default
+\SpecialChar \ldots{}
+
+\family typewriter
+}
+\family default
+, 
+\family typewriter
+@<
+\family default
+\SpecialChar \ldots{}
+>, 
+\family typewriter
+@(
+\family default
+\SpecialChar \ldots{}
 ,\SpecialChar \ldots{}
-) or @/\SpecialChar \ldots{}
-/.
+) or 
+\family typewriter
+@/
+\family default
+\SpecialChar \ldots{}
+
+\family typewriter
+/
+\family default
+.
  The above caveat applies to the first form only.
  It must be entered as 
 \family typewriter
@@ -2623,30 +2709,66 @@ Finally, modify the appearance of the arrows by entering @-modifiers @{\SpecialC
 \end_layout
 
 \begin_layout Standard
-The other modifiers, @<\SpecialChar \ldots{}
->, @(\SpecialChar \ldots{}
+The other modifiers, 
+\family typewriter
+@<
+\family default
+\SpecialChar \ldots{}
+
+\family typewriter
+>
+\family default
+, 
+\family typewriter
+@(
+\family default
+\SpecialChar \ldots{}
 ,\SpecialChar \ldots{}
-) and @/\SpecialChar \ldots{}
-/ are typed as shown with the arrow
- description replacing the ellipsis.
+
+\family typewriter
+) 
+\family default
+and 
+\family typewriter
+@/
+\family default
+\SpecialChar \ldots{}
+
+\family typewriter
+/ 
+\family default
+are typed as shown with the arrow description replacing the ellipsis.
  The code for bending arrows, which in 
 \family typewriter
 xypic
 \family default
- is @/_
+ is 
+\family typewriter
+@/_
+\family default
 \emph on
 measure
+\family typewriter
 \emph default
-/ or @/
+/ 
+\family default
+or 
+\family typewriter
+@/
 \emph on
-^measure
+^
+\family default
+measure
+\family typewriter
 \emph default
-/ where 
+/ 
+\family default
+where 
 \emph on
 measure
 \emph default
- is any valid TeX-measure, 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
@@ -2666,12 +2788,24 @@ lly convert it into graphical output.
 \end_layout
 
 \begin_layout Standard
-A more serious reason could be a syntactical error in your input.
- If necessary, redo the last editing steps, using Ctrl-z, or try to translate
- the LyX-file into dvi using Ctrl-d or 
+A more serious reason could be a syntactical error in your input (in that
+ case, the math edition area disappears completely).
+ If necessary, undo the last editing steps, using 
+\family sans
+Ctrl+Z
+\family default
+, or try to translate the LyX-file into 
+\family sans
+DVI
+\family default
+ using 
+\family sans
+Ctrl+D
+\family default
+ or 
 \family sans
 View\SpecialChar \menuseparator
-Dvi
+DVI
 \family default
 .
  There should be some error generated, which hopefully gives you a hint
@@ -2804,13 +2938,13 @@ xymatrixrowsep@
 \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
@@ -2823,28 +2957,10 @@ xyR}[1]{%
 
 \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
@@ -2905,8 +3021,8 @@ xyC
 {
 \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
@@ -2927,8 +3043,9 @@ xyC{.5pc}
 
 \begin_layout Standard
 \begin_inset Formula \[
-\xyC {.5pc}\xyC {9pc}\xymatrix{A\ar [r]\ar [d] & B\\
-C\ar @{}[ur]|{\text{{horizontal stretch}}}}
+\xyC{.5pc}\xyC{9pc}\xymatrix{A\ar[r]\ar[d] & B\\
+C\ar@{}[ur]|{\text{{horizontal stretch}}}
+}
 \]
 
 \end_inset
@@ -2954,13 +3071,13 @@ Xy
 
 \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 open
+status collapsed
 
 \begin_layout Plain Layout
 
@@ -3070,8 +3187,9 @@ phi_{4}}.
 
 \begin_layout Standard
 \begin_inset Formula \[
-\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}}\\
-\circ\ar [ur]\sb (0.3)\phi & \bullet}
+\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}}\\
+\circ\ar[ur]\sb(0.3)\phi & \bullet
+}
 \]
 
 \end_inset
@@ -3087,7 +3205,11 @@ Invisible stretched arrows
 A more general trick uses invisible arrows to place any object almost anywhere
  inside a diagram.
  Produce an invisible arrow, shorten (or prolong) it past its goal by adding
- a decimal stretching ratio, e.g.
+ a decimal stretching ratio, e.
+\begin_inset space \thinspace{}
+\end_inset
+
+g.
  
 \family typewriter
 (0.6)
@@ -3166,7 +3288,158 @@ horizontal stretch
  into the center of the figure.
 \end_layout
 
+\begin_layout Subsection
+Further 
+\family typewriter
+
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+Xy
+\end_layout
+
+\end_inset
+
+
+\family default
+-tricks
+\end_layout
+
+\begin_layout Standard
+Here we have focused only on the 
+\family typewriter
+
+\backslash
+xymatrix
+\family default
+ command, which is just one of the features available in Kris Rose's amazing
+\family typewriter
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+Xy
+\end_layout
+
+\end_inset
+
+
+\family default
+-package.
+ The 
+\family typewriter
+
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+Xy
+\end_layout
+
+\end_inset
+
+
+\family default
+-pic manual 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "xypic manual"
+
+\end_inset
+
+ demonstrates many of the advanced possibilities of that package.
+ Beware, that its style is rather terse and you will likely need a lot of
+ experimenting and modifying the many worked examples.
+ Lauda 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "Lauda"
+
+\end_inset
+
+ explains how to use 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+Xy
+\end_layout
+
+\end_inset
+
+-pic to make braids, cobordism, string diagrams, and much more.
+ You might want to look on 
+\family typewriter
+inset_preview.lyx
+\family default
+ example shipped with LyX, which demonstrates how to use more advanced 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+Xy
+\end_layout
+
+\end_inset
+
+-commands via 
+\family typewriter
+ERT
+\family default
+ and 
+\family typewriter
+Instant preview
+\family default
+ insets.
+ A good and rather systematic introduction to 
+\family typewriter
+
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+Xy
+\end_layout
+
+\end_inset
+
+
+\family default
+-matrix is 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "Ouvaton"
+
+\end_inset
+
+.
+ Even if you share with me the disadvantage of not being fluent in Esperanto,
+ you will be able to understand most of it.
+\end_layout
+
 \begin_layout Bibliography
+\labelwidthstring References
 \begin_inset CommandInset bibitem
 LatexCommand bibitem
 label "1"
@@ -3190,7 +3463,7 @@ Xy
 
 
 \emph on
--Pic User's Guide
+-pic User's Guide
 \emph default
 .
  Version 3.7, Feb.
@@ -3204,6 +3477,7 @@ xypic
 \end_layout
 
 \begin_layout Bibliography
+\labelwidthstring References
 \begin_inset CommandInset bibitem
 LatexCommand bibitem
 label "2"
@@ -3226,6 +3500,7 @@ http://www.tug.org/tex-archive/help/Catalogue/entries/preview-latex.html
 \end_layout
 
 \begin_layout Bibliography
+\labelwidthstring References
 \begin_inset CommandInset bibitem
 LatexCommand bibitem
 label "3"
@@ -3248,6 +3523,7 @@ http://www.tug.org/tex-archive/help/Catalogue/entries/xypic.html
 \end_layout
 
 \begin_layout Bibliography
+\labelwidthstring References
 \begin_inset CommandInset bibitem
 LatexCommand bibitem
 label "4"
@@ -3267,6 +3543,95 @@ http://www.gnu.org/software/auctex/
 \end_inset
 
 
+\end_layout
+
+\begin_layout Bibliography
+\labelwidthstring References
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "5"
+key "Lauda"
+
+\end_inset
+
+Aarlon Lauda: 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+Xy
+\end_layout
+
+\end_inset
+
+
+\emph on
+-pic
+\emph default
+\emph on
+tutorial with an archive of examples
+\emph default
+.
+\begin_inset Flex URL
+status collapsed
+
+\begin_layout Plain Layout
+
+http://www.math.columbia.edu/~lauda/xy/
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Bibliography
+\labelwidthstring References
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "6"
+key "Ouvaton"
+
+\end_inset
+
+Filipp Ouvaton: 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+Xy
+\end_layout
+
+\end_inset
+
+
+\emph on
+-pic
+\emph default
+: 
+\emph on
+Enkonduko pri Xymatrix
+\emph default
+.
+\begin_inset Flex URL
+status collapsed
+
+\begin_layout Plain Layout
+
+http://filip.ouvaton.org/xypic/xymatrix/index.html
+\end_layout
+
+\end_inset
+
+
 \end_layout
 
 \end_body