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