]> git.lyx.org Git - lyx.git/blob - lib/examples/xypic.lyx
achemso: fix a typo, add a new inset for chemical symbols like H2SO4, fix wrong citation
[lyx.git] / lib / examples / xypic.lyx
1 #LyX 1.6.0 created this file. For more info see http://www.lyx.org/
2 \lyxformat 345
3 \begin_document
4 \begin_header
5 \textclass article
6 \begin_preamble
7 \usepackage[all]{xy}
8
9
10 \makeatletter
11 \newcommand{\xyR}[1]{
12   \makeatletter
13   \xydef@\xymatrixrowsep@{#1}
14   \makeatother
15 }
16 \makeatletter
17 \newcommand{\xyC}[1]{
18   \makeatletter
19   \xydef@\xymatrixcolsep@{#1}
20   \makeatother
21 }
22
23 \newdir{|>}{!/4.5pt/@{|}*:(1,-.2)@^{>}*:(1,+.2)@_{>}}
24 \end_preamble
25 \use_default_options false
26 \language english
27 \inputencoding auto
28 \font_roman ae
29 \font_sans default
30 \font_typewriter default
31 \font_default_family default
32 \font_sc false
33 \font_osf false
34 \font_sf_scale 100
35 \font_tt_scale 100
36 \graphics default
37 \paperfontsize default
38 \spacing single
39 \use_hyperref false
40 \papersize a4paper
41 \use_geometry false
42 \use_amsmath 1
43 \use_esint 0
44 \cite_engine basic
45 \use_bibtopic false
46 \paperorientation portrait
47 \secnumdepth 3
48 \tocdepth 3
49 \paragraph_separation indent
50 \defskip medskip
51 \quotes_language english
52 \papercolumns 1
53 \papersides 1
54 \paperpagestyle default
55 \tracking_changes false
56 \output_changes false
57 \author ""
58 \author ""
59 \end_header
60
61 \begin_body
62
63 \begin_layout Title
64 Using 
65 \begin_inset ERT
66 status collapsed
67
68 \begin_layout Plain Layout
69
70
71 \backslash
72 Xy
73 \end_layout
74
75 \end_inset
76
77 -pic in LyX
78 \end_layout
79
80 \begin_layout Author
81 H.
82  Peter Gumm
83 \end_layout
84
85 \begin_layout Abstract
86 With the recent versions of LyX and with the 
87 \family typewriter
88 preview
89 \family default
90 -style installed in the LaTeX-System, the graph drawing package 
91 \family typewriter
92
93 \begin_inset ERT
94 status collapsed
95
96 \begin_layout Plain Layout
97
98
99 \backslash
100 Xy
101 \end_layout
102
103 \end_inset
104
105
106 \family default
107 -Pic can be conveniently used inside LyX.
108  Diagrams can be edited and displayed inside the main LyX editing window.
109  Here, we shall describe how to use the 
110 \family typewriter
111
112 \backslash
113 xymatrix
114 \family default
115  command from 
116 \family typewriter
117 xypic
118 \family default
119  inside LyX in order to draw, to edit and to preview diagrams as typically
120  used in category theory, algebra, and related fields.
121  
122 \end_layout
123
124 \begin_layout Abstract
125 \begin_inset CommandInset toc
126 LatexCommand tableofcontents
127
128 \end_inset
129
130
131 \end_layout
132
133 \begin_layout Section
134 Introduction 
135 \end_layout
136
137 \begin_layout Standard
138 The 
139 \family typewriter
140 xypic
141 \family default
142 -package has long served as a convenient tool for easily constructing graphs
143  and diagrams in LaTeX.
144  Unfortunately, its use in LyX had long been restricted to the infamous
145  ERT-boxes, meaning that the LyX editor could only display the LaTeX-source
146  and not the finished diagram.
147  The new 
148 \family typewriter
149 preview
150 \family default
151 -style of LaTeX which is part of the AUCTeX project
152 \begin_inset CommandInset citation
153 LatexCommand cite
154 key "AUCTeX"
155
156 \end_inset
157
158 , finally enables the editing and displaying of 
159 \family typewriter
160 xypic
161 \family default
162 -diagrams, constructed, displayed and interactively edited inside LyX.
163 \end_layout
164
165 \begin_layout Standard
166 \begin_inset VSpace defskip
167 \end_inset
168
169
170 \end_layout
171
172 \begin_layout Standard
173 \begin_inset Graphics
174         filename xyfigure.png
175         scale 50
176         BoundingBox 0bp 0bp 580bp 440bp
177         clip
178
179 \end_inset
180
181
182 \end_layout
183
184 \begin_layout Standard
185 \begin_inset VSpace defskip
186 \end_inset
187
188
189 \end_layout
190
191 \begin_layout Standard
192 In this note, we describe how 
193 \begin_inset ERT
194 status collapsed
195
196 \begin_layout Plain Layout
197
198
199 \backslash
200 Xy
201 \end_layout
202
203 \end_inset
204
205 -pic can be used from inside LyX, how diagrams can be created and edited.
206  We have tested the following using LyX versions 1.3.7 up to 1.6, running under
207  WindowsXP and under Windows Vista.
208  
209 \end_layout
210
211 \begin_layout Standard
212 There are two modes of operations: For a start, and for some first tests,
213  it may be easiest to first enter the 
214 \begin_inset ERT
215 status collapsed
216
217 \begin_layout Plain Layout
218
219
220 \backslash
221 Xy
222 \end_layout
223
224 \end_inset
225
226 -Pic code inside the LyX-window, select it all and convert it to a graphical
227  representation by pressing 
228 \family sans
229 Ctrl-m
230 \family default
231  or 
232 \family sans
233 Ctrl-M
234 \family default
235 .
236  If you use 
237 \begin_inset ERT
238 status collapsed
239
240 \begin_layout Plain Layout
241
242
243 \backslash
244 Xy
245 \end_layout
246
247 \end_inset
248
249 -Pic more frequently, or if you want to modify your initial figure, you
250  will want to assemble and modify your figures using LyX's math editor.
251  
252 \end_layout
253
254 \begin_layout Standard
255 Once the cursor is moved over a diagram, this is displayed as an array of
256  nodes and arrow-commands.
257  These can be changed interactively.
258  When the cursor leaves the editing area, the diagram reappears.
259  
260 \end_layout
261
262 \begin_layout Standard
263 In the first two sections of this documentation, we explain how to use LyX
264  in the first mentioned mode and we introduce all 
265 \begin_inset ERT
266 status collapsed
267
268 \begin_layout Plain Layout
269
270
271 \backslash
272 Xy
273 \end_layout
274
275 \end_inset
276
277 -Pic features that might be of use for drawing commutative diagrams, graphs
278  or automata.
279  Section 3 explains how to use the 
280 \begin_inset ERT
281 status collapsed
282
283 \begin_layout Plain Layout
284
285
286 \backslash
287 Xy
288 \end_layout
289
290 \end_inset
291
292 -Pic commands inside a math-editing area.
293  
294 \end_layout
295
296 \begin_layout Standard
297 It is not our intention to write another introduction to 
298 \begin_inset ERT
299 status collapsed
300
301 \begin_layout Plain Layout
302
303
304 \backslash
305 Xy
306 \end_layout
307
308 \end_inset
309
310 -Pic, rather our motivation is to give an introduction how the most important
311  commands work inside LyX, since the keystrokes as explained in the 
312 \begin_inset ERT
313 status collapsed
314
315 \begin_layout Plain Layout
316
317
318 \backslash
319 Xy
320 \end_layout
321
322 \end_inset
323
324 -Pic manual
325 \begin_inset CommandInset citation
326 LatexCommand cite
327 key "xypic manual"
328
329 \end_inset
330
331  will not always function correctly inside LyX.
332  
333 \end_layout
334
335 \begin_layout Section
336 Preparation
337 \end_layout
338
339 \begin_layout Standard
340 The following requires that the LaTeX-packages 
341 \family typewriter
342 xypic
343 \family default
344  and 
345 \family typewriter
346 preview
347 \family default
348  are installed in the LaTeX system.
349  They are available from CTAN, see at 
350 \begin_inset CommandInset citation
351 LatexCommand cite
352 key "instant-preview"
353
354 \end_inset
355
356 , resp.
357  at 
358 \begin_inset CommandInset citation
359 LatexCommand cite
360 key "xypic"
361
362 \end_inset
363
364 .
365  After freshly installing them, it may be necessary, to run 
366 \family sans
367 Edit\SpecialChar \menuseparator
368 Reconfigure
369 \family default
370  from the main LyX menu.
371  The steps to a first diagram output in LyX are then:
372 \end_layout
373
374 \begin_layout Enumerate
375 Activate and test 
376 \family typewriter
377 preview
378 \end_layout
379
380 \begin_deeper
381 \begin_layout Enumerate
382 Open LyX, choose 
383 \family sans
384 Edit\SpecialChar \menuseparator
385 Preferences\SpecialChar \menuseparator
386 Look and Feel\SpecialChar \menuseparator
387 Graphics
388 \family default
389  and place a check-mark at 
390 \emph on
391 Instant Preview
392 \emph default
393 .
394  
395 \end_layout
396
397 \begin_layout Enumerate
398 Test, if 
399 \family typewriter
400 instant-preview
401 \family default
402  works by opening a LyX-document and entering any math-formula, e.
403 \begin_inset space \thinspace{}
404 \end_inset
405
406 g.
407  
408 \begin_inset Formula $a+b=c$
409 \end_inset
410
411 .
412  
413 \end_layout
414
415 \begin_layout Enumerate
416 Move the cursor out of the formula, and watch it change its appearance to
417  look just like in the finished dvi- or postscript document.
418  
419 \end_layout
420
421 \end_deeper
422 \begin_layout Enumerate
423 Activate and test 
424 \family typewriter
425 xypic
426 \end_layout
427
428 \begin_deeper
429 \begin_layout Enumerate
430 Choose 
431 \family sans
432 Layout\SpecialChar \menuseparator
433 Document\SpecialChar \menuseparator
434 Preamble
435 \family default
436  and type 
437 \family typewriter
438
439 \begin_inset Newline newline
440 \end_inset
441
442
443 \backslash
444 usepackage[all]{xy}.
445 \end_layout
446
447 \begin_layout Enumerate
448 Inside your LyX-Document, enter the text 
449 \family typewriter
450
451 \begin_inset Newline newline
452 \end_inset
453
454
455 \backslash
456 xymatrix{A 
457 \backslash
458 ar[r] & B}
459 \family default
460  .
461 \end_layout
462
463 \begin_layout Enumerate
464 Select the whole text and choose 
465 \family sans
466 Insert\SpecialChar \menuseparator
467 Math\SpecialChar \menuseparator
468 Display Formula
469 \family default
470 , or use the corresponding keyboard shortcut 
471 \family sans
472 Ctrl-M
473 \family default
474 .
475  
476 \end_layout
477
478 \begin_layout Enumerate
479 Move the mouse cursor out of the editing box and wait for a split second
480  to see an arrow appear: 
481 \begin_inset Formula $\xymatrix{A\ar[r] & B}
482 $
483 \end_inset
484
485 .
486  
487 \end_layout
488
489 \end_deeper
490 \begin_layout Section
491 Commutative diagrams
492 \end_layout
493
494 \begin_layout Standard
495 The following diagram, which is taken from the documentation of 
496 \begin_inset ERT
497 status collapsed
498
499 \begin_layout Plain Layout
500
501
502 \backslash
503 Xy
504 \end_layout
505
506 \end_inset
507
508 -Pic
509 \begin_inset CommandInset citation
510 LatexCommand cite
511 key "xypic manual"
512
513 \end_inset
514
515  by its creator Kristoffer H.
516  Rose, will provide an example for many of the features available with that
517  package.
518  Its source code is: 
519 \end_layout
520
521 \begin_layout LyX-Code
522
523 \backslash
524 xymatrix{
525 \begin_inset Newline newline
526 \end_inset
527
528   U     
529 \backslash
530 ar@/_{1pc}/[ddr]_
531 \backslash
532 psi
533 \backslash
534 ar@/^{1pc}/[drr]^
535 \backslash
536 varphi
537 \begin_inset Newline newline
538 \end_inset
539
540
541 \backslash
542 ar@{.>}[dr]|-{(x,y)}
543 \backslash
544
545 \backslash
546
547 \begin_inset Newline newline
548 \end_inset
549
550     & X 
551 \backslash
552 times_Z Y 
553 \backslash
554 ar[d]^q 
555 \backslash
556 ar[r]_p  &  X 
557 \backslash
558 ar[d]_f
559 \backslash
560
561 \backslash
562
563 \begin_inset Newline newline
564 \end_inset
565
566     & Y 
567 \backslash
568 ar[r]^g                      &  Z }
569 \end_layout
570
571 \begin_layout LyX-Code
572
573 \end_layout
574
575 \begin_layout Standard
576 Again, to turn this code into a graphical output, select it all at once
577  starting from the 
578 \family typewriter
579
580 \backslash
581 xymatrix{
582 \family default
583  \SpecialChar \ldots{}
584  up to the closing brace \SpecialChar \ldots{}
585  
586 \family typewriter
587 }
588 \family default
589  and turn it into display-math as explained above.
590  A moment after the cursor leaves the math-area, you should see the diagram
591  in its full graphical glory as shown below.
592  
593 \end_layout
594
595 \begin_layout Standard
596 \begin_inset Formula $\xymatrix{U\ar@/_{1pc}/[ddr]_{\psi}\ar@/{}^{1pc}/[drr]^{\varphi}\ar@{.>}[dr]|-{(x,y)}\\
597  & X\times_{Z}Y\ar[d]^{q}\ar[r]_{p} & X\ar[d]_{f}\\
598  & Y\ar[r]^{g} & Z}
599 $
600 \end_inset
601
602  
603 \end_layout
604
605 \begin_layout Subsection
606 The matrix layout of diagrams
607 \end_layout
608
609 \begin_layout Standard
610
611 \family typewriter
612 xymatrix
613 \family default
614  uses a matrix to define the layout of the vertices of a diagram.
615  For the above example, we need a 
616 \begin_inset Formula $3\times3$
617 \end_inset
618
619 -matrix of which 5 entries are used for the vertices 
620 \begin_inset Formula $U$
621 \end_inset
622
623
624 \begin_inset Formula $X\times_{Z}Y$
625 \end_inset
626
627
628 \begin_inset Formula $X$
629 \end_inset
630
631
632 \begin_inset Formula $Y$
633 \end_inset
634
635
636 \begin_inset Formula $Z$
637 \end_inset
638
639 , the other positions remaining empty.
640  In this case, the following matrix determines the layout:
641 \end_layout
642
643 \begin_layout LyX-Code
644
645 \backslash
646 xymatrix{
647 \begin_inset Newline newline
648 \end_inset
649
650     U                       
651 \backslash
652
653 \backslash
654  
655 \begin_inset Newline newline
656 \end_inset
657
658        & X
659 \backslash
660 times_Z Y   & X  
661 \backslash
662
663 \backslash
664  
665 \begin_inset Newline newline
666 \end_inset
667
668        & Y             & Z    } 
669 \end_layout
670
671 \begin_layout Standard
672 The pattern should be familiar from LaTeX: We see three rows, the first
673  two being terminated by the end-of-line-marker 
674 \family typewriter
675
676 \backslash
677
678 \backslash
679
680 \family default
681  .
682  Each line consists of entries, separated by the ampersand 
683 \family typewriter
684 &
685 \family default
686 .
687  
688 \end_layout
689
690 \begin_layout Subsection
691 Arrows
692 \end_layout
693
694 \begin_layout Standard
695 Having entered the vertices, we add arrows between them.
696  The basic 
697 \family typewriter
698 xypic
699 \family default
700 -command to produce an arrow is 
701 \family typewriter
702
703 \backslash
704 ar
705 \family default
706  , it is entered into the cell of the matrix where the arrow is to start.
707  The target of the arrow is defined by direction commands 
708 \family typewriter
709 u
710 \family default
711  (up) 
712 \family typewriter
713 d
714 \family default
715  (down) 
716 \family typewriter
717 l
718 \family default
719  (left), or 
720 \family typewriter
721 r
722 \family default
723  (right).
724  These can be combined to a path and enclosed in square brackets.
725  As an example, the arrows from the vertex 
726 \begin_inset Formula $U$
727 \end_inset
728
729  in the upper left corner down and right to the vertices 
730 \begin_inset Formula $X\times_{Z}Y$
731 \end_inset
732
733
734 \begin_inset Formula $Y$
735 \end_inset
736
737 , and 
738 \begin_inset Formula $X$
739 \end_inset
740
741  are, respectively, defined as 
742 \family typewriter
743
744 \backslash
745 ar[dr]
746 \family default
747
748 \family typewriter
749
750 \backslash
751 ar[ddr]
752 \family default
753  and 
754 \family typewriter
755
756 \backslash
757 ar[drr]
758 \family default
759 .
760  Thus the above diagram with all arrows added becomes:
761 \end_layout
762
763 \begin_layout LyX-Code
764
765 \backslash
766 xymatrix{
767 \begin_inset Newline newline
768 \end_inset
769
770     U 
771 \backslash
772 ar[ddr] 
773 \backslash
774 ar[drr] 
775 \backslash
776 ar[dr]
777 \backslash
778
779 \backslash
780
781 \begin_inset Newline newline
782 \end_inset
783
784     & X 
785 \backslash
786 times_Z Y 
787 \backslash
788 ar[d] 
789 \backslash
790 ar[r]& X 
791 \backslash
792 ar[d]
793 \backslash
794
795 \backslash
796
797 \begin_inset Newline newline
798 \end_inset
799
800     & Y 
801 \backslash
802 ar[r] & Z }
803 \end_layout
804
805 \begin_layout Standard
806 \begin_inset Formula \xymatrix{ U \ar[ddr] \ar[drr] \ar[dr]\\
807  &  X \times_{Z} Y \ar[d] \ar[r]  &  X \ar[d]\\
808  &  Y \ar[r]  &  Z }
809
810
811 \end_inset
812
813
814 \end_layout
815
816 \begin_layout LyX-Code
817
818 \end_layout
819
820 \begin_layout LyX-Code
821
822 \end_layout
823
824 \begin_layout Subsection
825 Labels
826 \end_layout
827
828 \begin_layout Standard
829 Labels are attached to arrows by affixing them as upper or lower indices
830  to the 
831 \family typewriter
832
833 \backslash
834 ar
835 \family default
836 -command.
837  Thus, 
838 \family typewriter
839
840 \backslash
841 ar[drr]^
842 \backslash
843 varphi
844 \family default
845  defines an arrow going one cell down, two to the right and having the label
846  
847 \begin_inset Formula $\varphi$
848 \end_inset
849
850  attached above.
851  To attach a label below the arrow, make it a lower index as in 
852 \family typewriter
853
854 \backslash
855 ar[ddr]_
856 \backslash
857 psi
858 \family default
859 .
860  This explanation is correct only for arrows pointing to the right.
861  More precisely, imagine looking along the arrow in the direction it is
862  pointing.
863  Then an upper index places a label to the left and a lower index places
864  it to the right.
865  Consequently, an arrow pointing from right to left, such as 
866 \family typewriter
867
868 \backslash
869 ar[l]^
870 \backslash
871 alpha_
872 \backslash
873 beta
874 \family default
875  will have label 
876 \begin_inset Formula $\alpha$
877 \end_inset
878
879  below and label 
880 \begin_inset Formula $\beta$
881 \end_inset
882
883  above the arrow, i.
884 \begin_inset space \thinspace{}
885 \end_inset
886
887 g.
888 \begin_inset space \space{}
889 \end_inset
890
891
892 \begin_inset Formula $\xymatrix{\  & \ \ar[l]_{\beta}^{\alpha}.}
893 $
894 \end_inset
895
896 Using the character | instead of ^ or _ , it is even possible to place the
897  label right onto the arrow, obscuring part of its shaft.
898  
899 \end_layout
900
901 \begin_layout Standard
902 Normally, a label is placed halfway between an arrow's start and target
903  objects.
904  In the first diagram, the central arrow starting in 
905 \begin_inset Formula $U$
906 \end_inset
907
908  has the label 
909 \begin_inset Formula $(x,y)$
910 \end_inset
911
912  in the middle of the arrow's shaft, rather than in the middle between the
913  two objects it connects.
914  This is achieved by prefixing the label with a minus sign, here: 
915 \family typewriter
916
917 \backslash
918 ar[dr]|-{(x,y)}
919 \family default
920 .
921 \end_layout
922
923 \begin_layout LyX-Code
924
925 \backslash
926 xymatrix{
927 \begin_inset Newline newline
928 \end_inset
929
930     U 
931 \backslash
932 ar[ddr]_
933 \backslash
934 psi 
935 \backslash
936 ar[drr]^
937 \backslash
938 varphi
939 \backslash
940 ar[dr]|-{(x,y)}
941 \backslash
942
943 \backslash
944
945 \begin_inset Newline newline
946 \end_inset
947
948     & X 
949 \backslash
950 times_Z Y 
951 \backslash
952 ar[d]^q 
953 \backslash
954 ar[r]_p& X 
955 \backslash
956 ar[d]_f
957 \backslash
958
959 \backslash
960
961 \begin_inset Newline newline
962 \end_inset
963
964     & Y 
965 \backslash
966 ar[r]^g & Z }
967 \end_layout
968
969 \begin_layout LyX-Code
970 \begin_inset Formula \xymatrix{ U \ar[ddr]_{\psi}\ar[drr]^{\varphi}\ar[dr]|-{(x,y)}\\
971  &  X \times_{Z} Y \ar[d]^{q} \ar[r]_{p}  &  X \ar[d]_{f}\\
972  &  Y \ar[r]^{g}  &  Z }
973
974
975 \end_inset
976
977
978 \end_layout
979
980 \begin_layout Standard
981 \begin_inset ERT
982 status collapsed
983
984 \begin_layout Plain Layout
985
986
987 \backslash
988 Xy
989 \end_layout
990
991 \end_inset
992
993 -pic normally permits labels to be shifted towards the tip or towards the
994  start of an arrow by prefixing the label with a ratio, such as e.
995 \begin_inset space \thinspace{}
996 \end_inset
997
998 g.
999  
1000 \family typewriter
1001 (.3)
1002 \family default
1003 .
1004  In LyX this works only for labels which are placed on top of the arrow,
1005  such as 
1006 \family typewriter
1007
1008 \backslash
1009 ar[r]|(0.3){
1010 \backslash
1011 phi}
1012 \family default
1013 .
1014  
1015 \end_layout
1016
1017 \begin_layout Standard
1018 For labels placed to the left or to the right of the arrow this does not
1019  work.
1020  The corresponding 
1021 \begin_inset ERT
1022 status collapsed
1023
1024 \begin_layout Plain Layout
1025
1026
1027 \backslash
1028 Xy
1029 \end_layout
1030
1031 \end_inset
1032
1033 -pic code such as e.
1034 \begin_inset space \thinspace{}
1035 \end_inset
1036
1037 g.
1038  
1039 \family typewriter
1040
1041 \backslash
1042 ar[r]^(.3)
1043 \backslash
1044 phi
1045 \family default
1046  or 
1047 \family typewriter
1048
1049 \backslash
1050 ar[r]_(.3)
1051 \backslash
1052 psi
1053 \family default
1054  is not correctly interpreted by LyX's math editor.
1055  Two workarounds are suggested in the last section of this note.
1056 \end_layout
1057
1058 \begin_layout Subsection
1059 Arrow modification 
1060 \end_layout
1061
1062 \begin_layout Standard
1063 Modification of the design, the form or the positioning of arrows are introduced
1064  by the 
1065 \family typewriter
1066 @
1067 \family default
1068 -character.
1069  This is followed by a pair of matching brackets, where the form of the
1070  bracket pair, 
1071 \family typewriter
1072 { }
1073 \family default
1074  or 
1075 \family typewriter
1076 < >
1077 \family default
1078  or 
1079 \family typewriter
1080 / /
1081 \family default
1082  indicates, whether we want to modify the design, the or the curvature of
1083  the arrow.
1084  Various modifactions can be applied to an arrow at the same time.
1085 \end_layout
1086
1087 \begin_layout Subsubsection
1088 Arrow design 
1089 \end_layout
1090
1091 \begin_layout Standard
1092 Various designs such as 
1093 \emph on
1094 solid
1095 \emph default
1096
1097 \emph on
1098 dotted
1099 \emph default
1100
1101 \emph on
1102 dashed
1103 \emph default
1104  or 
1105 \emph on
1106 double
1107 \emph default
1108  are possible for the shaft of an arrow.
1109  These can be combined with various ends and various tips.
1110  In general, the design of an arrow is described by following the command
1111  
1112 \family typewriter
1113
1114 \backslash
1115 ar
1116 \family default
1117  immediately by an 
1118 \family typewriter
1119 @
1120 \family default
1121 -sign and a pair of braces {\SpecialChar \ldots{}
1122 } containing characters describing the end,
1123  the shaft and the tip of the arrow.
1124  These characters are chosen to give some form of ASCII-rendering of the
1125  real thing.
1126  For instance 
1127 \family typewriter
1128
1129 \backslash
1130 ar@{>..>>}
1131 \family default
1132  produces an arrow with split end, a dotted shaft and double head.
1133  A number of other arrow designs is given in the table below.
1134  Note that the ends of embedding arrows 
1135 \begin_inset Formula $\xymatrix{A\ar@{^{(}->}[r] & B}
1136 $
1137 \end_inset
1138
1139  are described by raising or lowering opening parentheses, such as in 
1140 \family typewriter
1141
1142 \backslash
1143 ar@{^(->}[r].
1144 \begin_inset Newline newline
1145 \end_inset
1146
1147
1148 \end_layout
1149
1150 \begin_layout Standard
1151 \begin_inset Tabular
1152 <lyxtabular version="3" rows="11" columns="2">
1153 <features islongtable="true">
1154 <column alignment="center" valignment="top" width="0">
1155 <column alignment="center" valignment="top" width="0">
1156 <row>
1157 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1158 \begin_inset Text
1159
1160 \begin_layout Plain Layout
1161 Result
1162 \end_layout
1163
1164 \end_inset
1165 </cell>
1166 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1167 \begin_inset Text
1168
1169 \begin_layout Plain Layout
1170 Source code in LyX
1171 \end_layout
1172
1173 \end_inset
1174 </cell>
1175 </row>
1176 <row>
1177 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1178 \begin_inset Text
1179
1180 \begin_layout Plain Layout
1181 \begin_inset Formula \xymatrix{\ \ar[r]  &  \ }
1182
1183
1184 \end_inset
1185
1186
1187 \end_layout
1188
1189 \end_inset
1190 </cell>
1191 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1192 \begin_inset Text
1193
1194 \begin_layout Plain Layout
1195
1196 \family typewriter
1197
1198 \backslash
1199 ar 
1200 \end_layout
1201
1202 \end_inset
1203 </cell>
1204 </row>
1205 <row>
1206 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1207 \begin_inset Text
1208
1209 \begin_layout Plain Layout
1210 \begin_inset Formula \xymatrix{\ \ar@{-->}[r]  &  \ }
1211
1212
1213 \end_inset
1214
1215
1216 \end_layout
1217
1218 \end_inset
1219 </cell>
1220 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1221 \begin_inset Text
1222
1223 \begin_layout Plain Layout
1224
1225 \family typewriter
1226
1227 \backslash
1228 ar@{-->}
1229 \end_layout
1230
1231 \end_inset
1232 </cell>
1233 </row>
1234 <row>
1235 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1236 \begin_inset Text
1237
1238 \begin_layout Plain Layout
1239 \begin_inset Formula \xymatrix{\ \ar@{..>}[r]  &  \ }
1240
1241
1242 \end_inset
1243
1244
1245 \end_layout
1246
1247 \end_inset
1248 </cell>
1249 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1250 \begin_inset Text
1251
1252 \begin_layout Plain Layout
1253
1254 \family typewriter
1255
1256 \backslash
1257 ar@{..>}
1258 \end_layout
1259
1260 \end_inset
1261 </cell>
1262 </row>
1263 <row>
1264 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1265 \begin_inset Text
1266
1267 \begin_layout Plain Layout
1268 \begin_inset Formula \xymatrix{\ \ar@{~>}[r]  &  \ }
1269
1270
1271 \end_inset
1272
1273
1274 \end_layout
1275
1276 \end_inset
1277 </cell>
1278 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1279 \begin_inset Text
1280
1281 \begin_layout Plain Layout
1282
1283 \family typewriter
1284
1285 \backslash
1286 ar@{~>}
1287 \end_layout
1288
1289 \end_inset
1290 </cell>
1291 </row>
1292 <row>
1293 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1294 \begin_inset Text
1295
1296 \begin_layout Plain Layout
1297 \begin_inset Formula \xymatrix{\ \ar@{->>}[r]  &  \ }
1298
1299
1300 \end_inset
1301
1302
1303 \end_layout
1304
1305 \end_inset
1306 </cell>
1307 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1308 \begin_inset Text
1309
1310 \begin_layout Plain Layout
1311
1312 \family typewriter
1313
1314 \backslash
1315 ar@{->>}
1316 \end_layout
1317
1318 \end_inset
1319 </cell>
1320 </row>
1321 <row>
1322 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1323 \begin_inset Text
1324
1325 \begin_layout Plain Layout
1326 \begin_inset Formula \xymatrix{\ \ar@{-->>}[r]  &  \ }
1327
1328
1329 \end_inset
1330
1331
1332 \end_layout
1333
1334 \end_inset
1335 </cell>
1336 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1337 \begin_inset Text
1338
1339 \begin_layout Plain Layout
1340
1341 \family typewriter
1342
1343 \backslash
1344 ar@{-->>}
1345 \end_layout
1346
1347 \end_inset
1348 </cell>
1349 </row>
1350 <row>
1351 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1352 \begin_inset Text
1353
1354 \begin_layout Plain Layout
1355 \begin_inset Formula \xymatrix{\ \ar@{>->>}[r]  &  \ }
1356
1357
1358 \end_inset
1359
1360
1361 \end_layout
1362
1363 \end_inset
1364 </cell>
1365 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1366 \begin_inset Text
1367
1368 \begin_layout Plain Layout
1369
1370 \family typewriter
1371
1372 \backslash
1373 ar@{>->>}
1374 \end_layout
1375
1376 \end_inset
1377 </cell>
1378 </row>
1379 <row>
1380 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1381 \begin_inset Text
1382
1383 \begin_layout Plain Layout
1384 \begin_inset Formula \xymatrix{\ \ar@{_{(}->}[r]  &  \ }
1385
1386
1387 \end_inset
1388
1389
1390 \end_layout
1391
1392 \end_inset
1393 </cell>
1394 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1395 \begin_inset Text
1396
1397 \begin_layout Plain Layout
1398
1399 \family typewriter
1400
1401 \backslash
1402 ar@{_(->}
1403 \end_layout
1404
1405 \end_inset
1406 </cell>
1407 </row>
1408 <row>
1409 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1410 \begin_inset Text
1411
1412 \begin_layout Plain Layout
1413 \begin_inset Formula \xymatrix{\ \ar@{^{(}->}[r]  &  \ }
1414
1415
1416 \end_inset
1417
1418
1419 \end_layout
1420
1421 \end_inset
1422 </cell>
1423 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1424 \begin_inset Text
1425
1426 \begin_layout Plain Layout
1427
1428 \family typewriter
1429
1430 \backslash
1431 ar@{^(->}
1432 \end_layout
1433
1434 \end_inset
1435 </cell>
1436 </row>
1437 <row>
1438 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1439 \begin_inset Text
1440
1441 \begin_layout Plain Layout
1442 \begin_inset Formula \xymatrix{\ \ar@{|-|}[r]  &  \ }
1443
1444
1445 \end_inset
1446
1447
1448 \end_layout
1449
1450 \end_inset
1451 </cell>
1452 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1453 \begin_inset Text
1454
1455 \begin_layout Plain Layout
1456
1457 \family typewriter
1458
1459 \backslash
1460 ar@{|-|}
1461 \end_layout
1462
1463 \end_inset
1464 </cell>
1465 </row>
1466 </lyxtabular>
1467
1468 \end_inset
1469
1470
1471 \end_layout
1472
1473 \begin_layout Standard
1474 \noindent
1475 Following the @-character by either a 2, 3, _,or a ^, we can produce arrows
1476  with double, triple shaft or arrows showing only the lower or upper half
1477  of their tips and ends.
1478  Arrows need not have tips nor ends, as the last example shows :
1479 \begin_inset Newline newline
1480 \end_inset
1481
1482
1483 \end_layout
1484
1485 \begin_layout Standard
1486 \begin_inset Tabular
1487 <lyxtabular version="3" rows="8" columns="2">
1488 <features islongtable="true">
1489 <column alignment="center" valignment="top" width="0">
1490 <column alignment="center" valignment="top" width="0">
1491 <row>
1492 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1493 \begin_inset Text
1494
1495 \begin_layout Plain Layout
1496 Result
1497 \end_layout
1498
1499 \end_inset
1500 </cell>
1501 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1502 \begin_inset Text
1503
1504 \begin_layout Plain Layout
1505 Source code for LyX
1506 \end_layout
1507
1508 \end_inset
1509 </cell>
1510 </row>
1511 <row>
1512 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1513 \begin_inset Text
1514
1515 \begin_layout Plain Layout
1516 \begin_inset Formula \xymatrix{\ \ar@2[r]  &  \ }
1517
1518
1519 \end_inset
1520
1521
1522 \end_layout
1523
1524 \end_inset
1525 </cell>
1526 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1527 \begin_inset Text
1528
1529 \begin_layout Plain Layout
1530
1531 \family typewriter
1532
1533 \backslash
1534 ar@2
1535 \end_layout
1536
1537 \end_inset
1538 </cell>
1539 </row>
1540 <row>
1541 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1542 \begin_inset Text
1543
1544 \begin_layout Plain Layout
1545 \begin_inset Formula \xymatrix{\ \ar@3[r]  &  \ }
1546
1547
1548 \end_inset
1549
1550
1551 \end_layout
1552
1553 \end_inset
1554 </cell>
1555 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1556 \begin_inset Text
1557
1558 \begin_layout Plain Layout
1559
1560 \family typewriter
1561
1562 \backslash
1563 ar@3
1564 \end_layout
1565
1566 \end_inset
1567 </cell>
1568 </row>
1569 <row>
1570 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1571 \begin_inset Text
1572
1573 \begin_layout Plain Layout
1574 \begin_inset Formula \xymatrix{\ \ar@_{->}[r]  &  \ }
1575
1576
1577 \end_inset
1578
1579
1580 \end_layout
1581
1582 \end_inset
1583 </cell>
1584 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1585 \begin_inset Text
1586
1587 \begin_layout Plain Layout
1588
1589 \family typewriter
1590
1591 \backslash
1592 ar@_{->}
1593 \end_layout
1594
1595 \end_inset
1596 </cell>
1597 </row>
1598 <row>
1599 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1600 \begin_inset Text
1601
1602 \begin_layout Plain Layout
1603 \begin_inset Formula \xymatrix{\ \ar@^{->}[r]  &  \ }
1604
1605
1606 \end_inset
1607
1608
1609 \end_layout
1610
1611 \end_inset
1612 </cell>
1613 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1614 \begin_inset Text
1615
1616 \begin_layout Plain Layout
1617
1618 \family typewriter
1619
1620 \backslash
1621 ar@^{->}
1622 \end_layout
1623
1624 \end_inset
1625 </cell>
1626 </row>
1627 <row>
1628 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1629 \begin_inset Text
1630
1631 \begin_layout Plain Layout
1632 \begin_inset Formula \xymatrix{\ \ar@^{>>->>}[r]  &  \ }
1633
1634
1635 \end_inset
1636
1637
1638 \end_layout
1639
1640 \end_inset
1641 </cell>
1642 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1643 \begin_inset Text
1644
1645 \begin_layout Plain Layout
1646
1647 \family typewriter
1648
1649 \backslash
1650 ar@^{>>->>}
1651 \end_layout
1652
1653 \end_inset
1654 </cell>
1655 </row>
1656 <row>
1657 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1658 \begin_inset Text
1659
1660 \begin_layout Plain Layout
1661 \begin_inset Formula \xymatrix{\ \ar@{^{<}-_{>}}[r]  &  \ }
1662
1663
1664 \end_inset
1665
1666
1667 \end_layout
1668
1669 \end_inset
1670 </cell>
1671 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1672 \begin_inset Text
1673
1674 \begin_layout Plain Layout
1675
1676 \family typewriter
1677
1678 \backslash
1679 ar@{^<-_>}
1680 \end_layout
1681
1682 \end_inset
1683 </cell>
1684 </row>
1685 <row>
1686 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1687 \begin_inset Text
1688
1689 \begin_layout Plain Layout
1690 \begin_inset Formula \xymatrix{\ \ar@2{--}[r]  &  \ }
1691
1692
1693 \end_inset
1694
1695
1696 \end_layout
1697
1698 \end_inset
1699 </cell>
1700 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1701 \begin_inset Text
1702
1703 \begin_layout Plain Layout
1704
1705 \family typewriter
1706
1707 \backslash
1708 ar@2{--}
1709 \end_layout
1710
1711 \end_inset
1712 </cell>
1713 </row>
1714 </lyxtabular>
1715
1716 \end_inset
1717
1718
1719 \end_layout
1720
1721 \begin_layout Subsubsection
1722 Designing your own arrows
1723 \end_layout
1724
1725 \begin_layout Standard
1726 Within certain limits there is even a way to design your own arrows.
1727  Using some the characters 
1728 \family typewriter
1729 ><|ox+/()[
1730 \family default
1731  one can even design one's own arrow tips using the 
1732 \family typewriter
1733
1734 \backslash
1735 newdir
1736 \family default
1737  command in the preample.
1738  For explanations, we refer to the 
1739 \family typewriter
1740
1741 \begin_inset ERT
1742 status collapsed
1743
1744 \begin_layout Plain Layout
1745
1746
1747 \backslash
1748 Xy
1749 \end_layout
1750
1751 \end_inset
1752
1753
1754 \family default
1755 -manual, from which we take the example: 
1756 \end_layout
1757
1758 \begin_layout Standard
1759
1760 \family typewriter
1761
1762 \backslash
1763 newdir{|>}{!/4.5pt/@{|}*:(1,-.2)@^{>}*:(1,+.2)@_{>}}
1764 \family default
1765 .
1766 \end_layout
1767
1768 \begin_layout Standard
1769 \noindent
1770 This defines a new arrow tip, referred to as 
1771 \family typewriter
1772 |>
1773 \family default
1774  in 
1775 \family typewriter
1776
1777 \backslash
1778 ar@{-|>}[r]
1779 \family default
1780  and which displays correctly in LyX as:
1781 \begin_inset Formula \[
1782 \xymatrix{A\ar@{-|>}[r] & \ \ B}
1783 \]
1784
1785 \end_inset
1786
1787
1788 \end_layout
1789
1790 \begin_layout Subsection
1791 Arrow positioning
1792 \end_layout
1793
1794 \begin_layout Standard
1795 Arrows are shifted sideways with the modifier 
1796 \family typewriter
1797 @<
1798 \family default
1799
1800 \begin_inset Formula $\ldots$
1801 \end_inset
1802
1803  
1804 \family typewriter
1805 >
1806 \family default
1807  where the ellipsis is replaced by a positive or negative measure.
1808  For instance, to design a pair of mutually opposing arrows between two
1809  nodes, we shift them to see them apart.
1810  Note that the direction of the shift (positive) is to the left if one looks
1811  along the arrow.
1812  Thus
1813 \end_layout
1814
1815 \begin_layout Standard
1816
1817 \family typewriter
1818
1819 \backslash
1820 xymatrix{
1821 \backslash
1822 circ 
1823 \backslash
1824 ar@<1ex>[r]& 
1825 \backslash
1826 circ 
1827 \backslash
1828 ar@<1ex>[l]}
1829 \end_layout
1830
1831 \begin_layout Standard
1832 \noindent
1833 produces
1834 \begin_inset space ~
1835 \end_inset
1836
1837
1838 \begin_inset space ~
1839 \end_inset
1840
1841
1842 \begin_inset Formula \[
1843 \xymatrix{\circ\ar@<1ex>[r] & \circ\ar@<1ex>[l]}
1844 \]
1845  
1846
1847 \end_inset
1848
1849
1850 \end_layout
1851
1852 \begin_layout Subsubsection
1853 Inline or centered diagrams
1854 \end_layout
1855
1856 \begin_layout Standard
1857 Arrows and diagrams can be used inline, such as this one: 
1858 \begin_inset Formula $\xymatrix{\circ\ar@<1ex>[r] & \circ\ar@<1ex>[l]}
1859 $
1860 \end_inset
1861
1862 .
1863  When their code is written inside LyX as above, select it and choose either
1864  
1865 \family sans
1866 Ctrl-m
1867 \family default
1868  for inline appearence or 
1869 \family sans
1870 Ctrl-M
1871 \family default
1872  for displaystyle.
1873  Diagrams constructed inline can later be centered, or, conversely, centered
1874  diagrams can be changed to inline formulas with 
1875 \family sans
1876 Edit\SpecialChar \menuseparator
1877 Math
1878 \family default
1879  
1880 \family sans
1881 \SpecialChar \menuseparator
1882 Alignment.
1883 \end_layout
1884
1885 \begin_layout Subsection
1886 Bending arrows 
1887 \end_layout
1888
1889 \begin_layout Standard
1890 There are two simple methods to make arrows bend.
1891  The first is giving an explicit value by which the midpoint of the arrow's
1892  shaft is raised or depressed, the other is by forcing the arrow to leave
1893  its origin in a prescribed compass direction and to make him enter the
1894  target at another direction.
1895  The necessary bending of the arrow is determined automatically.
1896  We describe both methods.
1897 \end_layout
1898
1899 \begin_layout Subsubsection
1900 Raising the shaft
1901 \end_layout
1902
1903 \begin_layout Standard
1904 For bending arrows we use the modifier @/
1905 \begin_inset Formula $\ldots$
1906 \end_inset
1907
1908 / .
1909  The ellipsis stands for a TeX-measure which needs to be entered as a lower
1910  or upper index.
1911  Whereas in 
1912 \family typewriter
1913 xypic
1914 \family default
1915 , we could simply write, e.
1916 \begin_inset space \thinspace{}
1917 \end_inset
1918
1919 g.
1920  
1921 \family typewriter
1922
1923 \backslash
1924 ar@/_1pc/
1925 \family default
1926  for an arrow bending 
1927 \family typewriter
1928 1pc
1929 \family default
1930  downwards, this cannot directly be done in LyX.
1931  It is necessary, to enclose the measure in a pair of braces, such as e.
1932 \begin_inset space \thinspace{}
1933 \end_inset
1934
1935 g.
1936  
1937 \family typewriter
1938
1939 \backslash
1940 ar@/_{1pc}/
1941 \family default
1942 .
1943  As an example, here are two opposing arrows between 
1944 \begin_inset Formula $A$
1945 \end_inset
1946
1947  and 
1948 \begin_inset Formula $B$
1949 \end_inset
1950
1951 , each bending by .5 pica, given by the following source code: 
1952 \end_layout
1953
1954 \begin_layout Standard
1955
1956 \family typewriter
1957
1958 \backslash
1959 xymatrix{A 
1960 \backslash
1961 ar@/_{.5pc}/[r] & B 
1962 \backslash
1963 ar@/_{.5pc}/[l]}
1964 \end_layout
1965
1966 \begin_layout Standard
1967 \begin_inset Formula \[
1968 \xymatrix{A\ar@/{}_{.5pc}/[r] & B\ar@/{}_{.5pc}/[l]}
1969 \]
1970
1971 \end_inset
1972
1973
1974 \end_layout
1975
1976 \begin_layout Subsubsection
1977 Specifying exit- and entrance directions.
1978  
1979 \end_layout
1980
1981 \begin_layout Standard
1982 An alternative for making arrows bend is by specifying their compass direction
1983  as they are leaving their source and their direction from which they enter
1984  their target.
1985  Instead of north, north-east, east, etc., the directions are named 
1986 \family typewriter
1987 u
1988 \family default
1989
1990 \family typewriter
1991 ur
1992 \family default
1993
1994 \family typewriter
1995 r
1996 \family default
1997
1998 \family typewriter
1999 dr
2000 \family default
2001
2002 \family typewriter
2003 d
2004 \family default
2005
2006 \family typewriter
2007 dl
2008 \family default
2009
2010 \family typewriter
2011 l
2012 \family default
2013
2014 \family typewriter
2015 ul
2016 \family default
2017 , standing for up, up-right, right, down-right, etc..
2018  A direction is specified as @(
2019 \emph on
2020 out
2021 \emph default
2022 ,
2023 \emph on
2024 in
2025 \emph default
2026 ) where 
2027 \emph on
2028 out
2029 \emph default
2030  stands for the direction the first object is left and 
2031 \emph on
2032 in
2033 \emph default
2034  stands for the direction from which the target is entered.
2035  As an example, we show some bending arrows and a loop, which arises when
2036  we do not specify a target for an arrow, just its incoming and outgoing
2037  direction:
2038 \end_layout
2039
2040 \begin_layout Standard
2041 \begin_inset Formula \[
2042 \xymatrix{A\ar@(dr,dl)[r]\ar@(dr,dl)[rr] & B\ar@(d,r)[dl] & C\\
2043 E\ar@(ul,ur)}
2044 \]
2045
2046 \end_inset
2047
2048
2049 \end_layout
2050
2051 \begin_layout LyX-Code
2052
2053 \backslash
2054 xymatrix{A 
2055 \backslash
2056 ar@(dr,dl)[r]
2057 \backslash
2058 ar@(dr,dl)[rr] 
2059 \begin_inset Newline newline
2060 \end_inset
2061
2062                     &B
2063 \backslash
2064 ar@(d,r)[dl]  &C 
2065 \backslash
2066
2067 \backslash
2068  
2069 \begin_inset Newline newline
2070 \end_inset
2071
2072             E 
2073 \backslash
2074 ar@(ul,ur)}
2075 \end_layout
2076
2077 \begin_layout Subsection
2078 Modifying vertices
2079 \end_layout
2080
2081 \begin_layout Standard
2082 The above example is reminiscent of an automata diagram, except that in
2083  such a diagram states would be enclosed in small circles, with double circles
2084  denoting final states.
2085  
2086 \end_layout
2087
2088 \begin_layout Subsubsection
2089 Framing objects 
2090 \end_layout
2091
2092 \begin_layout Standard
2093 With 
2094 \begin_inset ERT
2095 status collapsed
2096
2097 \begin_layout Plain Layout
2098
2099
2100 \backslash
2101 Xy
2102 \end_layout
2103
2104 \end_inset
2105
2106 -Pic, entries can obtain a single or a double frame, such as 
2107 \begin_inset Formula $\xymatrix{*+[F]{A}}
2108 $
2109 \end_inset
2110
2111  or 
2112 \begin_inset Formula $\xymatrix{*+[F=]{B}}
2113 $
2114 \end_inset
2115
2116  by prefixing an entry with 
2117 \family typewriter
2118 *[F-]
2119 \family default
2120  or 
2121 \family typewriter
2122 *[F=]
2123 \family default
2124  and enclosing the portion of the entry to be framed in braces.
2125  Normally, the frame will be very tight so that it must be widened by prefixing
2126  with 
2127 \family typewriter
2128 +
2129 \family default
2130  or with 
2131 \family typewriter
2132 ++
2133 \family default
2134 .
2135  Round frames, such as 
2136 \begin_inset Formula $\xymatrix{*++[o][F]{A}}
2137 $
2138 \end_inset
2139
2140  and 
2141 \begin_inset Formula $\xymatrix{*++[o][F=]{B}}
2142 $
2143 \end_inset
2144
2145  are obtained by specifying the shape as 
2146 \family typewriter
2147 [o].
2148
2149 \family default
2150  So the latter figure was constructed as *++[o][F=]{B}.
2151  This way, the following automaton 
2152 \end_layout
2153
2154 \begin_layout Standard
2155 \begin_inset Formula \[
2156 \xymatrix{\txt{start}\ar[r] & *++[o][F]{1}\ar[r] & *++[o][F=]{2}\ar@(ur,dr)\ar@(ur,ul)[l]}
2157 \]
2158
2159 \end_inset
2160
2161
2162 \end_layout
2163
2164 \begin_layout Standard
2165 \begin_inset ERT
2166 status collapsed
2167
2168 \begin_layout Plain Layout
2169
2170
2171 \backslash
2172 noindent
2173 \end_layout
2174
2175 \end_inset
2176
2177  can be typeset as
2178 \end_layout
2179
2180 \begin_layout LyX-Code
2181
2182 \backslash
2183 xymatrix{
2184 \backslash
2185 txt{start}
2186 \backslash
2187 ar[r]
2188 \end_layout
2189
2190 \begin_layout LyX-Code
2191             & *++[o][F]{1}
2192 \backslash
2193 ar[r]
2194 \end_layout
2195
2196 \begin_layout LyX-Code
2197             & *++[o][F=]{2}
2198 \backslash
2199 ar@(ur,dr)
2200 \backslash
2201 ar@(ur,ul)[l]
2202 \end_layout
2203
2204 \begin_layout LyX-Code
2205            }.
2206 \end_layout
2207
2208 \begin_layout Standard
2209 The LaTeX command 
2210 \family typewriter
2211
2212 \backslash
2213 entrymodifiers={
2214 \family default
2215 \SpecialChar \ldots{}
2216
2217 \family typewriter
2218 }
2219 \family default
2220  will make a certain entry style the default, that can, of course be overridden
2221  for individual entries.
2222  Thus, after 
2223 \family typewriter
2224
2225 \backslash
2226 entrymodifiers={++[o][F-]}
2227 \family default
2228 , all following entries inside 
2229 \begin_inset ERT
2230 status collapsed
2231
2232 \begin_layout Plain Layout
2233
2234
2235 \backslash
2236 Xy
2237 \end_layout
2238
2239 \end_inset
2240
2241 -matrices would be encircled.
2242 \end_layout
2243
2244 \begin_layout Subsubsection
2245 Framing rectangles
2246 \end_layout
2247
2248 \begin_layout Standard
2249 Framing a whole rectangle inside an xymatrix is done with the macro pair
2250  
2251 \family typewriter
2252
2253 \backslash
2254 save ...
2255  
2256 \backslash
2257 restore
2258 \family default
2259 .
2260  
2261 \family roman
2262 \series medium
2263 \shape up
2264 \size normal
2265 \emph off
2266 \bar no
2267 \noun off
2268 \color none
2269 The dimension of the rectangle is given as a dotted pair 
2270 \begin_inset Formula $P_{0}.P_{1}$
2271 \end_inset
2272
2273  of points denoting the top left and lower right corners of the rectangle.
2274  Each point, in turn,is given as a doubly quoted comma separated pair 
2275 \begin_inset Quotes eld
2276 \end_inset
2277
2278
2279 \begin_inset Formula $x,y$
2280 \end_inset
2281
2282
2283 \begin_inset Quotes erd
2284 \end_inset
2285
2286  specifying row 
2287 \begin_inset Formula $x$
2288 \end_inset
2289
2290  and column 
2291 \begin_inset Formula $y$
2292 \end_inset
2293
2294 .
2295  These are followed by the framing commands, to produce figures such as
2296  the following: 
2297 \begin_inset Formula \[
2298 \xymatrix{A & B\ar@(d,r)[dl]\sp(0.2)\phi\sp(0.7)\psi\save"1,1"."2,1"*+[F=]\frm{}\restore\,\\
2299 C & \save"1,1"."1,2"*++[F]\frm{}\restore}
2300 \]
2301
2302 \end_inset
2303
2304  Here, the code 
2305 \family typewriter
2306 \series default
2307 \shape default
2308 \size default
2309 \emph default
2310 \bar default
2311 \noun default
2312 \color inherit
2313
2314 \backslash
2315 save"1,1"."2,1"*+[F=]
2316 \backslash
2317 frm{}
2318 \backslash
2319 restore
2320 \family roman
2321 \series medium
2322 \shape up
2323 \size normal
2324 \emph off
2325 \bar no
2326 \noun off
2327 \color none
2328  produces the doubly framed rectangle, and the code for the extra wide horizonta
2329 l rectangle is 
2330 \family typewriter
2331 \series default
2332 \shape default
2333 \size default
2334 \emph default
2335 \bar default
2336 \noun default
2337 \color inherit
2338
2339 \backslash
2340 save"1,1"."1,2"*++[F]
2341 \backslash
2342 frm{}
2343 \backslash
2344 restore
2345 \family roman
2346 \series medium
2347 \shape up
2348 \size normal
2349 \emph off
2350 \bar no
2351 \noun off
2352 \color none
2353 .
2354  This code can be placed in arbitrary cells of the xymatrix.
2355  
2356 \end_layout
2357
2358 \begin_layout Section
2359 Using LyX's math editor
2360 \end_layout
2361
2362 \begin_layout Standard
2363 As an alternative to writing the 
2364 \family typewriter
2365 xypic
2366 \family default
2367  code, then transforming it into a math-editing environment by marking it
2368  and applying 
2369 \family sans
2370 Ctrl-m
2371 \family default
2372 , or 
2373 \family sans
2374 Ctrl-M
2375 \family default
2376 , one may construct and modify the whole xypic-diagram inside LyX's math
2377  editor.
2378  We describe the editing steps for a figure just like the one above.
2379  
2380 \end_layout
2381
2382 \begin_layout Subsection
2383 Caveat - how to enter braces
2384 \end_layout
2385
2386 \begin_layout Standard
2387 Recall that in LyX's math-editor any pair of braces 
2388 \family typewriter
2389 {
2390 \family default
2391  and 
2392 \family typewriter
2393 }
2394 \family default
2395  that are to enclose a macro-parameter must be entered by typing just 
2396 \family typewriter
2397
2398 \backslash
2399 {
2400 \family default
2401  .
2402  The closing brace is automatically supplied and in between a box into which
2403  to the parameter is entered.
2404  In connection with 
2405 \begin_inset ERT
2406 status collapsed
2407
2408 \begin_layout Plain Layout
2409
2410
2411 \backslash
2412 Xy
2413 \end_layout
2414
2415 \end_inset
2416
2417 -diagrams, this applies in particular to arrow modifications that are normally
2418  given in the form 
2419 \family typewriter
2420 @{
2421 \family default
2422  \SpecialChar \ldots{}
2423  
2424 \family typewriter
2425 }
2426 \family default
2427  with the ellipsis standing for the description of end, shaft and tip of
2428  the arrow.
2429  Inside the math-editor, enter just 
2430 \family typewriter
2431 @
2432 \backslash
2433 {
2434 \family default
2435  and let LyX provide the closing brace and the box into which to enter the
2436  description of the arrow.
2437 \end_layout
2438
2439 \begin_layout Standard
2440 Braces that are entered without the backslash 
2441 \family typewriter
2442
2443 \backslash
2444
2445 \family default
2446  will just appear as typed, but cannot be used to receive a macro parameter.
2447  They are useful, for instance to denote sets, e.
2448 \begin_inset space \thinspace{}
2449 \end_inset
2450
2451 g.
2452  
2453 \family typewriter
2454 {x
2455 \backslash
2456 in X 
2457 \backslash
2458 mid x
2459 \backslash
2460 notin x}
2461 \family default
2462  will display as 
2463 \begin_inset Formula $\{x\in X\mid x\notin x\}$
2464 \end_inset
2465
2466 .
2467 \end_layout
2468
2469 \begin_layout Subsection
2470 Setting up the matrix
2471 \end_layout
2472
2473 \begin_layout Standard
2474 With 
2475 \family sans
2476 Ctrl-m
2477 \family default
2478  or 
2479 \family sans
2480 Ctrl-M
2481 \family default
2482  open a formula environment and enter: 
2483 \family typewriter
2484
2485 \backslash
2486 xymatrix
2487 \family default
2488 .
2489  This produces a 1
2490 \begin_inset Formula $\times$
2491 \end_inset
2492
2493 1- 
2494 \begin_inset ERT
2495 status collapsed
2496
2497 \begin_layout Plain Layout
2498
2499
2500 \backslash
2501 Xy
2502 \end_layout
2503
2504 \end_inset
2505
2506 -matrix.
2507  Add extra rows by typing 
2508 \family sans
2509 Ctrl-Enter
2510 \family default
2511  and add columns by typing 
2512 \family sans
2513 Alt-m c i.
2514  
2515 \end_layout
2516
2517 \begin_layout Standard
2518 At any time, further rows or columns can be entered or deleted using commands
2519  available from 
2520 \family sans
2521 Edit\SpecialChar \menuseparator
2522 Math,
2523 \family default
2524  resp.
2525  their shortcuts, beginning with 
2526 \family sans
2527 Alt-m c
2528 \family default
2529  for the column commands or 
2530 \family sans
2531 Alt-m w
2532 \family default
2533  for the row commands.
2534  
2535 \end_layout
2536
2537 \begin_layout Subsection
2538 Entering nodes, arrows and labels
2539 \end_layout
2540
2541 \begin_layout Standard
2542 Type the nodes into the correct positions of the matrix.
2543  If you move the cursor out of the matrix, you should see a first rendering
2544  of the node layout.
2545  Next, add the arrows at the nodes from where they should emanate by typing
2546  
2547 \family typewriter
2548
2549 \backslash
2550 ar[
2551 \family default
2552 \emph on
2553 p
2554 \family typewriter
2555 \emph default
2556 ]
2557 \family default
2558 , where 
2559 \emph on
2560 p
2561 \emph default
2562  can be any path made up from the characters 
2563 \family typewriter
2564 u
2565 \family default
2566
2567 \family typewriter
2568 d
2569 \family default
2570
2571 \family typewriter
2572 l
2573 \family default
2574
2575 \family typewriter
2576 r
2577 \family default
2578 .
2579  Make sure that the path indeed leads to an existing node within the matrix.
2580  Otherwise, the figure will not display when the cursor leaves the editing
2581  area.
2582 \end_layout
2583
2584 \begin_layout Standard
2585 Next, label the arrows by attaching a label text as upper or lower indices
2586  to the end of the arrow's path.
2587  As always in LyX's math editor, an underscore 
2588 \family typewriter
2589 _
2590 \family default
2591  opens a box for a lower index and a 
2592 \family typewriter
2593 ^
2594 \family default
2595  followed by a space opens a box for an upper index.
2596  You can enter any LaTeX-code as a label.
2597  
2598 \end_layout
2599
2600 \begin_layout Subsection
2601 Modifying arrows 
2602 \end_layout
2603
2604 \begin_layout Standard
2605 Finally, modify the appearance of the arrows by entering @-modifiers @{\SpecialChar \ldots{}
2606 },
2607  @<\SpecialChar \ldots{}
2608 >, @(\SpecialChar \ldots{}
2609 ,\SpecialChar \ldots{}
2610 ) or @/\SpecialChar \ldots{}
2611 /.
2612  The above caveat applies to the first form only.
2613  It must be entered as 
2614 \family typewriter
2615 @
2616 \backslash
2617 {
2618 \family default
2619  with the arrow description entered inside the LyX-supplied box.
2620  If this box remains empty, you have specified an empty arrow.
2621  This is a useful construction, too, as you will see in the next section.
2622  
2623 \end_layout
2624
2625 \begin_layout Standard
2626 The other modifiers, @<\SpecialChar \ldots{}
2627 >, @(\SpecialChar \ldots{}
2628 ,\SpecialChar \ldots{}
2629 ) and @/\SpecialChar \ldots{}
2630 / are typed as shown with the arrow
2631  description replacing the ellipsis.
2632  The code for bending arrows, which in 
2633 \family typewriter
2634 xypic
2635 \family default
2636  is @/_
2637 \emph on
2638 measure
2639 \emph default
2640 / or @/
2641 \emph on
2642 ^measure
2643 \emph default
2644 / where 
2645 \emph on
2646 measure
2647 \emph default
2648  is any valid TeX-measure, should be entered as upper or lower index to
2649  the first slash / .
2650  Make sure that the ending slash does not end up being part of the upper
2651  or lower index.
2652 \end_layout
2653
2654 \begin_layout Subsection
2655 What if something goes wrong
2656 \end_layout
2657
2658 \begin_layout Standard
2659 When constructing a diagram, you should at times check it by just moving
2660  the cursor out of the editing area to see whether instant preview can successfu
2661 lly convert it into graphical output.
2662  If this does not happen, it may either be that instant preview for some
2663  reason is not aware that it should retranslate the graphics.
2664  Moving the cursor into the editing area and out again sometimes wakes up
2665  instant preview.
2666 \end_layout
2667
2668 \begin_layout Standard
2669 A more serious reason could be a syntactical error in your input.
2670  If necessary, redo the last editing steps, using Ctrl-z, or try to translate
2671  the LyX-file into dvi using Ctrl-d or 
2672 \family sans
2673 View\SpecialChar \menuseparator
2674 Dvi
2675 \family default
2676 .
2677  There should be some error generated, which hopefully gives you a hint
2678  as to the source of the mistake.
2679 \end_layout
2680
2681 \begin_layout Section
2682 Hacks
2683 \end_layout
2684
2685 \begin_layout Standard
2686 Certain things do not work correctly inside LyX.
2687  The ones that we (used to) miss most are the horizontal and vertical scaling
2688  of diagrams, and the correct positioning of arrows.
2689  There are some workarounds that we are explaining here.
2690  
2691 \end_layout
2692
2693 \begin_layout Subsection
2694 Horizontal and vertical scaling
2695 \end_layout
2696
2697 \begin_layout Standard
2698 It is often convenient to stretch the horizontal or the vertical dimensions
2699  of an entire diagram by using spacing commands for rows and/or columns.
2700  According to the 
2701 \begin_inset ERT
2702 status collapsed
2703
2704 \begin_layout Plain Layout
2705
2706
2707 \backslash
2708 Xy
2709 \end_layout
2710
2711 \end_inset
2712
2713 -manual, for instance, 
2714 \family typewriter
2715
2716 \backslash
2717 xymatrix@R=1pc{
2718 \family default
2719 \SpecialChar \ldots{}
2720
2721 \family typewriter
2722 }
2723 \family default
2724  defines an 
2725 \begin_inset ERT
2726 status collapsed
2727
2728 \begin_layout Plain Layout
2729
2730
2731 \backslash
2732 Xy
2733 \end_layout
2734
2735 \end_inset
2736
2737 -matrix with row spacing of 1 pica.
2738  Similarly, 
2739 \family typewriter
2740
2741 \backslash
2742 xymatrix@C=
2743 \family default
2744 \SpecialChar \ldots{}
2745
2746 \family typewriter
2747 {
2748 \family default
2749 \SpecialChar \ldots{}
2750
2751 \family typewriter
2752 }
2753 \family default
2754  allows to modify the space between columns.
2755  Unfortunately, these commands do currently not work inside LyX, as the
2756  @-character is interpreted by LyX as ending the 
2757 \begin_inset ERT
2758 status collapsed
2759
2760 \begin_layout Plain Layout
2761
2762
2763 \backslash
2764 Xy
2765 \end_layout
2766
2767 \end_inset
2768
2769 -matrix-macro.
2770  
2771 \end_layout
2772
2773 \begin_layout Standard
2774 Knowing that 
2775 \begin_inset ERT
2776 status collapsed
2777
2778 \begin_layout Plain Layout
2779
2780
2781 \backslash
2782 Xy
2783 \end_layout
2784
2785 \end_inset
2786
2787
2788 \begin_inset space ~
2789 \end_inset
2790
2791  stores the values for row-spacing and column-spacing in the variables 
2792 \family typewriter
2793
2794 \backslash
2795 xymatrixrowsep@
2796 \family default
2797  and 
2798 \family typewriter
2799
2800 \backslash
2801 xymatrixrowsep@
2802 \family default
2803 , add the following macro to the preamble (
2804 \family sans
2805 Layout\SpecialChar \menuseparator
2806 Document\SpecialChar \menuseparator
2807 Preamble)
2808 \end_layout
2809
2810 \begin_layout LyX-Code
2811
2812 \backslash
2813 makeatletter
2814 \end_layout
2815
2816 \begin_layout LyX-Code
2817
2818 \backslash
2819 newcommand{
2820 \backslash
2821 xyR}[1]{% 
2822 \end_layout
2823
2824 \begin_layout LyX-Code
2825
2826 \backslash
2827 makeatletter
2828 \end_layout
2829
2830 \begin_layout LyX-Code
2831
2832 \backslash
2833 xydef@
2834 \backslash
2835 xymatrixrowsep@{#1}
2836 \end_layout
2837
2838 \begin_layout LyX-Code
2839
2840 \backslash
2841 makeatother
2842 \end_layout
2843
2844 \begin_layout LyX-Code
2845 } % end of 
2846 \backslash
2847 xyR
2848 \end_layout
2849
2850 \begin_layout LyX-Code
2851
2852 \end_layout
2853
2854 \begin_layout Standard
2855 A macro 
2856 \family typewriter
2857
2858 \backslash
2859 xyC
2860 \family default
2861  can be defined correspondingly by replacing 
2862 \family typewriter
2863
2864 \backslash
2865 xymatrixrowsep@
2866 \family default
2867  with 
2868 \family typewriter
2869
2870 \backslash
2871 xymatrixcolsep@
2872 \family default
2873 .
2874  Now, a figure can be scaled by entering 
2875 \backslash
2876 xyR{...} into the 
2877 \begin_inset ERT
2878 status collapsed
2879
2880 \begin_layout Plain Layout
2881
2882
2883 \backslash
2884 Xy
2885 \end_layout
2886
2887 \end_inset
2888
2889 -matrix.
2890  Place the cursor inside the matrix, just before the first entry.
2891  Then enter 
2892 \family typewriter
2893
2894 \backslash
2895 xyR
2896 \backslash
2897 {
2898 \family default
2899  or 
2900 \family typewriter
2901
2902 \backslash
2903 xyC
2904 \backslash
2905 {
2906 \family default
2907  or both.
2908  Dont't forget the backslashes and remember, that the closing brace is automatic
2909 ally supplied by LyX.
2910  Inside the braces enter the dimensions.
2911  The default is 
2912 \family typewriter
2913 2pt
2914 \family default
2915 .
2916  Here you see a diagram which is squashed vertically and stretched horizontally
2917  with 
2918 \family typewriter
2919
2920 \backslash
2921 xyR{9pc}
2922 \backslash
2923 xyC{.5pc}
2924 \family default
2925 :
2926 \end_layout
2927
2928 \begin_layout Standard
2929 \begin_inset Formula \[
2930 \xyC{.5pc}\xyC{9pc}\xymatrix{A\ar[r]\ar[d] & B\\
2931 C\ar@{}[ur]|{\text{{horizontal stretch}}}}
2932 \]
2933
2934 \end_inset
2935
2936
2937 \end_layout
2938
2939 \begin_layout Subsection
2940 Label positioning
2941 \end_layout
2942
2943 \begin_layout Standard
2944 Another useful 
2945 \begin_inset ERT
2946 status collapsed
2947
2948 \begin_layout Plain Layout
2949
2950
2951 \backslash
2952 Xy
2953 \end_layout
2954
2955 \end_inset
2956
2957 -vcommand allows the correct positioning of labels along the shaft of arrows.
2958  This feature is sometimes necessary, when the default position of a label
2959  would otherwise clutter the picture, or would even coincide with other
2960  items, such as the intersection of the arrows in the figure below.
2961  In order to shift a label position alongside the shaft of an arrow, 
2962 \begin_inset ERT
2963 status collapsed
2964
2965 \begin_layout Plain Layout
2966
2967
2968 \backslash
2969 Xy
2970 \end_layout
2971
2972 \end_inset
2973
2974
2975 \begin_inset space ~
2976 \end_inset
2977
2978  allows to prefix the label by a decimal number in parentheses, specifying
2979  the fraction of distance alongside the arrow where the label is to be placed.
2980  For instance, the code 
2981 \family typewriter
2982
2983 \backslash
2984 ar[r]|(0.3)
2985 \backslash
2986 varphi
2987 \family default
2988 , will place the label on the shaft, but only about one third of the way.
2989  
2990 \end_layout
2991
2992 \begin_layout Standard
2993 Doing the same with labels above or below arrows as 
2994 \family typewriter
2995
2996 \backslash
2997 ar[dr]^(0.3)
2998 \backslash
2999 varphi,
3000 \family default
3001  respectively 
3002 \family typewriter
3003
3004 \backslash
3005 ar[ur]_(0.3)
3006 \backslash
3007 phi
3008 \family default
3009 , does not work from inside LyX.
3010  Instead, one has to replace the hat-symbol ^, resp.
3011  the underscore _ , by the macros 
3012 \family typewriter
3013
3014 \backslash
3015 sp
3016 \family default
3017 , resp.
3018  
3019 \family typewriter
3020
3021 \backslash
3022 sb
3023 \family default
3024 , obtaining 
3025 \family typewriter
3026
3027 \backslash
3028 ar[dr]
3029 \backslash
3030 sp(0.3)
3031 \backslash
3032 varphi 
3033 \family default
3034 and
3035 \family typewriter
3036  
3037 \backslash
3038 ar[ur]
3039 \backslash
3040 sb(0.3)
3041 \backslash
3042 phi.
3043  
3044 \family default
3045 It is, in fact, possible to enter several labels this way and those labels
3046  are placed correctly, even if the arrow bends.
3047  In the following figure, the bending arrow with its four labels has been
3048  produced with 
3049 \family typewriter
3050
3051 \backslash
3052 ar@(r,r)[d] 
3053 \backslash
3054 sp(0.2){
3055 \backslash
3056 phi_{1}} 
3057 \backslash
3058 sp(0.4){
3059 \backslash
3060 phi_{2}} 
3061 \backslash
3062 sb(0.6){
3063 \backslash
3064 phi_{3}} 
3065 \backslash
3066 sp(0.8){
3067 \backslash
3068 phi_{4}}.
3069 \end_layout
3070
3071 \begin_layout Standard
3072 \begin_inset Formula \[
3073 \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}}\\
3074 \circ\ar[ur]\sb(0.3)\phi & \bullet}
3075 \]
3076
3077 \end_inset
3078
3079
3080 \end_layout
3081
3082 \begin_layout Subsection
3083 Invisible stretched arrows
3084 \end_layout
3085
3086 \begin_layout Standard
3087 A more general trick uses invisible arrows to place any object almost anywhere
3088  inside a diagram.
3089  Produce an invisible arrow, shorten (or prolong) it past its goal by adding
3090  a decimal stretching ratio, e.
3091 \begin_inset space \thinspace{}
3092 \end_inset
3093
3094 g.
3095  
3096 \family typewriter
3097 (0.6)
3098 \family default
3099  or 
3100 \family typewriter
3101 (1.4)
3102 \family default
3103  to its path.
3104  Attach a label to this invisible arrow.
3105  
3106 \end_layout
3107
3108 \begin_layout Standard
3109 Thus, the down pointing arrow with its label 
3110 \begin_inset Formula $\varphi$
3111 \end_inset
3112
3113  at (0.3) of its way along the shaft might as well have been produced by
3114  adding to the regular arrow 
3115 \family typewriter
3116
3117 \backslash
3118 ar[dr] 
3119 \family default
3120 an invisible 
3121 \begin_inset Formula $\varphi$
3122 \end_inset
3123
3124 -labelled arrow 
3125 \family typewriter
3126
3127 \backslash
3128 ar@{}[dr(0.6)]^
3129 \backslash
3130 varphi
3131 \family default
3132 , reaching only 0.6 of the way.
3133  Its label will now appear at 0.3 of the way of the original visible arrow.
3134  
3135 \end_layout
3136
3137 \begin_layout Standard
3138 This workaround has two minor drawbacks: First, it does not work with bending
3139  arrows.
3140  Secondly, prolonging an invisible arrow beyond the normal dimension of
3141  the figure will invisibly extend the figure box, and thereby cause too
3142  much vertical space between the figure and the preceding or the following
3143  paragraph.
3144  
3145 \end_layout
3146
3147 \begin_layout Standard
3148 Nevertheless, invisible arrows are an important tool, since they can, in
3149  principle, be used to place information at any chosen place in a diagram.
3150  In the above figure, for instance, we have used an invisible arrow to carry
3151  the 
3152 \family typewriter
3153
3154 \backslash
3155 vdots
3156 \family default
3157  as label and at the earlier figure we had used an invisible arrow to carry
3158  the text 
3159 \begin_inset Quotes eld
3160 \end_inset
3161
3162
3163 \family typewriter
3164 horizontal stretch
3165 \family default
3166
3167 \begin_inset Quotes erd
3168 \end_inset
3169
3170  into the center of the figure.
3171 \end_layout
3172
3173 \begin_layout Bibliography
3174 \begin_inset CommandInset bibitem
3175 LatexCommand bibitem
3176 label "1"
3177 key "xypic manual"
3178
3179 \end_inset
3180
3181 Kristoffer H.
3182  Rose: 
3183 \begin_inset ERT
3184 status collapsed
3185
3186 \begin_layout Plain Layout
3187
3188
3189 \backslash
3190 Xy
3191 \end_layout
3192
3193 \end_inset
3194
3195
3196 \emph on
3197 -Pic User's Guide
3198 \emph default
3199 .
3200  Version 3.7, Feb.
3201  16, 1999.
3202  Available as part of the 
3203 \family typewriter
3204 xypic
3205 \family default
3206  LaTeX package.
3207  
3208 \end_layout
3209
3210 \begin_layout Bibliography
3211 \begin_inset CommandInset bibitem
3212 LatexCommand bibitem
3213 label "2"
3214 key "instant-preview"
3215
3216 \end_inset
3217
3218
3219 \begin_inset Flex URL
3220 status collapsed
3221
3222 \begin_layout Plain Layout
3223
3224 http://www.tug.org/tex-archive/help/Catalogue/entries/preview-latex.html
3225 \end_layout
3226
3227 \end_inset
3228
3229
3230 \end_layout
3231
3232 \begin_layout Bibliography
3233 \begin_inset CommandInset bibitem
3234 LatexCommand bibitem
3235 label "3"
3236 key "xypic"
3237
3238 \end_inset
3239
3240
3241 \begin_inset Flex URL
3242 status collapsed
3243
3244 \begin_layout Plain Layout
3245
3246 http://www.tug.org/tex-archive/help/Catalogue/entries/xypic.html
3247 \end_layout
3248
3249 \end_inset
3250
3251
3252 \end_layout
3253
3254 \begin_layout Bibliography
3255 \begin_inset CommandInset bibitem
3256 LatexCommand bibitem
3257 label "4"
3258 key "AUCTeX"
3259
3260 \end_inset
3261
3262
3263 \begin_inset Flex URL
3264 status collapsed
3265
3266 \begin_layout Plain Layout
3267
3268 http://www.gnu.org/software/auctex/
3269 \end_layout
3270
3271 \end_inset
3272
3273
3274 \end_layout
3275
3276 \end_body
3277 \end_document