]> git.lyx.org Git - lyx.git/blob - lib/examples/xypic.lyx
Change the title of the Extended manual, and make some other changes to it.
[lyx.git] / lib / examples / xypic.lyx
1 #LyX 1.6.0beta3 created this file. For more info see http://www.lyx.org/
2 \lyxformat 335
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 \language english
26 \inputencoding auto
27 \font_roman ae
28 \font_sans default
29 \font_typewriter default
30 \font_default_family default
31 \font_sc false
32 \font_osf false
33 \font_sf_scale 100
34 \font_tt_scale 100
35 \graphics default
36 \paperfontsize default
37 \spacing single
38 \use_hyperref false
39 \papersize a4paper
40 \use_geometry false
41 \use_amsmath 1
42 \use_esint 0
43 \cite_engine basic
44 \use_bibtopic false
45 \paperorientation portrait
46 \secnumdepth 3
47 \tocdepth 3
48 \paragraph_separation indent
49 \defskip medskip
50 \quotes_language english
51 \papercolumns 1
52 \papersides 1
53 \paperpagestyle default
54 \tracking_changes false
55 \output_changes false
56 \author "" 
57 \author "" 
58 \end_header
59
60 \begin_body
61
62 \begin_layout Title
63 Using 
64 \begin_inset ERT
65 status collapsed
66
67 \begin_layout Plain Layout
68
69
70 \backslash
71 Xy
72 \end_layout
73
74 \end_inset
75
76 -pic in LyX
77 \end_layout
78
79 \begin_layout Author
80 H.
81  Peter Gumm
82 \end_layout
83
84 \begin_layout Abstract
85 With the recent versions of LyX and with the 
86 \family typewriter
87 preview
88 \family default
89 -style installed in the LaTeX-System, the graph drawing package 
90 \family typewriter
91
92 \begin_inset ERT
93 status collapsed
94
95 \begin_layout Plain Layout
96
97
98 \backslash
99 Xy
100 \end_layout
101
102 \end_inset
103
104
105 \family default
106 -Pic can be conveniently used inside LyX.
107  Diagrams can be edited and displayed inside the main LyX editing window.
108  Here, we shall describe how to use the 
109 \family typewriter
110
111 \backslash
112 xymatrix
113 \family default
114  command from 
115 \family typewriter
116 xypic
117 \family default
118  inside LyX in order to draw, to edit and to preview diagrams as typically
119  used in category theory, algebra, and related fields.
120  
121 \end_layout
122
123 \begin_layout Abstract
124 \begin_inset CommandInset toc
125 LatexCommand tableofcontents
126
127 \end_inset
128
129
130 \end_layout
131
132 \begin_layout Section
133 Introduction 
134 \end_layout
135
136 \begin_layout Standard
137 The 
138 \family typewriter
139 xypic
140 \family default
141 -package has long served as a convenient tool for easily constructing graphs
142  and diagrams in LaTeX.
143  Unfortunately, its use in LyX had long been restricted to the infamous
144  ERT-boxes, meaning that the LyX editor could only display the LaTeX-source
145  and not the finished diagram.
146  The new 
147 \family typewriter
148 preview
149 \family default
150 -style of LaTeX which is part of the AUCTeX project
151 \begin_inset CommandInset citation
152 LatexCommand cite
153 key "AUCTeX"
154
155 \end_inset
156
157 , finally enables the editing and displaying of 
158 \family typewriter
159 xypic
160 \family default
161 -diagrams, constructed, displayed and interactively edited inside LyX.
162 \end_layout
163
164 \begin_layout Standard
165 \begin_inset VSpace defskip
166 \end_inset
167
168
169 \end_layout
170
171 \begin_layout Standard
172 \begin_inset Graphics
173         filename xyfigure.png
174         scale 50
175         BoundingBox 0bp 0bp 580bp 440bp
176         clip
177
178 \end_inset
179
180
181 \end_layout
182
183 \begin_layout Standard
184 \begin_inset VSpace defskip
185 \end_inset
186
187
188 \end_layout
189
190 \begin_layout Standard
191 In this note, we describe how 
192 \begin_inset ERT
193 status collapsed
194
195 \begin_layout Plain Layout
196
197
198 \backslash
199 Xy
200 \end_layout
201
202 \end_inset
203
204 -pic can be used from inside LyX, how diagrams can be created and edited.
205  We have tested the following using LyX versions 1.3.7 up to 1.6, running under
206  WindowsXP and under Windows Vista.
207  
208 \end_layout
209
210 \begin_layout Standard
211 There are two modes of operations: For a start, and for some first tests,
212  it may be easiest to first enter the 
213 \begin_inset ERT
214 status collapsed
215
216 \begin_layout Plain Layout
217
218
219 \backslash
220 Xy
221 \end_layout
222
223 \end_inset
224
225 -Pic code inside the LyX-window, select it all and convert it to a graphical
226  representation by pressing 
227 \family sans
228 Ctrl-m
229 \family default
230  or 
231 \family sans
232 Ctrl-M
233 \family default
234 .
235  If you use 
236 \begin_inset ERT
237 status collapsed
238
239 \begin_layout Plain Layout
240
241
242 \backslash
243 Xy
244 \end_layout
245
246 \end_inset
247
248 -Pic more frequently, or if you want to modify your initial figure, you
249  will want to assemble and modify your figures using LyX's math editor.
250  
251 \end_layout
252
253 \begin_layout Standard
254 Once the cursor is moved over a diagram, this is displayed as an array of
255  nodes and arrow-commands.
256  These can be changed interactively.
257  When the cursor leaves the editing area, the diagram reappears.
258  
259 \end_layout
260
261 \begin_layout Standard
262 In the first two sections of this documentation, we explain how to use LyX
263  in the first mentioned mode and we introduce all 
264 \begin_inset ERT
265 status collapsed
266
267 \begin_layout Plain Layout
268
269
270 \backslash
271 Xy
272 \end_layout
273
274 \end_inset
275
276 -Pic features that might be of use for drawing commutative diagrams, graphs
277  or automata.
278  Section 3 explains how to use the 
279 \begin_inset ERT
280 status collapsed
281
282 \begin_layout Plain Layout
283
284
285 \backslash
286 Xy
287 \end_layout
288
289 \end_inset
290
291 -Pic commands inside a math-editing area.
292  
293 \end_layout
294
295 \begin_layout Standard
296 It is not our intention to write another introduction to 
297 \begin_inset ERT
298 status collapsed
299
300 \begin_layout Plain Layout
301
302
303 \backslash
304 Xy
305 \end_layout
306
307 \end_inset
308
309 -Pic, rather our motivation is to give an introduction how the most important
310  commands work inside LyX, since the keystrokes as explained in the 
311 \begin_inset ERT
312 status collapsed
313
314 \begin_layout Plain Layout
315
316
317 \backslash
318 Xy
319 \end_layout
320
321 \end_inset
322
323 -Pic manual
324 \begin_inset CommandInset citation
325 LatexCommand cite
326 key "xypic manual"
327
328 \end_inset
329
330  will not always function correctly inside LyX.
331  
332 \end_layout
333
334 \begin_layout Section
335 Preparation
336 \end_layout
337
338 \begin_layout Standard
339 The following requires that the LaTeX-packages 
340 \family typewriter
341 xypic
342 \family default
343  and 
344 \family typewriter
345 preview
346 \family default
347  are installed in the LaTeX system.
348  They are available from CTAN, see at 
349 \begin_inset CommandInset citation
350 LatexCommand cite
351 key "instant-preview"
352
353 \end_inset
354
355 , resp.
356  at 
357 \begin_inset CommandInset citation
358 LatexCommand cite
359 key "xypic"
360
361 \end_inset
362
363 .
364  After freshly installing them, it may be necessary, to run 
365 \family sans
366 Edit\SpecialChar \menuseparator
367 Reconfigure
368 \family default
369  from the main LyX menu.
370  The steps to a first diagram output in LyX are then:
371 \end_layout
372
373 \begin_layout Enumerate
374 Activate and test 
375 \family typewriter
376 preview
377 \end_layout
378
379 \begin_deeper
380 \begin_layout Enumerate
381 Open LyX, choose 
382 \family sans
383 Edit\SpecialChar \menuseparator
384 Preferences\SpecialChar \menuseparator
385 Look and Feel\SpecialChar \menuseparator
386 Graphics
387 \family default
388  and place a check-mark at 
389 \emph on
390 Instant Preview
391 \emph default
392 .
393  
394 \end_layout
395
396 \begin_layout Enumerate
397 Test, if 
398 \family typewriter
399 instant-preview
400 \family default
401  works by opening a LyX-document and entering any math-formula, e.g.
402  
403 \begin_inset Formula $a+b=c$
404 \end_inset
405
406 .
407  
408 \end_layout
409
410 \begin_layout Enumerate
411 Move the cursor out of the formula, and watch it change its appearance to
412  look just like in the finished dvi- or postscript document.
413  
414 \end_layout
415
416 \end_deeper
417 \begin_layout Enumerate
418 Activate and test 
419 \family typewriter
420 xypic
421 \end_layout
422
423 \begin_deeper
424 \begin_layout Enumerate
425 Choose 
426 \family sans
427 Layout\SpecialChar \menuseparator
428 Document\SpecialChar \menuseparator
429 Preamble
430 \family default
431  and type 
432 \family typewriter
433
434 \begin_inset Newline newline
435 \end_inset
436
437
438 \backslash
439 usepackage[all]{xy}.
440 \end_layout
441
442 \begin_layout Enumerate
443 Inside your LyX-Document, enter the text 
444 \family typewriter
445
446 \begin_inset Newline newline
447 \end_inset
448
449
450 \backslash
451 xymatrix{A 
452 \backslash
453 ar[r] & B}
454 \family default
455  .
456 \end_layout
457
458 \begin_layout Enumerate
459 Select the whole text and choose 
460 \family sans
461 Insert\SpecialChar \menuseparator
462 Math\SpecialChar \menuseparator
463 Display Formula
464 \family default
465 , or use the corresponding keyboard shortcut 
466 \family sans
467 Ctrl-M
468 \family default
469 .
470  
471 \end_layout
472
473 \begin_layout Enumerate
474 Move the mouse cursor out of the editing box and wait for a split second
475  to see an arrow appear: 
476 \begin_inset Formula $\xymatrix{A\ar [r] & B}
477 $
478 \end_inset
479
480 .
481  
482 \end_layout
483
484 \end_deeper
485 \begin_layout Section
486 Commutative diagrams
487 \end_layout
488
489 \begin_layout Standard
490 The following diagram, which is taken from the documentation of 
491 \begin_inset ERT
492 status collapsed
493
494 \begin_layout Plain Layout
495
496
497 \backslash
498 Xy
499 \end_layout
500
501 \end_inset
502
503 -Pic
504 \begin_inset CommandInset citation
505 LatexCommand cite
506 key "xypic manual"
507
508 \end_inset
509
510  by its creator Kristoffer H.
511  Rose, will provide an example for many of the features available with that
512  package.
513  Its source code is: 
514 \end_layout
515
516 \begin_layout LyX-Code
517
518 \backslash
519 xymatrix{
520 \begin_inset Newline newline
521 \end_inset
522
523   U     
524 \backslash
525 ar@/_{1pc}/[ddr]_
526 \backslash
527 psi
528 \backslash
529 ar@/^{1pc}/[drr]^
530 \backslash
531 varphi
532 \begin_inset Newline newline
533 \end_inset
534
535
536 \backslash
537 ar@{.>}[dr]|-{(x,y)}
538 \backslash
539
540 \backslash
541
542 \begin_inset Newline newline
543 \end_inset
544
545     & X 
546 \backslash
547 times_Z Y 
548 \backslash
549 ar[d]^q 
550 \backslash
551 ar[r]_p  &  X 
552 \backslash
553 ar[d]_f
554 \backslash
555
556 \backslash
557
558 \begin_inset Newline newline
559 \end_inset
560
561     & Y 
562 \backslash
563 ar[r]^g                      &  Z }
564 \end_layout
565
566 \begin_layout LyX-Code
567
568 \end_layout
569
570 \begin_layout Standard
571 Again, to turn this code into a graphical output, select it all at once
572  starting from the 
573 \family typewriter
574
575 \backslash
576 xymatrix{
577 \family default
578  \SpecialChar \ldots{}
579  up to the closing brace \SpecialChar \ldots{}
580  
581 \family typewriter
582 }
583 \family default
584  and turn it into display-math as explained above.
585  A moment after the cursor leaves the math-area, you should see the diagram
586  in its full graphical glory as shown below.
587  
588 \end_layout
589
590 \begin_layout Standard
591 \begin_inset Formula $\xymatrix{U\ar @/_{1pc}/[ddr]_{\psi}\ar @/{}^{1pc}/[drr]^{\varphi}\ar @{.>}[dr]|-{(x,y)}\\
592  & X\times_{Z}Y\ar [d]^{q}\ar [r]_{p} & X\ar [d]_{f}\\
593  & Y\ar [r]^{g} & Z}
594 $
595 \end_inset
596
597  
598 \end_layout
599
600 \begin_layout Subsection
601 The matrix layout of diagrams
602 \end_layout
603
604 \begin_layout Standard
605
606 \family typewriter
607 xymatrix
608 \family default
609  uses a matrix to define the layout of the vertices of a diagram.
610  For the above example, we need a 
611 \begin_inset Formula $3\times3$
612 \end_inset
613
614 -matrix of which 5 entries are used for the vertices 
615 \begin_inset Formula $U$
616 \end_inset
617
618
619 \begin_inset Formula $X\times_{Z}Y$
620 \end_inset
621
622
623 \begin_inset Formula $X$
624 \end_inset
625
626
627 \begin_inset Formula $Y$
628 \end_inset
629
630
631 \begin_inset Formula $Z$
632 \end_inset
633
634 , the other positions remaining empty.
635  In this case, the following matrix determines the layout:
636 \end_layout
637
638 \begin_layout LyX-Code
639
640 \backslash
641 xymatrix{
642 \begin_inset Newline newline
643 \end_inset
644
645     U                       
646 \backslash
647
648 \backslash
649  
650 \begin_inset Newline newline
651 \end_inset
652
653        & X
654 \backslash
655 times_Z Y   & X  
656 \backslash
657
658 \backslash
659  
660 \begin_inset Newline newline
661 \end_inset
662
663        & Y             & Z    } 
664 \end_layout
665
666 \begin_layout Standard
667 The pattern should be familiar from LaTeX: We see three rows, the first
668  two being terminated by the end-of-line-marker 
669 \family typewriter
670
671 \backslash
672
673 \backslash
674
675 \family default
676  .
677  Each line consists of entries, separated by the ampersand 
678 \family typewriter
679 &
680 \family default
681 .
682  
683 \end_layout
684
685 \begin_layout Subsection
686 Arrows
687 \end_layout
688
689 \begin_layout Standard
690 Having entered the vertices, we add arrows between them.
691  The basic 
692 \family typewriter
693 xypic
694 \family default
695 -command to produce an arrow is 
696 \family typewriter
697
698 \backslash
699 ar
700 \family default
701  , it is entered into the cell of the matrix where the arrow is to start.
702  The target of the arrow is defined by direction commands 
703 \family typewriter
704 u
705 \family default
706  (up) 
707 \family typewriter
708 d
709 \family default
710  (down) 
711 \family typewriter
712 l
713 \family default
714  (left), or 
715 \family typewriter
716 r
717 \family default
718  (right).
719  These can be combined to a path and enclosed in square brackets.
720  As an example, the arrows from the vertex 
721 \begin_inset Formula $U$
722 \end_inset
723
724  in the upper left corner down and right to the vertices 
725 \begin_inset Formula $X\times_{Z}Y$
726 \end_inset
727
728
729 \begin_inset Formula $Y$
730 \end_inset
731
732 , and 
733 \begin_inset Formula $X$
734 \end_inset
735
736  are, respectively, defined as 
737 \family typewriter
738
739 \backslash
740 ar[dr]
741 \family default
742
743 \family typewriter
744
745 \backslash
746 ar[ddr]
747 \family default
748  and 
749 \family typewriter
750
751 \backslash
752 ar[drr]
753 \family default
754 .
755  Thus the above diagram with all arrows added becomes:
756 \end_layout
757
758 \begin_layout LyX-Code
759
760 \backslash
761 xymatrix{
762 \begin_inset Newline newline
763 \end_inset
764
765     U 
766 \backslash
767 ar[ddr] 
768 \backslash
769 ar[drr] 
770 \backslash
771 ar[dr]
772 \backslash
773
774 \backslash
775
776 \begin_inset Newline newline
777 \end_inset
778
779     & X 
780 \backslash
781 times_Z Y 
782 \backslash
783 ar[d] 
784 \backslash
785 ar[r]& X 
786 \backslash
787 ar[d]
788 \backslash
789
790 \backslash
791
792 \begin_inset Newline newline
793 \end_inset
794
795     & Y 
796 \backslash
797 ar[r] & Z }
798 \end_layout
799
800 \begin_layout Standard
801 \begin_inset Formula \xymatrix{ U \ar [ddr] \ar [drr] \ar [dr]\\
802  &  X \times_{Z} Y \ar [d] \ar [r]  &  X \ar [d]\\
803  &  Y \ar [r]  &  Z }
804
805
806 \end_inset
807
808
809 \end_layout
810
811 \begin_layout LyX-Code
812
813 \end_layout
814
815 \begin_layout LyX-Code
816
817 \end_layout
818
819 \begin_layout Subsection
820 Labels
821 \end_layout
822
823 \begin_layout Standard
824 Labels are attached to arrows by affixing them as upper or lower indices
825  to the 
826 \family typewriter
827
828 \backslash
829 ar
830 \family default
831 -command.
832  Thus, 
833 \family typewriter
834
835 \backslash
836 ar[drr]^
837 \backslash
838 varphi
839 \family default
840  defines an arrow going one cell down, two to the right and having the label
841  
842 \begin_inset Formula $\varphi$
843 \end_inset
844
845  attached above.
846  To attach a label below the arrow, make it a lower index as in 
847 \family typewriter
848
849 \backslash
850 ar[ddr]_
851 \backslash
852 psi
853 \family default
854 .
855  This explanation is correct only for arrows pointing to the right.
856  More precisely, imagine looking along the arrow in the direction it is
857  pointing.
858  Then an upper index places a label to the left and a lower index places
859  it to the right.
860  Consequently, an arrow pointing from right to left, such as 
861 \family typewriter
862
863 \backslash
864 ar[l]^
865 \backslash
866 alpha_
867 \backslash
868 beta
869 \family default
870  will have label 
871 \begin_inset Formula $\alpha$
872 \end_inset
873
874  below and label 
875 \begin_inset Formula $\beta$
876 \end_inset
877
878  above the arrow, i.e.
879 \begin_inset Formula $\xymatrix{\  & \ \ar [l]_{\beta}^{\alpha}.}
880 $
881 \end_inset
882
883 Using the character | instead of ^ or _ , it is even possible to place the
884  label right onto the arrow, obscuring part of its shaft.
885  
886 \end_layout
887
888 \begin_layout Standard
889 Normally, a label is placed halfway between an arrow's start and target
890  objects.
891  In the first diagram, the central arrow starting in 
892 \begin_inset Formula $U$
893 \end_inset
894
895  has the label 
896 \begin_inset Formula $(x,y)$
897 \end_inset
898
899  in the middle of the arrow's shaft, rather than in the middle between the
900  two objects it connects.
901  This is achieved by prefixing the label with a minus sign, here: 
902 \family typewriter
903
904 \backslash
905 ar[dr]|-{(x,y)}
906 \family default
907 .
908 \end_layout
909
910 \begin_layout LyX-Code
911
912 \backslash
913 xymatrix{
914 \begin_inset Newline newline
915 \end_inset
916
917     U 
918 \backslash
919 ar[ddr]_
920 \backslash
921 psi 
922 \backslash
923 ar[drr]^
924 \backslash
925 varphi
926 \backslash
927 ar[dr]|-{(x,y)}
928 \backslash
929
930 \backslash
931
932 \begin_inset Newline newline
933 \end_inset
934
935     & X 
936 \backslash
937 times_Z Y 
938 \backslash
939 ar[d]^q 
940 \backslash
941 ar[r]_p& X 
942 \backslash
943 ar[d]_f
944 \backslash
945
946 \backslash
947
948 \begin_inset Newline newline
949 \end_inset
950
951     & Y 
952 \backslash
953 ar[r]^g & Z }
954 \end_layout
955
956 \begin_layout LyX-Code
957 \begin_inset Formula \xymatrix{ U \ar [ddr]_{\psi}\ar [drr]^{\varphi}\ar [dr]|-{(x,y)}\\
958  &  X \times_{Z} Y \ar [d]^{q} \ar [r]_{p}  &  X \ar [d]_{f}\\
959  &  Y \ar [r]^{g}  &  Z }
960
961
962 \end_inset
963
964
965 \end_layout
966
967 \begin_layout Standard
968 \begin_inset ERT
969 status collapsed
970
971 \begin_layout Plain Layout
972
973
974 \backslash
975 Xy
976 \end_layout
977
978 \end_inset
979
980 -pic normally permits labels to be shifted towards the tip or towards the
981  start of an arrow by prefixing the label with a ratio, such as e.g.
982  
983 \family typewriter
984 (.3)
985 \family default
986 .
987  In LyX this works only for labels which are placed on top of the arrow,
988  such as 
989 \family typewriter
990
991 \backslash
992 ar[r]|(0.3){
993 \backslash
994 phi}
995 \family default
996 .
997  
998 \end_layout
999
1000 \begin_layout Standard
1001 For labels placed to the left or to the right of the arrow this does not
1002  work.
1003  The corresponding 
1004 \begin_inset ERT
1005 status collapsed
1006
1007 \begin_layout Plain Layout
1008
1009
1010 \backslash
1011 Xy
1012 \end_layout
1013
1014 \end_inset
1015
1016 -pic code such as e.g.
1017  
1018 \family typewriter
1019
1020 \backslash
1021 ar[r]^(.3)
1022 \backslash
1023 phi
1024 \family default
1025  or 
1026 \family typewriter
1027
1028 \backslash
1029 ar[r]_(.3)
1030 \backslash
1031 psi
1032 \family default
1033  is not correctly interpreted by LyX's math editor.
1034  Two workarounds are suggested in the last section of this note.
1035 \end_layout
1036
1037 \begin_layout Subsection
1038 Arrow modification 
1039 \end_layout
1040
1041 \begin_layout Standard
1042 Modification of the design, the form or the positioning of arrows are introduced
1043  by the 
1044 \family typewriter
1045 @
1046 \family default
1047 -character.
1048  This is followed by a pair of matching brackets, where the form of the
1049  bracket pair, 
1050 \family typewriter
1051 { }
1052 \family default
1053  or 
1054 \family typewriter
1055 < >
1056 \family default
1057  or 
1058 \family typewriter
1059 / /
1060 \family default
1061  indicates, whether we want to modify the design, the or the curvature of
1062  the arrow.
1063  Various modifactions can be applied to an arrow at the same time.
1064 \end_layout
1065
1066 \begin_layout Subsubsection
1067 Arrow design 
1068 \end_layout
1069
1070 \begin_layout Standard
1071 Various designs such as 
1072 \emph on
1073 solid
1074 \emph default
1075
1076 \emph on
1077 dotted
1078 \emph default
1079
1080 \emph on
1081 dashed
1082 \emph default
1083  or 
1084 \emph on
1085 double
1086 \emph default
1087  are possible for the shaft of an arrow.
1088  These can be combined with various ends and various tips.
1089  In general, the design of an arrow is described by following the command
1090  
1091 \family typewriter
1092
1093 \backslash
1094 ar
1095 \family default
1096  immediately by an 
1097 \family typewriter
1098 @
1099 \family default
1100 -sign and a pair of braces {\SpecialChar \ldots{}
1101 } containing characters describing the end,
1102  the shaft and the tip of the arrow.
1103  These characters are chosen to give some form of ASCII-rendering of the
1104  real thing.
1105  For instance 
1106 \family typewriter
1107
1108 \backslash
1109 ar@{>..>>}
1110 \family default
1111  produces an arrow with split end, a dotted shaft and double head.
1112  A number of other arrow designs is given in the table below.
1113  Note that the ends of embedding arrows 
1114 \begin_inset Formula $\xymatrix{A\ar @{^{(}->}[r] & B}
1115 $
1116 \end_inset
1117
1118  are described by raising or lowering opening parentheses, such as in 
1119 \family typewriter
1120
1121 \backslash
1122 ar@{^(->}[r].
1123 \begin_inset Newline newline
1124 \end_inset
1125
1126
1127 \end_layout
1128
1129 \begin_layout Standard
1130 \begin_inset Tabular
1131 <lyxtabular version="3" rows="11" columns="2">
1132 <features islongtable="true">
1133 <column alignment="center" valignment="top" width="0">
1134 <column alignment="center" valignment="top" width="0">
1135 <row>
1136 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1137 \begin_inset Text
1138
1139 \begin_layout Plain Layout
1140 Result
1141 \end_layout
1142
1143 \end_inset
1144 </cell>
1145 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1146 \begin_inset Text
1147
1148 \begin_layout Plain Layout
1149 Source code in LyX
1150 \end_layout
1151
1152 \end_inset
1153 </cell>
1154 </row>
1155 <row>
1156 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1157 \begin_inset Text
1158
1159 \begin_layout Plain Layout
1160 \begin_inset Formula \xymatrix{\ \ar [r]  &  \ }
1161
1162
1163 \end_inset
1164
1165
1166 \end_layout
1167
1168 \end_inset
1169 </cell>
1170 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1171 \begin_inset Text
1172
1173 \begin_layout Plain Layout
1174
1175 \family typewriter
1176
1177 \backslash
1178 ar 
1179 \end_layout
1180
1181 \end_inset
1182 </cell>
1183 </row>
1184 <row>
1185 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1186 \begin_inset Text
1187
1188 \begin_layout Plain Layout
1189 \begin_inset Formula \xymatrix{\ \ar @{-->}[r]  &  \ }
1190
1191
1192 \end_inset
1193
1194
1195 \end_layout
1196
1197 \end_inset
1198 </cell>
1199 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1200 \begin_inset Text
1201
1202 \begin_layout Plain Layout
1203
1204 \family typewriter
1205
1206 \backslash
1207 ar@{-->}
1208 \end_layout
1209
1210 \end_inset
1211 </cell>
1212 </row>
1213 <row>
1214 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1215 \begin_inset Text
1216
1217 \begin_layout Plain Layout
1218 \begin_inset Formula \xymatrix{\ \ar @{..>}[r]  &  \ }
1219
1220
1221 \end_inset
1222
1223
1224 \end_layout
1225
1226 \end_inset
1227 </cell>
1228 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1229 \begin_inset Text
1230
1231 \begin_layout Plain Layout
1232
1233 \family typewriter
1234
1235 \backslash
1236 ar@{..>}
1237 \end_layout
1238
1239 \end_inset
1240 </cell>
1241 </row>
1242 <row>
1243 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1244 \begin_inset Text
1245
1246 \begin_layout Plain Layout
1247 \begin_inset Formula \xymatrix{\ \ar @{~>}[r]  &  \ }
1248
1249
1250 \end_inset
1251
1252
1253 \end_layout
1254
1255 \end_inset
1256 </cell>
1257 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1258 \begin_inset Text
1259
1260 \begin_layout Plain Layout
1261
1262 \family typewriter
1263
1264 \backslash
1265 ar@{~>}
1266 \end_layout
1267
1268 \end_inset
1269 </cell>
1270 </row>
1271 <row>
1272 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1273 \begin_inset Text
1274
1275 \begin_layout Plain Layout
1276 \begin_inset Formula \xymatrix{\ \ar @{->>}[r]  &  \ }
1277
1278
1279 \end_inset
1280
1281
1282 \end_layout
1283
1284 \end_inset
1285 </cell>
1286 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1287 \begin_inset Text
1288
1289 \begin_layout Plain Layout
1290
1291 \family typewriter
1292
1293 \backslash
1294 ar@{->>}
1295 \end_layout
1296
1297 \end_inset
1298 </cell>
1299 </row>
1300 <row>
1301 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1302 \begin_inset Text
1303
1304 \begin_layout Plain Layout
1305 \begin_inset Formula \xymatrix{\ \ar @{-->>}[r]  &  \ }
1306
1307
1308 \end_inset
1309
1310
1311 \end_layout
1312
1313 \end_inset
1314 </cell>
1315 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1316 \begin_inset Text
1317
1318 \begin_layout Plain Layout
1319
1320 \family typewriter
1321
1322 \backslash
1323 ar@{-->>}
1324 \end_layout
1325
1326 \end_inset
1327 </cell>
1328 </row>
1329 <row>
1330 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1331 \begin_inset Text
1332
1333 \begin_layout Plain Layout
1334 \begin_inset Formula \xymatrix{\ \ar @{>->>}[r]  &  \ }
1335
1336
1337 \end_inset
1338
1339
1340 \end_layout
1341
1342 \end_inset
1343 </cell>
1344 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1345 \begin_inset Text
1346
1347 \begin_layout Plain Layout
1348
1349 \family typewriter
1350
1351 \backslash
1352 ar@{>->>}
1353 \end_layout
1354
1355 \end_inset
1356 </cell>
1357 </row>
1358 <row>
1359 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1360 \begin_inset Text
1361
1362 \begin_layout Plain Layout
1363 \begin_inset Formula \xymatrix{\ \ar @{_{(}->}[r]  &  \ }
1364
1365
1366 \end_inset
1367
1368
1369 \end_layout
1370
1371 \end_inset
1372 </cell>
1373 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1374 \begin_inset Text
1375
1376 \begin_layout Plain Layout
1377
1378 \family typewriter
1379
1380 \backslash
1381 ar@{_(->}
1382 \end_layout
1383
1384 \end_inset
1385 </cell>
1386 </row>
1387 <row>
1388 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1389 \begin_inset Text
1390
1391 \begin_layout Plain Layout
1392 \begin_inset Formula \xymatrix{\ \ar @{^{(}->}[r]  &  \ }
1393
1394
1395 \end_inset
1396
1397
1398 \end_layout
1399
1400 \end_inset
1401 </cell>
1402 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1403 \begin_inset Text
1404
1405 \begin_layout Plain Layout
1406
1407 \family typewriter
1408
1409 \backslash
1410 ar@{^(->}
1411 \end_layout
1412
1413 \end_inset
1414 </cell>
1415 </row>
1416 <row>
1417 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1418 \begin_inset Text
1419
1420 \begin_layout Plain Layout
1421 \begin_inset Formula \xymatrix{\ \ar @{|-|}[r]  &  \ }
1422
1423
1424 \end_inset
1425
1426
1427 \end_layout
1428
1429 \end_inset
1430 </cell>
1431 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1432 \begin_inset Text
1433
1434 \begin_layout Plain Layout
1435
1436 \family typewriter
1437
1438 \backslash
1439 ar@{|-|}
1440 \end_layout
1441
1442 \end_inset
1443 </cell>
1444 </row>
1445 </lyxtabular>
1446
1447 \end_inset
1448
1449
1450 \end_layout
1451
1452 \begin_layout Standard
1453 \begin_inset ERT
1454 status collapsed
1455
1456 \begin_layout Plain Layout
1457
1458
1459 \backslash
1460 noindent
1461 \end_layout
1462
1463 \end_inset
1464
1465  Following the @-character by either a 2, 3, _,or a ^, we can produce arrows
1466  with double, triple shaft or arrows showing only the lower or upper half
1467  of their tips and ends.
1468  Arrows need not have tips nor ends, as the last example shows :
1469 \begin_inset Newline newline
1470 \end_inset
1471
1472
1473 \end_layout
1474
1475 \begin_layout Standard
1476 \begin_inset Tabular
1477 <lyxtabular version="3" rows="8" columns="2">
1478 <features islongtable="true">
1479 <column alignment="center" valignment="top" width="0">
1480 <column alignment="center" valignment="top" width="0">
1481 <row>
1482 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1483 \begin_inset Text
1484
1485 \begin_layout Plain Layout
1486 Result
1487 \end_layout
1488
1489 \end_inset
1490 </cell>
1491 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1492 \begin_inset Text
1493
1494 \begin_layout Plain Layout
1495 Source code for LyX
1496 \end_layout
1497
1498 \end_inset
1499 </cell>
1500 </row>
1501 <row>
1502 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1503 \begin_inset Text
1504
1505 \begin_layout Plain Layout
1506 \begin_inset Formula \xymatrix{\ \ar @2[r]  &  \ }
1507
1508
1509 \end_inset
1510
1511
1512 \end_layout
1513
1514 \end_inset
1515 </cell>
1516 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1517 \begin_inset Text
1518
1519 \begin_layout Plain Layout
1520
1521 \family typewriter
1522
1523 \backslash
1524 ar@2
1525 \end_layout
1526
1527 \end_inset
1528 </cell>
1529 </row>
1530 <row>
1531 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1532 \begin_inset Text
1533
1534 \begin_layout Plain Layout
1535 \begin_inset Formula \xymatrix{\ \ar @3[r]  &  \ }
1536
1537
1538 \end_inset
1539
1540
1541 \end_layout
1542
1543 \end_inset
1544 </cell>
1545 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1546 \begin_inset Text
1547
1548 \begin_layout Plain Layout
1549
1550 \family typewriter
1551
1552 \backslash
1553 ar@3
1554 \end_layout
1555
1556 \end_inset
1557 </cell>
1558 </row>
1559 <row>
1560 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1561 \begin_inset Text
1562
1563 \begin_layout Plain Layout
1564 \begin_inset Formula \xymatrix{\ \ar @_{->}[r]  &  \ }
1565
1566
1567 \end_inset
1568
1569
1570 \end_layout
1571
1572 \end_inset
1573 </cell>
1574 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1575 \begin_inset Text
1576
1577 \begin_layout Plain Layout
1578
1579 \family typewriter
1580
1581 \backslash
1582 ar@_{->}
1583 \end_layout
1584
1585 \end_inset
1586 </cell>
1587 </row>
1588 <row>
1589 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1590 \begin_inset Text
1591
1592 \begin_layout Plain Layout
1593 \begin_inset Formula \xymatrix{\ \ar @^{->}[r]  &  \ }
1594
1595
1596 \end_inset
1597
1598
1599 \end_layout
1600
1601 \end_inset
1602 </cell>
1603 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1604 \begin_inset Text
1605
1606 \begin_layout Plain Layout
1607
1608 \family typewriter
1609
1610 \backslash
1611 ar@^{->}
1612 \end_layout
1613
1614 \end_inset
1615 </cell>
1616 </row>
1617 <row>
1618 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1619 \begin_inset Text
1620
1621 \begin_layout Plain Layout
1622 \begin_inset Formula \xymatrix{\ \ar @^{>>->>}[r]  &  \ }
1623
1624
1625 \end_inset
1626
1627
1628 \end_layout
1629
1630 \end_inset
1631 </cell>
1632 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1633 \begin_inset Text
1634
1635 \begin_layout Plain Layout
1636
1637 \family typewriter
1638
1639 \backslash
1640 ar@^{>>->>}
1641 \end_layout
1642
1643 \end_inset
1644 </cell>
1645 </row>
1646 <row>
1647 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1648 \begin_inset Text
1649
1650 \begin_layout Plain Layout
1651 \begin_inset Formula \xymatrix{\ \ar @{^{<}-_{>}}[r]  &  \ }
1652
1653
1654 \end_inset
1655
1656
1657 \end_layout
1658
1659 \end_inset
1660 </cell>
1661 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1662 \begin_inset Text
1663
1664 \begin_layout Plain Layout
1665
1666 \family typewriter
1667
1668 \backslash
1669 ar@{^<-_>}
1670 \end_layout
1671
1672 \end_inset
1673 </cell>
1674 </row>
1675 <row>
1676 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1677 \begin_inset Text
1678
1679 \begin_layout Plain Layout
1680 \begin_inset Formula \xymatrix{\ \ar @2{--}[r]  &  \ }
1681
1682
1683 \end_inset
1684
1685
1686 \end_layout
1687
1688 \end_inset
1689 </cell>
1690 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1691 \begin_inset Text
1692
1693 \begin_layout Plain Layout
1694
1695 \family typewriter
1696
1697 \backslash
1698 ar@2{--}
1699 \end_layout
1700
1701 \end_inset
1702 </cell>
1703 </row>
1704 </lyxtabular>
1705
1706 \end_inset
1707
1708
1709 \end_layout
1710
1711 \begin_layout Subsubsection
1712 Designing your own arrows
1713 \end_layout
1714
1715 \begin_layout Standard
1716 Within certain limits there is even a way to design your own arrows.
1717  Using some the characters 
1718 \family typewriter
1719 ><|ox+/()[
1720 \family default
1721  one can even design one's own arrow tips using the 
1722 \family typewriter
1723
1724 \backslash
1725 newdir
1726 \family default
1727  command in the preample.
1728  For explanations, we refer to the 
1729 \family typewriter
1730
1731 \begin_inset ERT
1732 status collapsed
1733
1734 \begin_layout Plain Layout
1735
1736
1737 \backslash
1738 Xy
1739 \end_layout
1740
1741 \end_inset
1742
1743
1744 \family default
1745 -manual, from which we take the example: 
1746 \end_layout
1747
1748 \begin_layout Standard
1749
1750 \family typewriter
1751
1752 \backslash
1753 newdir{|>}{!/4.5pt/@{|}*:(1,-.2)@^{>}*:(1,+.2)@_{>}}
1754 \family default
1755 .
1756 \end_layout
1757
1758 \begin_layout Standard
1759 \begin_inset ERT
1760 status collapsed
1761
1762 \begin_layout Plain Layout
1763
1764
1765 \backslash
1766 noindent 
1767 \end_layout
1768
1769 \end_inset
1770
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 \begin_inset ERT
1834 status collapsed
1835
1836 \begin_layout Plain Layout
1837
1838
1839 \backslash
1840 noindent
1841 \end_layout
1842
1843 \end_inset
1844
1845  produces
1846 \begin_inset space ~
1847 \end_inset
1848
1849
1850 \begin_inset space ~
1851 \end_inset
1852
1853
1854 \begin_inset Formula \[
1855 \xymatrix{\circ\ar @<1ex>[r] & \circ\ar @<1ex>[l]}
1856 \]
1857  
1858
1859 \end_inset
1860
1861
1862 \end_layout
1863
1864 \begin_layout Subsubsection
1865 Inline or centered diagrams
1866 \end_layout
1867
1868 \begin_layout Standard
1869 Arrows and diagrams can be used inline, such as this one: 
1870 \begin_inset Formula $\xymatrix{\circ\ar @<1ex>[r] & \circ\ar @<1ex>[l]}
1871 $
1872 \end_inset
1873
1874 .
1875  When their code is written inside LyX as above, select it and choose either
1876  
1877 \family sans
1878 Ctrl-m
1879 \family default
1880  for inline appearence or 
1881 \family sans
1882 Ctrl-M
1883 \family default
1884  for displaystyle.
1885  Diagrams constructed inline can later be centered, or, conversely, centered
1886  diagrams can be changed to inline formulas with 
1887 \family sans
1888 Edit\SpecialChar \menuseparator
1889 Math
1890 \family default
1891  
1892 \family sans
1893 \SpecialChar \menuseparator
1894 Alignment.
1895 \end_layout
1896
1897 \begin_layout Subsection
1898 Bending arrows 
1899 \end_layout
1900
1901 \begin_layout Standard
1902 There are two simple methods to make arrows bend.
1903  The first is giving an explicit value by which the midpoint of the arrow's
1904  shaft is raised or depressed, the other is by forcing the arrow to leave
1905  its origin in a prescribed compass direction and to make him enter the
1906  target at another direction.
1907  The necessary bending of the arrow is determined automatically.
1908  We describe both methods.
1909 \end_layout
1910
1911 \begin_layout Subsubsection
1912 Raising the shaft
1913 \end_layout
1914
1915 \begin_layout Standard
1916 For bending arrows we use the modifier @/
1917 \begin_inset Formula $\ldots$
1918 \end_inset
1919
1920 / .
1921  The ellipsis stands for a TeX-measure which needs to be entered as a lower
1922  or upper index.
1923  Whereas in 
1924 \family typewriter
1925 xypic
1926 \family default
1927 , we could simply write, e.g.
1928  
1929 \family typewriter
1930
1931 \backslash
1932 ar@/_1pc/
1933 \family default
1934  for an arrow bending 
1935 \family typewriter
1936 1pc
1937 \family default
1938  downwards, this cannot directly be done in LyX.
1939  It is necessary, to enclose the measure in a pair of braces, such as e.g.
1940  
1941 \family typewriter
1942
1943 \backslash
1944 ar@/_{1pc}/
1945 \family default
1946 .
1947  As an example, here are two opposing arrows between 
1948 \begin_inset Formula $A$
1949 \end_inset
1950
1951  and 
1952 \begin_inset Formula $B$
1953 \end_inset
1954
1955 , each bending by .5 pica, given by the following source code: 
1956 \end_layout
1957
1958 \begin_layout Standard
1959
1960 \family typewriter
1961
1962 \backslash
1963 xymatrix{A 
1964 \backslash
1965 ar@/_{.5pc}/[r] & B 
1966 \backslash
1967 ar@/_{.5pc}/[l]}
1968 \end_layout
1969
1970 \begin_layout Standard
1971 \begin_inset Formula \[
1972 \xymatrix{A\ar @/{}_{.5pc}/[r] & B\ar @/{}_{.5pc}/[l]}
1973 \]
1974
1975 \end_inset
1976
1977
1978 \end_layout
1979
1980 \begin_layout Subsubsection
1981 Specifying exit- and entrance directions.
1982  
1983 \end_layout
1984
1985 \begin_layout Standard
1986 An alternative for making arrows bend is by specifying their compass direction
1987  as they are leaving their source and their direction from which they enter
1988  their target.
1989  Instead of north, north-east, east, etc., the directions are named 
1990 \family typewriter
1991 u
1992 \family default
1993
1994 \family typewriter
1995 ur
1996 \family default
1997
1998 \family typewriter
1999 r
2000 \family default
2001
2002 \family typewriter
2003 dr
2004 \family default
2005
2006 \family typewriter
2007 d
2008 \family default
2009
2010 \family typewriter
2011 dl
2012 \family default
2013
2014 \family typewriter
2015 l
2016 \family default
2017
2018 \family typewriter
2019 ul
2020 \family default
2021 , standing for up, up-right, right, down-right, etc..
2022  A direction is specified as @(
2023 \emph on
2024 out
2025 \emph default
2026 ,
2027 \emph on
2028 in
2029 \emph default
2030 ) where 
2031 \emph on
2032 out
2033 \emph default
2034  stands for the direction the first object is left and 
2035 \emph on
2036 in
2037 \emph default
2038  stands for the direction from which the target is entered.
2039  As an example, we show some bending arrows and a loop, which arises when
2040  we do not specify a target for an arrow, just its incoming and outgoing
2041  direction:
2042 \end_layout
2043
2044 \begin_layout Standard
2045 \begin_inset Formula \[
2046 \xymatrix{A\ar @(dr,dl)[r]\ar @(dr,dl)[rr] & B\ar @(d,r)[dl] & C\\
2047 E\ar @(ul,ur)}
2048 \]
2049
2050 \end_inset
2051
2052
2053 \end_layout
2054
2055 \begin_layout LyX-Code
2056
2057 \backslash
2058 xymatrix{A 
2059 \backslash
2060 ar@(dr,dl)[r]
2061 \backslash
2062 ar@(dr,dl)[rr] 
2063 \begin_inset Newline newline
2064 \end_inset
2065
2066                     &B
2067 \backslash
2068 ar@(d,r)[dl]  &C 
2069 \backslash
2070
2071 \backslash
2072  
2073 \begin_inset Newline newline
2074 \end_inset
2075
2076             E 
2077 \backslash
2078 ar@(ul,ur)}
2079 \end_layout
2080
2081 \begin_layout Subsection
2082 Modifying vertices
2083 \end_layout
2084
2085 \begin_layout Standard
2086 The above example is reminiscent of an automata diagram, except that in
2087  such a diagram states would be enclosed in small circles, with double circles
2088  denoting final states.
2089  
2090 \end_layout
2091
2092 \begin_layout Subsubsection
2093 Framing objects 
2094 \end_layout
2095
2096 \begin_layout Standard
2097 With 
2098 \begin_inset ERT
2099 status collapsed
2100
2101 \begin_layout Plain Layout
2102
2103
2104 \backslash
2105 Xy
2106 \end_layout
2107
2108 \end_inset
2109
2110 -Pic, entries can obtain a single or a double frame, such as 
2111 \begin_inset Formula $\xymatrix{*+[F]{A}}
2112 $
2113 \end_inset
2114
2115  or 
2116 \begin_inset Formula $\xymatrix{*+[F=]{B}}
2117 $
2118 \end_inset
2119
2120  by prefixing an entry with 
2121 \family typewriter
2122 *[F-]
2123 \family default
2124  or 
2125 \family typewriter
2126 *[F=]
2127 \family default
2128  and enclosing the portion of the entry to be framed in braces.
2129  Normally, the frame will be very tight so that it must be widened by prefixing
2130  with 
2131 \family typewriter
2132 +
2133 \family default
2134  or with 
2135 \family typewriter
2136 ++
2137 \family default
2138 .
2139  Round frames, such as 
2140 \begin_inset Formula $\xymatrix{*++[o][F]{A}}
2141 $
2142 \end_inset
2143
2144  and 
2145 \begin_inset Formula $\xymatrix{*++[o][F=]{B}}
2146 $
2147 \end_inset
2148
2149  are obtained by specifying the shape as 
2150 \family typewriter
2151 [o].
2152
2153 \family default
2154  So the latter figure was constructed as *++[o][F=]{B}.
2155  This way, the following automaton 
2156 \end_layout
2157
2158 \begin_layout Standard
2159 \begin_inset Formula \[
2160 \xymatrix{\txt {start}\ar [r] & *++[o][F]{1}\ar [r] & *++[o][F=]{2}\ar @(ur,dr)\ar @(ur,ul)[l]}
2161 \]
2162
2163 \end_inset
2164
2165
2166 \end_layout
2167
2168 \begin_layout Standard
2169 \begin_inset ERT
2170 status collapsed
2171
2172 \begin_layout Plain Layout
2173
2174
2175 \backslash
2176 noindent
2177 \end_layout
2178
2179 \end_inset
2180
2181  can be typeset as
2182 \end_layout
2183
2184 \begin_layout LyX-Code
2185
2186 \backslash
2187 xymatrix{
2188 \backslash
2189 txt{start}
2190 \backslash
2191 ar[r]
2192 \end_layout
2193
2194 \begin_layout LyX-Code
2195             & *++[o][F]{1}
2196 \backslash
2197 ar[r]
2198 \end_layout
2199
2200 \begin_layout LyX-Code
2201             & *++[o][F=]{2}
2202 \backslash
2203 ar@(ur,dr)
2204 \backslash
2205 ar@(ur,ul)[l]
2206 \end_layout
2207
2208 \begin_layout LyX-Code
2209            }.
2210 \end_layout
2211
2212 \begin_layout Standard
2213 The LaTeX command 
2214 \family typewriter
2215
2216 \backslash
2217 entrymodifiers={
2218 \family default
2219 \SpecialChar \ldots{}
2220
2221 \family typewriter
2222 }
2223 \family default
2224  will make a certain entry style the default, that can, of course be overridden
2225  for individual entries.
2226  Thus, after 
2227 \family typewriter
2228
2229 \backslash
2230 entrymodifiers={++[o][F-]}
2231 \family default
2232 , all following entries inside 
2233 \begin_inset ERT
2234 status collapsed
2235
2236 \begin_layout Plain Layout
2237
2238
2239 \backslash
2240 Xy
2241 \end_layout
2242
2243 \end_inset
2244
2245 -matrices would be encircled.
2246 \end_layout
2247
2248 \begin_layout Subsubsection
2249 Framing rectangles
2250 \end_layout
2251
2252 \begin_layout Standard
2253 Framing a whole rectangle inside an xymatrix is done with the macro pair
2254  
2255 \family typewriter
2256
2257 \backslash
2258 save ...
2259  
2260 \backslash
2261 restore
2262 \family default
2263 .
2264  
2265 \family roman
2266 \series medium
2267 \shape up
2268 \size normal
2269 \emph off
2270 \bar no
2271 \noun off
2272 \color none
2273 The dimension of the rectangle is given as a dotted pair 
2274 \begin_inset Formula $P_{0}.P_{1}$
2275 \end_inset
2276
2277  of points denoting the top left and lower right corners of the rectangle.
2278  Each point, in turn,is given as a doubly quoted comma separated pair 
2279 \begin_inset Quotes eld
2280 \end_inset
2281
2282
2283 \begin_inset Formula $x,y$
2284 \end_inset
2285
2286
2287 \begin_inset Quotes erd
2288 \end_inset
2289
2290  specifying row 
2291 \begin_inset Formula $x$
2292 \end_inset
2293
2294  and column 
2295 \begin_inset Formula $y$
2296 \end_inset
2297
2298 .
2299  These are followed by the framing commands, to produce figures such as
2300  the following: 
2301 \begin_inset Formula \[
2302 \xymatrix{A & B\ar @(d,r)[dl]\sp (0.2)\phi\sp (0.7)\psi\save "1,1"."2,1"*+[F=]\frm {}\restore \,\\
2303 C & \save "1,1"."1,2"*++[F]\frm {}\restore }
2304 \]
2305
2306 \end_inset
2307
2308  Here, the code 
2309 \family typewriter
2310 \series default
2311 \shape default
2312 \size default
2313 \emph default
2314 \bar default
2315 \noun default
2316 \color inherit
2317
2318 \backslash
2319 save"1,1"."2,1"*+[F=]
2320 \backslash
2321 frm{}
2322 \backslash
2323 restore
2324 \family roman
2325 \series medium
2326 \shape up
2327 \size normal
2328 \emph off
2329 \bar no
2330 \noun off
2331 \color none
2332  produces the doubly framed rectangle, and the code for the extra wide horizonta
2333 l rectangle is 
2334 \family typewriter
2335 \series default
2336 \shape default
2337 \size default
2338 \emph default
2339 \bar default
2340 \noun default
2341 \color inherit
2342
2343 \backslash
2344 save"1,1"."1,2"*++[F]
2345 \backslash
2346 frm{}
2347 \backslash
2348 restore
2349 \family roman
2350 \series medium
2351 \shape up
2352 \size normal
2353 \emph off
2354 \bar no
2355 \noun off
2356 \color none
2357 .
2358  This code can be placed in arbitrary cells of the xymatrix.
2359  
2360 \end_layout
2361
2362 \begin_layout Section
2363 Using LyX's math editor
2364 \end_layout
2365
2366 \begin_layout Standard
2367 As an alternative to writing the 
2368 \family typewriter
2369 xypic
2370 \family default
2371  code, then transforming it into a math-editing environment by marking it
2372  and applying 
2373 \family sans
2374 Ctrl-m
2375 \family default
2376 , or 
2377 \family sans
2378 Ctrl-M
2379 \family default
2380 , one may construct and modify the whole xypic-diagram inside LyX's math
2381  editor.
2382  We describe the editing steps for a figure just like the one above.
2383  
2384 \end_layout
2385
2386 \begin_layout Subsection
2387 Caveat - how to enter braces
2388 \end_layout
2389
2390 \begin_layout Standard
2391 Recall that in LyX's math-editor any pair of braces 
2392 \family typewriter
2393 {
2394 \family default
2395  and 
2396 \family typewriter
2397 }
2398 \family default
2399  that are to enclose a macro-parameter must be entered by typing just 
2400 \family typewriter
2401
2402 \backslash
2403 {
2404 \family default
2405  .
2406  The closing brace is automatically supplied and in between a box into which
2407  to the parameter is entered.
2408  In connection with 
2409 \begin_inset ERT
2410 status collapsed
2411
2412 \begin_layout Plain Layout
2413
2414
2415 \backslash
2416 Xy
2417 \end_layout
2418
2419 \end_inset
2420
2421 -diagrams, this applies in particular to arrow modifications that are normally
2422  given in the form 
2423 \family typewriter
2424 @{
2425 \family default
2426  \SpecialChar \ldots{}
2427  
2428 \family typewriter
2429 }
2430 \family default
2431  with the ellipsis standing for the description of end, shaft and tip of
2432  the arrow.
2433  Inside the math-editor, enter just 
2434 \family typewriter
2435 @
2436 \backslash
2437 {
2438 \family default
2439  and let LyX provide the closing brace and the box into which to enter the
2440  description of the arrow.
2441 \end_layout
2442
2443 \begin_layout Standard
2444 Braces that are entered without the backslash 
2445 \family typewriter
2446
2447 \backslash
2448
2449 \family default
2450  will just appear as typed, but cannot be used to receive a macro parameter.
2451  They are useful, for instance to denote sets, e.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 open
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.g.
3091  
3092 \family typewriter
3093 (0.6)
3094 \family default
3095  or 
3096 \family typewriter
3097 (1.4)
3098 \family default
3099  to its path.
3100  Attach a label to this invisible arrow.
3101  
3102 \end_layout
3103
3104 \begin_layout Standard
3105 Thus, the down pointing arrow with its label 
3106 \begin_inset Formula $\varphi$
3107 \end_inset
3108
3109  at (0.3) of its way along the shaft might as well have been produced by
3110  adding to the regular arrow 
3111 \family typewriter
3112
3113 \backslash
3114 ar[dr] 
3115 \family default
3116 an invisible 
3117 \begin_inset Formula $\varphi$
3118 \end_inset
3119
3120 -labelled arrow 
3121 \family typewriter
3122
3123 \backslash
3124 ar@{}[dr(0.6)]^
3125 \backslash
3126 varphi
3127 \family default
3128 , reaching only 0.6 of the way.
3129  Its label will now appear at 0.3 of the way of the original visible arrow.
3130  
3131 \end_layout
3132
3133 \begin_layout Standard
3134 This workaround has two minor drawbacks: First, it does not work with bending
3135  arrows.
3136  Secondly, prolonging an invisible arrow beyond the normal dimension of
3137  the figure will invisibly extend the figure box, and thereby cause too
3138  much vertical space between the figure and the preceding or the following
3139  paragraph.
3140  
3141 \end_layout
3142
3143 \begin_layout Standard
3144 Nevertheless, invisible arrows are an important tool, since they can, in
3145  principle, be used to place information at any chosen place in a diagram.
3146  In the above figure, for instance, we have used an invisible arrow to carry
3147  the 
3148 \family typewriter
3149
3150 \backslash
3151 vdots
3152 \family default
3153  as label and at the earlier figure we had used an invisible arrow to carry
3154  the text 
3155 \begin_inset Quotes eld
3156 \end_inset
3157
3158
3159 \family typewriter
3160 horizontal stretch
3161 \family default
3162
3163 \begin_inset Quotes erd
3164 \end_inset
3165
3166  into the center of the figure.
3167 \end_layout
3168
3169 \begin_layout Bibliography
3170 \begin_inset CommandInset bibitem
3171 LatexCommand bibitem
3172 label "1"
3173 key "xypic manual"
3174
3175 \end_inset
3176
3177 Kristoffer H.
3178  Rose: 
3179 \begin_inset ERT
3180 status collapsed
3181
3182 \begin_layout Plain Layout
3183
3184
3185 \backslash
3186 Xy
3187 \end_layout
3188
3189 \end_inset
3190
3191
3192 \emph on
3193 -Pic User's Guide
3194 \emph default
3195 .
3196  Version 3.7, Feb.
3197  16, 1999.
3198  Available as part of the 
3199 \family typewriter
3200 xypic
3201 \family default
3202  LaTeX package.
3203  
3204 \end_layout
3205
3206 \begin_layout Bibliography
3207 \begin_inset CommandInset bibitem
3208 LatexCommand bibitem
3209 label "2"
3210 key "instant-preview"
3211
3212 \end_inset
3213
3214
3215 \begin_inset Flex URL
3216 status collapsed
3217
3218 \begin_layout Plain Layout
3219
3220 http://www.tug.org/tex-archive/help/Catalogue/entries/preview-latex.html
3221 \end_layout
3222
3223 \end_inset
3224
3225
3226 \end_layout
3227
3228 \begin_layout Bibliography
3229 \begin_inset CommandInset bibitem
3230 LatexCommand bibitem
3231 label "3"
3232 key "xypic"
3233
3234 \end_inset
3235
3236
3237 \begin_inset Flex URL
3238 status collapsed
3239
3240 \begin_layout Plain Layout
3241
3242 http://www.tug.org/tex-archive/help/Catalogue/entries/xypic.html
3243 \end_layout
3244
3245 \end_inset
3246
3247
3248 \end_layout
3249
3250 \begin_layout Bibliography
3251 \begin_inset CommandInset bibitem
3252 LatexCommand bibitem
3253 label "4"
3254 key "AUCTeX"
3255
3256 \end_inset
3257
3258
3259 \begin_inset Flex URL
3260 status collapsed
3261
3262 \begin_layout Plain Layout
3263
3264 http://www.gnu.org/software/auctex/
3265 \end_layout
3266
3267 \end_inset
3268
3269
3270 \end_layout
3271
3272 \end_body
3273 \end_document