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