X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=lib%2Fexamples%2Fxypic.lyx;h=121ef160e2b22b5007ca1ecb0a8f972c22aa240c;hb=3c93d5078918f43af76827d2991ed5fa35a3a20e;hp=79ed0f8d8877fa31ba5c533b22b8fd8cb59c1c14;hpb=19dd4f45833e1f368d28aa5194f43985b8a2857c;p=lyx.git diff --git a/lib/examples/xypic.lyx b/lib/examples/xypic.lyx index 79ed0f8d88..121ef160e2 100644 --- a/lib/examples/xypic.lyx +++ b/lib/examples/xypic.lyx @@ -1,12 +1,11 @@ -#LyX 2.0.0svn created this file. For more info see http://www.lyx.org/ -\lyxformat 370 +#LyX 2.0 created this file. For more info see http://www.lyx.org/ +\lyxformat 413 \begin_document \begin_header \textclass scrartcl \begin_preamble \usepackage[all]{xy} - % define new commands used in sec. 5.1 \newcommand{\xyR}[1]{ \xydef@\xymatrixrowsep@{#1}} @@ -28,13 +27,16 @@ \end_preamble \options BCOR7.5mm \use_default_options false +\maintain_unincluded_children false \language english +\language_package default \inputencoding auto +\fontencoding global \font_roman ae \font_sans default \font_typewriter default \font_default_family default -\use_xetex false +\use_non_tex_fonts false \font_sc false \font_osf false \font_sf_scale 100 @@ -42,6 +44,7 @@ \graphics default \default_output_format default +\output_sync 0 \bibtex_command default \index_command default \paperfontsize 12 @@ -65,11 +68,14 @@ \use_geometry false \use_amsmath 1 \use_esint 0 +\use_mhchem 1 +\use_mathdots 1 \cite_engine basic \use_bibtopic false \use_indices false \paperorientation portrait \suppress_date false +\use_refstyle 0 \index Index \shortcut idx \color #008000 @@ -84,6 +90,9 @@ \paperpagestyle default \tracking_changes false \output_changes false +\html_math_output 0 +\html_css_as_file 0 +\html_be_strict true \end_header \begin_body @@ -132,7 +141,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 @@ -201,7 +210,7 @@ xypic \align center \begin_inset Graphics filename xyfigure.png - scale 50 + width 75col% BoundingBox 0bp 0bp 580bp 440bp clip @@ -256,7 +265,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 @@ -279,7 +288,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 @@ -307,7 +316,7 @@ 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 \begin_inset CommandInset ref @@ -329,7 +338,7 @@ Xy \end_inset --Pic commands inside a math-editing area. +-pic commands inside a math-editing area. \end_layout @@ -347,7 +356,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 @@ -361,7 +370,7 @@ Xy \end_inset --Pic manual +-pic manual \begin_inset CommandInset citation LatexCommand cite key "xypic manual" @@ -404,7 +413,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. @@ -421,17 +430,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 @@ -473,7 +503,7 @@ Xy \end_inset --Pic +-pic \family typewriter : \end_layout @@ -518,7 +548,6 @@ $ \end_inset . - \end_layout \end_deeper @@ -540,7 +569,7 @@ Xy \end_inset --Pic +-pic \begin_inset CommandInset citation LatexCommand cite key "xypic manual" @@ -844,7 +873,6 @@ ar[r] & Z } & Y \ar[r] & Z } - \end_inset @@ -917,7 +945,7 @@ beta \begin_inset Formula $\beta$ \end_inset - above the arrow, i. + above the arrow, e. \begin_inset space \thinspace{} \end_inset @@ -1009,7 +1037,6 @@ ar[r]^g & Z } & Y \ar[r]^{g} & Z } - \end_inset @@ -1218,7 +1245,6 @@ Source code in LyX \begin_layout Plain Layout \begin_inset Formula \xymatrix{\ \ar[r] & \ } - \end_inset @@ -1247,7 +1273,6 @@ ar \begin_layout Plain Layout \begin_inset Formula \xymatrix{\ \ar@{-->}[r] & \ } - \end_inset @@ -1276,7 +1301,6 @@ ar@{-->} \begin_layout Plain Layout \begin_inset Formula \xymatrix{\ \ar@{..>}[r] & \ } - \end_inset @@ -1305,7 +1329,6 @@ ar@{..>} \begin_layout Plain Layout \begin_inset Formula \xymatrix{\ \ar@{~>}[r] & \ } - \end_inset @@ -1334,7 +1357,6 @@ ar@{~>} \begin_layout Plain Layout \begin_inset Formula \xymatrix{\ \ar@{->>}[r] & \ } - \end_inset @@ -1363,7 +1385,6 @@ ar@{->>} \begin_layout Plain Layout \begin_inset Formula \xymatrix{\ \ar@{-->>}[r] & \ } - \end_inset @@ -1392,7 +1413,6 @@ ar@{-->>} \begin_layout Plain Layout \begin_inset Formula \xymatrix{\ \ar@{>->>}[r] & \ } - \end_inset @@ -1421,7 +1441,6 @@ ar@{>->>} \begin_layout Plain Layout \begin_inset Formula \xymatrix{\ \ar@{_{(}->}[r] & \ } - \end_inset @@ -1450,7 +1469,6 @@ ar@{_(->} \begin_layout Plain Layout \begin_inset Formula \xymatrix{\ \ar@{^{(}->}[r] & \ } - \end_inset @@ -1479,7 +1497,6 @@ ar@{^(->} \begin_layout Plain Layout \begin_inset Formula \xymatrix{\ \ar@{|-|}[r] & \ } - \end_inset @@ -1553,7 +1570,6 @@ Source code for LyX \begin_layout Plain Layout \begin_inset Formula \xymatrix{\ \ar@2[r] & \ } - \end_inset @@ -1582,7 +1598,6 @@ ar@2 \begin_layout Plain Layout \begin_inset Formula \xymatrix{\ \ar@3[r] & \ } - \end_inset @@ -1611,7 +1626,6 @@ ar@3 \begin_layout Plain Layout \begin_inset Formula \xymatrix{\ \ar@_{->}[r] & \ } - \end_inset @@ -1640,7 +1654,6 @@ ar@_{->} \begin_layout Plain Layout \begin_inset Formula \xymatrix{\ \ar@^{->}[r] & \ } - \end_inset @@ -1669,7 +1682,6 @@ ar@^{->} \begin_layout Plain Layout \begin_inset Formula \xymatrix{\ \ar@^{>>->>}[r] & \ } - \end_inset @@ -1698,7 +1710,6 @@ ar@^{>>->>} \begin_layout Plain Layout \begin_inset Formula \xymatrix{\ \ar@{^{<}-_{>}}[r] & \ } - \end_inset @@ -1727,7 +1738,6 @@ ar@{^<-_>} \begin_layout Plain Layout \begin_inset Formula \xymatrix{\ \ar@2{--}[r] & \ } - \end_inset @@ -1816,7 +1826,8 @@ This defines a new arrow tip, referred to as ar@{-|>}[r] \family default and which displays correctly in LyX as: -\begin_inset Formula \[ +\begin_inset Formula +\[ \xymatrix{A\ar@{-|>}[r] & \ \ B} \] @@ -1877,7 +1888,8 @@ produces \end_inset -\begin_inset Formula \[ +\begin_inset Formula +\[ \xymatrix{\circ\ar@<1ex>[r] & \circ\ar@<1ex>[l]} \] @@ -1917,7 +1929,7 @@ Math \family sans \SpecialChar \menuseparator -Alignment. +Change Formula Type. \end_layout \begin_layout Subsection @@ -2002,7 +2014,8 @@ ar@/_{.5pc}/[l]} \end_layout \begin_layout Standard -\begin_inset Formula \[ +\begin_inset Formula +\[ \xymatrix{A\ar@/{}_{.5pc}/[r] & B\ar@/{}_{.5pc}/[l]} \] @@ -2075,7 +2088,8 @@ in \end_layout \begin_layout Standard -\begin_inset Formula \[ +\begin_inset Formula +\[ \xymatrix{A\ar@(dr,dl)[r]\ar@(dr,dl)[rr] & B\ar@(d,r)[dl] & C\\ E\ar@(ul,ur) } @@ -2141,7 +2155,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 @@ -2190,7 +2204,8 @@ $ \end_layout \begin_layout Standard -\begin_inset Formula \[ +\begin_inset Formula +\[ \xymatrix{\txt{start}\ar[r] & *++[o][F]{1}\ar[r] & *++[o][F=]{2}\ar@(ur,dr)\ar@(ur,ul)[l]} \] @@ -2321,7 +2336,8 @@ 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 \[ +\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 } @@ -2566,7 +2582,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 @@ -2760,19 +2780,20 @@ 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 -\emph on +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 -\emph default +\family default , or try to translate the LyX-file into -\emph on +\family sans DVI -\emph default +\family default using -\emph on +\family sans Ctrl+D -\emph default +\family default or \family sans View\SpecialChar \menuseparator @@ -3013,7 +3034,8 @@ xyC{.5pc} \end_layout \begin_layout Standard -\begin_inset Formula \[ +\begin_inset Formula +\[ \xyC{.5pc}\xyC{9pc}\xymatrix{A\ar[r]\ar[d] & B\\ C\ar@{}[ur]|{\text{{horizontal stretch}}} } @@ -3157,7 +3179,8 @@ phi_{4}}. \end_layout \begin_layout Standard -\begin_inset Formula \[ +\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 } @@ -3322,7 +3345,7 @@ Xy \family default --Pic manual +-pic manual \begin_inset CommandInset citation LatexCommand cite key "xypic manual" @@ -3353,6 +3376,32 @@ Xy \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 @@ -3408,7 +3457,7 @@ Xy \emph on --Pic User's Guide +-pic User's Guide \emph default . Version 3.7, Feb. @@ -3514,7 +3563,7 @@ Xy \emph on --Pic +-pic \emph default \emph on @@ -3526,7 +3575,7 @@ status collapsed \begin_layout Plain Layout -http://www.dpmms.cam.ac.uk/~al366/xytutorial.html +http://www.math.columbia.edu/~lauda/xy/ \end_layout \end_inset @@ -3558,7 +3607,7 @@ Xy \emph on --Pic +-pic \emph default : \emph on