summaryrefslogtreecommitdiff
path: root/macros/lamstex/inputs/cd.tex
blob: f02065c250f15ce4299773da63da955f3cf857bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
\catcode`\@=11
\def\Cgaps#1{\RIfM@
 \standardcgap#1\standardcgap\relax\hunit#1\hunit\relax
 \else\nonmatherr@\Cgaps\fi}
\def\Rgaps#1{\RIfM@
 \standardrgap#1\standardrgap\relax\vunit#1\vunit\relax
 \else\nonmatherr@\Rgaps\fi}
\def\getcgap@#1{\ifcase#1\or\getdim@\z@\else\getdim@\standardcgap\fi}
\def\getrgap@#1{\ifcase#1\getdim@\z@\else\getdim@\standardrgap\fi}
{\catcode`\;=\active
 \gdef\cgaps#1{\RIfM@{\ifnum\catcode`\;=\active\def;{\string;}\fi
   \xdef\Next@{\noexpand\cgaps@{#1}}}%
  \Next@\edef\getcgap@##1{\i@##1\relax\the\toks@}\toks@{}\else
  \nonmatherr@\cgaps\fi}
 \gdef\rgaps#1{\RIfM@{\ifnum\catcode`\;=\active\def;{\string;}\fi
   \xdef\Next@{\noexpand\rgaps@{#1}}}%
  \Next@\edef\getrgap@##1{\i@##1\relax\the\toks@}\toks@{}\else
  \nonmatherr@\rgaps\fi}
}
\def\Gaps@@{\gaps@@}
\def\cgaps@#1{\toks@{\ifcase\i@\or\getdim@=\z@}%
 \gaps@@\standardcgap#1;\gaps@@\gaps@@
 \edef\next@{\the\toks@\noexpand\else\noexpand\getdim@\noexpand\standardcgap
  \noexpand\fi}%
 \toks@=\expandafter{\next@}}
\def\rgaps@#1{\toks@{\ifcase\i@\getdim@=\z@}%
 \gaps@@\standardrgap#1;\gaps@@\gaps@@
 \edef\next@{\the\toks@\noexpand\else\noexpand\getdim@\noexpand\standardrgap
  \noexpand\fi}%
 \toks@=\expandafter{\next@}}
\def\gaps@@#1#2;#3{\mgaps@#1#2\mgaps@
 \edef\next@{\the\toks@\noexpand\or\noexpand\getdim@
  \noexpand#1\the\mgapstoks@@}%
 \toks@\expandafter{\next@}%
 \DN@{#3}%
 \ifx\next@\Gaps@@\def\next@##1\gaps@@{}\else
  \def\next@{\gaps@@#1#3}\fi\next@}
\def\mgaps@#1{\let\mgapsnext@#1\FNSS@\mgaps@@}
\def\mgaps@@{\ifx\next\w\expandafter\mgaps@@@\else
 \expandafter\mgaps@@@@\fi}
\def\mgaps@@@@#1\mgaps@{\getdim@\mgapsnext@\getdim@#1\getdim@
 \edef\next@{\noexpand\getdim@\the\getdim@}%
 \mgapstoks@@\expandafter{\next@}}
\def\mgaps@@@\w#1#2\mgaps@{\mgaps@@@@#2\mgaps@
 \setbox\ZER@\hbox{$\m@th\hskip15\p@\tsize@#1$}%
 \dimen@\wd\ZER@
 \ifdim\dimen@>\getdim@\getdim@\dimen@\fi
 \edef\next@{\noexpand\getdim@\the\getdim@}%
 \mgapstoks@@\expandafter{\next@}}
\def\changewidth#1#2{\setbox\ZER@{$\m@th#2}%
 \hbox to\wd\ZER@{\hss$\m@th#1$\hss}}
\def\ARROW@{\ifx\next)\let\next@\OPTIONS@\else
 \DN@{\csname\string @(\endcsname}\fi\next@}
\def\OPTIONS@){\ifoptions@\let\next@\relax\else
 \DN@{\global\options@true\begingroup\optioncodes@}\fi\next@}
\expandafter\def\csname\string @(\endcsname #1,#2){%
 \ifoptions@\expandafter\endgroup\fi
 \N@false\E@false\H@false\V@false\Hshort@false
 \ifnum#1>\z@\E@true\fi
 \ifnum#1=\z@\V@true\global\tX@false\global\tY@false\global\a@false\fi
 \ifnum#2>\z@\N@true\fi
 \ifnum#2=\z@\H@true\global\tX@false\global\tY@false\global\a@false
  \ifshort@\Hshort@true\fi\fi
 \NESW@false
 \ifN@\ifE@\NESW@true\fi\else\ifE@\else\NESW@true\fi\fi
 \arrow@{#1}{#2}%
 \global\options@false
 \global\scount@\z@\global\tcount@\z@\global\arrcount@\z@
 \global\s@false\global\sxdimen@\z@\global\sydimen@\z@
 \global\tX@false\global\tXdimen@i\z@\global\tXdimen@ii\z@
 \global\tY@false\global\tYdimen@i\z@\global\tYdimen@ii\z@
 \global\a@false\global\exacount@\z@
 \global\x@false\global\xdimen@\z@
 \global\X@false\global\Xdimen@\z@
 \global\y@false\global\ydimen@\z@
 \global\Y@false\global\Ydimen@\z@
 \global\p@false\global\pdimen@\z@
 \global\label@ifalse\global\label@iifalse
 \global\dl@ifalse\global\ldimen@i\z@
 \global\dl@iifalse\global\ldimen@ii\z@
 \global\short@false\global\unshort@false}
\def\zero@#1{\ifnum\scount@=\z@
 \if#1e\global\scount@\m@ne\else
 \if#1t\global\scount@\tw@\else
 \if#1h\global\scount@\thr@@\else
 \if#1'\global\scount@6 \else
 \if#1`\global\scount@7 \else
 \if#1(\global\scount@8 \else
 \if#1)\global\scount@9 \else
 \if#1s\global\scount@12 \else
 \if#1H\global\scount@13 \else
 \Err@{\Invalid@@ option \string\0}\fi\fi\fi\fi\fi\fi\fi\fi\fi
 \fi}
\def\one@#1{\ifnum\tcount@=\z@
 \if#1e\global\tcount@\m@ne\else
 \if#1h\global\tcount@\tw@\else
 \if#1t\global\tcount@\thr@@\else
 \if#1'\global\tcount@4 \else
 \if#1`\global\tcount@5 \else
 \if#1(\global\tcount@\ten@ \else
 \if#1)\global\tcount@11 \else
 \if#1s\global\tcount@12 \else
 \if#1H\global\tcount@13 \else
 \Err@{\Invalid@@ option \string\1}\fi\fi\fi\fi\fi\fi\fi\fi\fi
 \fi}
\def\a@#1{\ifnum\arrcount@=\z@
 \if#10\global\arrcount@\m@ne\else
 \if#1+\global\arrcount@\@ne\else
 \if#1-\global\arrcount@\tw@\else
 \if#1=\global\arrcount@\thr@@\else
 \Err@{\Invalid@@ option \string\a}\fi\fi\fi\fi
 \fi}
\def\ds@{\ifnum\catcode`\;=\active\expandafter\dsA@\else
 \expandafter\dsO@\fi}
\def\dsO@(#1;#2){\ds@@{#1}{#2}}
\def\ds@@#1#2{\ifs@\else
 \global\s@true
 \global\sxdimen@\hunit\global\sxdimen@#1\sxdimen@\relax
 \global\sydimen@\vunit\global\sydimen@#2\sydimen@\relax
 \fi}
\def\dtX@{\ifnum\catcode`\;=\active\expandafter\dtXA@\else
 \expandafter\dtXO@\fi}
\def\dtXO@(#1;#2){\dtX@@{#1}{#2}}
\def\dtX@@#1#2{\iftX@\else
 \global\tX@true
 \global\tXdimen@i\hunit\global\tXdimen@i#1\tXdimen@i\relax
 \global\tXdimen@ii\vunit\global\tXdimen@ii#2\tXdimen@ii\relax
 \fi}
\def\dtY@{\ifnum\catcode`\;=\active\expandafter\dtYA@\else
 \expandafter\dtYO@\fi}
\def\dtYO@(#1;#2){\dtY@@{#1}{#2}}
\def\dtY@@#1#2{\iftY@\else
 \global\tY@true
 \global\tYdimen@i\hunit\global\tYdimen@i#1\tYdimen@i\relax
 \global\tYdimen@ii\vunit\global\tYdimen@ii#2\tYdimen@ii\relax
 \fi}
{\catcode`\;=\active
 \gdef\dsA@(#1;#2){\ds@@{#1}{#2}}
 \gdef\dtXA@(#1;#2){\dtX@@{#1}{#2}}
 \gdef\dtYA@(#1;#2){\dtY@@{#1}{#2}}
}
\def\da@#1{\ifa@\else\global\a@true\global\exacount@#1\relax\fi}
\def\dx@#1{\ifx@\else
 \global\x@true
 \global\xdimen@\hunit\global\xdimen@#1\xdimen@\relax
 \fi}
\def\dX@#1{\ifX@\else
 \global\X@true
 \global\Xdimen@\hunit\global\Xdimen@#1\Xdimen@\relax
 \fi}
\def\dy@#1{\ify@\else
 \global\y@true
 \global\ydimen@\vunit\global\ydimen@#1\ydimen@\relax
 \fi}
\def\dY@#1{\ifY@\else
 \global\Y@true
 \global\Ydimen@\vunit\global\Ydimen@#1\Ydimen@\relax
 \fi}
\def\p@@#1{\ifp@\else
 \global\p@true
 \global\pdimen@\hunit\global\divide\pdimen@\tw@
 \global\pdimen@#1\pdimen@\relax
 \fi}
\def\L@#1{\iflabel@i\else
 \global\label@itrue\gdef\label@i{#1}%
 \fi}
\def\l@#1{\iflabel@ii\else
 \global\label@iitrue\gdef\label@ii{#1}%
 \fi}
\def\dL@#1{\ifdl@i\else
 \global\dl@itrue\global\ldimen@i\hunit\global\ldimen@i#1\ldimen@i\relax
 \fi}
\def\dl@#1{\ifdl@ii\else
 \global\dl@iitrue\global\ldimen@ii\hunit\global\ldimen@ii#1\ldimen@ii\relax
 \fi}
\def\s@{\ifunshort@\else\global\short@true\fi}
\def\uns@{\ifshort@\else\global\unshort@true\global\short@false\fi}
\def\optioncodes@{\let\0\zero@\let\1\one@\let\a\a@\let\ds\ds@\let\dtX\dtX@
 \let\dtY\dtY@\let\da\da@\let\dx\dx@\let\dX\dX@\let\dY\dY@\let\dy\dy@
 \let\p\p@@\let\L\L@\let\l\l@\let\dL\dL@\let\dl\dl@\let\s\s@\let\uns\uns@}
\def\slopes@{\\161\\152\\143\\134\\255\\126\\357\\238\\349\\45{10}\\56{11}%
 \\11{12}\\65{13}\\54{14}\\43{15}\\32{16}\\53{17}\\21{18}\\52{19}\\31{20}%
 \\41{21}\\51{22}\\61{23}}
\def\slope@{{\slope@i\secondy@\advance\slope@i-\firsty@
 \ifN@\else\multiply\slope@i\m@ne\fi
 \slope@ii\secondx@\advance\slope@ii-\firstx@
 \ifE@\else\multiply\slope@ii\m@ne\fi
 \ifdim\slope@ii<\z@
  \global\tan@i6 \global\tan@ii\@ne\global\angcount@23
 \else
  \dimen@\slope@i\multiply\dimen@6
  \ifdim\dimen@<\slope@ii
   \global\tan@i\@ne\global\tan@ii6 \global\angcount@\@ne
  \else
   \dimen@\slope@ii\multiply\dimen@6
   \ifdim\dimen@<\slope@i
    \global\tan@i6 \global\tan@ii\@ne\global\angcount@23
   \else
    \global\tan@ip\z@\global\tan@iip\@ne
    \def\\##1##2##3{\global\angcount@##3\relax
     \slope@ip\slope@i\slope@iip\slope@ii
     \multiply\slope@iip##1\relax\multiply\slope@ip##2\relax
     \ifdim\slope@iip<\slope@ip
      \global\tan@ip##1\relax\global\tan@iip##2\relax
     \else
      \global\tan@i##1\relax\global\tan@ii##2\relax
      \def\\####1####2####3{}%
     \fi}%
    \slopes@
    \slope@i\secondy@\advance\slope@i-\firsty@
    \ifN@\else\multiply\slope@i\m@ne\fi
    \multiply\slope@i\tan@ii\multiply\slope@i\tan@iip\multiply\slope@i\tw@
    \count@\tan@i\multiply\count@\tan@iip
    \extracount@\tan@ip\multiply\extracount@\tan@ii
    \advance\count@\extracount@
    \slope@ii\secondx@\advance\slope@ii-\firstx@
    \ifE@\else\multiply\slope@ii\m@ne\fi
    \multiply\slope@ii\count@
    \ifdim\slope@i<\slope@ii
     \global\tan@i\tan@ip\global\tan@ii\tan@iip
     \global\advance\angcount@\m@ne
    \fi
   \fi
  \fi
 \fi}%
}
\def\slope@a#1{{\def\\##1##2##3{\ifnum##3=#1\global\tan@i##1\relax
 \global\tan@ii##2\relax\fi}\slopes@}}
\def\dotoks@i{%
 \global\widthtoks@\expandafter{\the\widthtoks@\else\getdim@\z@\fi}%
 \global\heighttoks@\expandafter{\the\heighttoks@\else\getdim@\z@\fi}%
 \global\depthtoks@\expandafter{\the\depthtoks@\else\getdim@\z@\fi}}
\def\dotoks@ii{%
 \global\widthtoks@{\ifcase\j@}%
 \global\heighttoks@{\ifcase\j@}%
 \global\depthtoks@{\ifcase\j@}}
\def\preCD@#1\endCD{\setbox\ZER@
 \vbox{%
  \def\arrow@##1##2{{}}%
  \global\rowcount@\m@ne\global\colcount@\z@\global\Colcount@\z@
  \global\firstCDcr@true\toks@{}%
  \global\widthtoks@{\ifcase\j@}%
  \global\Widthtoks@{\ifcase\i@}%
  \global\heighttoks@{\ifcase\j@}%
  \global\Heighttoks@{\ifcase\i@}%
  \global\depthtoks@{\ifcase\j@}%
  \global\Depthtoks@{\ifcase\i@}%
  \global\Rowheighttoks@{\ifcase\i@}%
  \global\Rowdepthtoks@{\ifcase\i@}%
  \Let@
  \everycr{%
   \noalign{%
    \global\advance\rowcount@\@ne
    \ifnum\colcount@<\Colcount@
    \else
     \global\Colcount@\colcount@\global\maxcolrow@\rowcount@
    \fi
    \global\colcount@\z@
    \iffirstCDcr@
     \global\firstCDcr@false
    \else
     \edef\next@{\the\Rowheighttoks@\noexpand\or\noexpand\getdim@\the\rowht@}%
      \global\Rowheighttoks@\expandafter{\next@}%
     \edef\next@{\the\Rowdepthtoks@\noexpand\or\noexpand\getdim@\the\rowdp@}%
      \global\Rowdepthtoks@\expandafter{\next@}%
     \global\rowht@\z@\global\rowdp@\z@
     \dotoks@i
     \edef\next@{\the\Widthtoks@\noexpand\or\the\widthtoks@}%
      \global\Widthtoks@\expandafter{\next@}%
     \edef\next@{\the\Heighttoks@\noexpand\or\the\heighttoks@}%
      \global\Heighttoks@\expandafter{\next@}%
     \edef\next@{\the\Depthtoks@\noexpand\or\the\depthtoks@}%
      \global\Depthtoks@\expandafter{\next@}%
     \dotoks@ii
    \fi}}%
  \tabskip\z@
  \halign{&\setbox\ZER@\hbox{\vrule\height\ten@\p@\width\z@\depth\z@     %1
   $\m@th\displaystyle{##}$}\copy\ZER@
   \ifdim\ht\ZER@>\rowht@\global\rowht@\ht\ZER@\fi
   \ifdim\dp\ZER@>\rowdp@\global\rowdp@\dp\ZER@\fi
   \global\advance\colcount@\@ne
   \edef\next@{\the\widthtoks@\noexpand\or\noexpand\getdim@\the\wd\ZER@}%
    \global\widthtoks@\expandafter{\next@}%
   \edef\next@{\the\heighttoks@\noexpand\or\noexpand\getdim@\the\ht\ZER@}%
    \global\heighttoks@\expandafter{\next@}%
   \edef\next@{\the\depthtoks@\noexpand\or\noexpand\getdim@\the\dp\ZER@}%
    \global\depthtoks@\expandafter{\next@}%
   \cr#1\crcr}}%
 \Rowcount@\rowcount@
 \global\Widthtoks@\expandafter{\the\Widthtoks@\fi\relax}%
 \edef\Width@##1##2{\i@##1\relax\j@##2\relax\the\Widthtoks@}%
 \global\Heighttoks@\expandafter{\the\Heighttoks@\fi\relax}%
 \edef\Height@##1##2{\i@##1\relax\j@##2\relax\the\Heighttoks@}%
 \global\Depthtoks@\expandafter{\the\Depthtoks@\fi\relax}%
 \edef\Depth@##1##2{\i@##1\relax\j@##2\relax\the\Depthtoks@}%
 \edef\next@{\the\Rowheighttoks@\noexpand\fi\relax}%
 \global\Rowheighttoks@\expandafter{\next@}%
 \edef\Rowheight@##1{\i@##1\relax\the\Rowheighttoks@}%
 \edef\next@{\the\Rowdepthtoks@\noexpand\fi\relax}%
 \global\Rowdepthtoks@\expandafter{\next@}%
 \edef\Rowdepth@##1{\i@##1\relax\the\Rowdepthtoks@}%
 \global\colwidthtoks@{\fi}%
 \setbox\ZER@\vbox{%
  \unvbox\ZER@
  \count@\rowcount@
  \loop
   \unskip\unpenalty
   \setbox\ZER@\lastbox
   \ifnum\count@>\maxcolrow@\advance\count@\m@ne
   \repeat
  \hbox{%
   \unhbox\ZER@
   \count@\z@
   \loop
    \unskip
    \setbox\ZER@\lastbox
    \edef\next@{\noexpand\or\noexpand\getdim@\the\wd\ZER@\the\colwidthtoks@}%
     \global\colwidthtoks@\expandafter{\next@}%
    \advance\count@\@ne
    \ifnum\count@<\Colcount@
    \repeat}}%
 \edef\next@{\noexpand\ifcase\noexpand\i@\the\colwidthtoks@}%
  \global\colwidthtoks@\expandafter{\next@}%
 \edef\Colwidth@##1{\i@##1\relax\the\colwidthtoks@}%
 \global\colwidthtoks@{}\global\Rowheighttoks@{}\global\Rowdepthtoks@{}%
 \global\widthtoks@{}\global\Widthtoks@{}\global\heighttoks@{}%
 \global\Heighttoks@{}\global\depthtoks@{}\global\Depthtoks@{}%
}
\def\outside@{\Err@{This arrow points outside the \string\CD}}
\def\arrow@#1#2{\global\xoff@#1\relax\global\yoff@#2\relax
 \count@\rowcount@\advance\count@-\yoff@
 \ifnum\count@<\@ne\outside@\else\ifnum\count@>\Rowcount@\outside@\fi\fi
 \count@\colcount@\advance\count@\xoff@
 \ifnum\count@<\@ne\outside@\else\ifnum\count@>\Colcount@\outside@\fi\fi
 \tcolcount@\colcount@\advance\tcolcount@\xoff@
 \Width@\rowcount@\colcount@\divide\getdim@\tw@\tocenter@-\getdim@
 \ifdim\getdim@=\z@
  \firstx@\z@\firsty@\mathaxis@\svertex@true
 \else
  \svertex@false
  \ifHshort@
   \Colwidth@\colcount@\divide\getdim@\tw@
   \ifE@ \firstx@\getdim@ \else \firstx@-\getdim@ \fi
  \else
   \ifE@ \firstx@\getdim@ \else \firstx@-\getdim@ \fi
  \fi
  \ifE@
   \ifH@ \advance\firstx@\thr@@\p@ \else \advance\firstx@-\thr@@\p@ \fi  %2
  \else
   \ifH@ \advance\firstx@-\thr@@\p@ \else \advance\firstx@\thr@@\p@ \fi  %3
  \fi
  \ifN@
   \Height@\rowcount@\colcount@ \firsty@\getdim@                         %4
   \ifV@ \advance\firsty@\thr@@\p@ \fi                                   %5
  \else
   \ifV@
    \Depth@\rowcount@\colcount@ \firsty@-\getdim@                        %6
    \advance\firsty@-\thr@@\p@                                           %7
   \else
    \firsty@\z@                                                          %8
   \fi
  \fi
 \fi
 \ifV@
 \else
  \Colwidth@\colcount@\divide\getdim@\tw@
  \ifE@\secondx@\getdim@\else\secondx@-\getdim@\fi
  \ifE@\else\getcgap@\colcount@\advance\secondx@-\getdim@\fi
  \endcount@\colcount@\advance\endcount@\xoff@
  \count@\colcount@
  \ifE@
   \advance\count@\@ne
   \loop
    \ifnum\count@<\endcount@
    \Colwidth@\count@\advance\secondx@\getdim@
    \getcgap@\count@\advance\secondx@\getdim@
    \advance\count@\@ne
    \repeat
  \else
   \advance\count@\m@ne
   \loop
    \ifnum\count@>\endcount@
    \Colwidth@\count@\advance\secondx@-\getdim@
    \getcgap@\count@\advance\secondx@-\getdim@
    \advance\count@\m@ne
    \repeat
  \fi
  \Colwidth@\count@\divide\getdim@\tw@
  \ifHshort@
  \else
   \ifE@\advance\secondx@\getdim@\else\advance\secondx@-\getdim@\fi
  \fi
  \ifE@\getcgap@\count@\advance\secondx@\getdim@\fi
  \rcount@\rowcount@\advance\rcount@-\yoff@
  \Width@\rcount@\count@\divide\getdim@\tw@
  \tvertex@false
  \ifH@\ifdim\getdim@=\z@\tvertex@true\Hshort@false\fi\fi
  \ifHshort@
  \else
   \ifE@\advance\secondx@-\getdim@\else\advance\secondx@\getdim@\fi
  \fi
  \iftvertex@
   \advance\secondx@.4\p@
  \else
   \ifE@\advance\secondx@-\thr@@\p@\else\advance\secondx@\thr@@\p@\fi    %9
  \fi
 \fi
 \ifH@
 \else
  \ifN@
   \Rowheight@\rowcount@\secondy@\getdim@
  \else
   \Rowdepth@\rowcount@\secondy@-\getdim@
   \getrgap@\rowcount@\advance\secondy@-\getdim@
  \fi
  \endcount@\rowcount@\advance\endcount@-\yoff@
  \count@\rowcount@
  \ifN@
   \advance\count@\m@ne
   \loop
    \ifnum\count@>\endcount@
    \Rowheight@\count@\advance\secondy@\getdim@
    \Rowdepth@\count@\advance\secondy@\getdim@
    \getrgap@\count@\advance\secondy@\getdim@
    \advance\count@\m@ne
    \repeat
  \else
   \advance\count@\@ne
   \loop
    \ifnum\count@<\endcount@
    \Rowheight@\count@\advance\secondy@-\getdim@
    \Rowdepth@\count@\advance\secondy@-\getdim@
    \getrgap@\count@\advance\secondy@-\getdim@
    \advance\count@\@ne
    \repeat
  \fi
  \tvertex@false
  \ifV@\Width@\count@\colcount@\ifdim\getdim@=\z@\tvertex@true\fi\fi
  \ifN@
   \getrgap@\count@\advance\secondy@\getdim@
   \Rowdepth@\count@\advance\secondy@\getdim@
   \iftvertex@
    \advance\secondy@\mathaxis@
   \else
    \Depth@\count@\tcolcount@\advance\secondy@-\getdim@
    \advance\secondy@-\thr@@\p@                                          %10
   \fi
  \else
   \Rowheight@\count@\advance\secondy@-\getdim@
   \iftvertex@
    \advance\secondy@\mathaxis@
   \else
    \Height@\count@\tcolcount@\advance\secondy@\getdim@
    \advance\secondy@\thr@@\p@                                           %11
   \fi
  \fi
 \fi
 \ifV@\else\advance\firstx@\sxdimen@\fi
 \ifH@\else\advance\firsty@\sydimen@\fi
 \iftX@
  \advance\secondy@\tXdimen@ii
  \advance\secondx@\tXdimen@i
  \slope@
 \else
  \iftY@
   \advance\secondy@\tYdimen@ii
   \advance\secondx@\tYdimen@i
   \slope@
   \secondy@\secondx@\advance\secondy@-\firstx@
   \ifNESW@\else\multiply\secondy@\m@ne\fi
   \multiply\secondy@\tan@i\divide\secondy@\tan@ii\advance\secondy@\firsty@
  \else
   \ifa@
    \slope@
    \ifNESW@\global\advance\angcount@\exacount@\else
     \global\advance\angcount@-\exacount@\fi
    \ifnum\angcount@>23 \global\angcount@23 \fi
    \ifnum\angcount@<\@ne\global\angcount@\@ne\fi
    \slope@a\angcount@
    \ifY@
     \advance\secondy@\Ydimen@
    \else
     \ifX@
      \advance\secondx@\Xdimen@
      \dimen@\secondx@\advance\dimen@-\firstx@
      \ifNESW@\else\multiply\dimen@\m@ne\fi
      \multiply\dimen@\tan@i\divide\dimen@\tan@ii
      \advance\dimen@\firsty@\secondy@\dimen@
     \fi
    \fi
   \else
    \ifH@\else\ifV@\else\slope@\fi\fi
   \fi
  \fi
 \fi
 \ifH@\else\ifV@\else\ifsvertex@\else
  \dimen@6\p@\multiply\dimen@\tan@ii
  \count@\tan@i\advance\count@\tan@ii\divide\dimen@\count@
  \ifE@\advance\firstx@\dimen@\else\advance\firstx@-\dimen@\fi
  \multiply\dimen@\tan@i\divide\dimen@\tan@ii
  \ifN@\advance\firsty@\dimen@\else\advance\firsty@-\dimen@\fi
 \fi\fi\fi
 \ifp@
  \ifH@\else\ifV@\else
   \getcos@\pdimen@\advance\firsty@\dimen@\advance\secondy@\dimen@
   \ifNESW@\advance\firstx@-\dimen@ii\else\advance\firstx@\dimen@ii\fi
  \fi\fi
 \fi
 \ifH@\else\ifV@\else
  \ifnum\tan@i>\tan@ii
   \charht@\ten@\p@\charwd@\ten@\p@
   \multiply\charwd@\tan@ii\divide\charwd@\tan@i
  \else
   \charwd@\ten@\p@\charht@\ten@\p@
   \divide\charht@\tan@ii\multiply\charht@\tan@i
  \fi
  \ifnum\tcount@=\thr@@
   \ifN@\advance\secondy@-.3\charht@\else\advance\secondy@.3\charht@\fi
  \fi
  \ifnum\scount@=\tw@
   \ifE@\advance\firstx@.3\charht@\else\advance\firstx@-.3\charht@\fi
  \fi
  \ifnum\tcount@=12
   \ifN@\advance\secondy@-\charht@\else\advance\secondy@\charht@\fi
  \fi
  \iftY@
  \else
   \ifa@
    \ifX@
    \else
     \secondx@\secondy@\advance\secondx@-\firsty@
     \ifNESW@\else\multiply\secondx@\m@ne\fi
     \multiply\secondx@\tan@ii\divide\secondx@\tan@i
     \advance\secondx@\firstx@
    \fi
   \fi
  \fi
 \fi\fi
 \ifH@\harrow@\else\ifV@\varrow@\else\arrow@@\fi\fi}
\def\harrow@b{\ifE@\hskip\tocenter@\hskip\firstx@\fi}
\def\harrow@bb{\ifE@\hskip\xdimen@\else\hskip\Xdimen@\fi}
\def\harrow@e{\ifE@\else\hskip-\firstx@\hskip-\tocenter@\fi}
\def\harrow@ee{\ifE@\hskip-\Xdimen@\else\hskip-\xdimen@\fi}
\def\harrow@{\dimen@\secondx@\advance\dimen@-\firstx@
 \ifE@\let\next@\rlap\else\multiply\dimen@\m@ne\let\next@\llap\fi
 \next@{%
  \harrow@b
  \smash{\raise\pdimen@\hbox to\dimen@
   {\harrow@bb\arrow@ii
    \ifnum\arrcount@=\m@ne\else\ifnum\arrcount@=\thr@@\else
     \ifE@
      \ifnum\scount@=\m@ne
      \else
       \ifcase\scount@\or\or\char118 \or\char117 \or\or\or\char119 \or
       \char120 \or\char121 \or\char122 \or\or\or\arrow@i\char125 \or
       \char117 \hskip\thr@@\p@\char117 \hskip-\thr@@\p@\fi
      \fi
     \else
      \ifnum\tcount@=\m@ne
      \else
       \ifcase\tcount@\char117 \or\or\char117 \or\char118 \or\char119 \or
       \char120 \or\or\or\or\or\char121 \or\char122 \or\arrow@i\char125
       \or\char117 \hskip\thr@@\p@\char117 \hskip-\thr@@\p@\fi
      \fi
     \fi
    \fi\fi
    \dimen@\mathaxis@\advance\dimen@.2\p@
    \dimen@ii\mathaxis@\advance\dimen@ii-.2\p@
    \ifnum\arrcount@=\m@ne
     \let\leads@\null
    \else
     \ifcase\arrcount@
      \def\leads@{\hrule\height\dimen@\depth-\dimen@ii}\or
      \def\leads@{\hrule\height\dimen@\depth-\dimen@ii}\or
      \def\leads@{\hbox to\ten@\p@{%
       \leaders\hrule\height\dimen@\depth-\dimen@ii\hfil
       \hfil
      \leaders\hrule\height\dimen@\depth-\dimen@ii\hskip\z@ plus2fil\relax
       \hfil
       \leaders\hrule\height\dimen@\depth-\dimen@ii\hfil}}\or
     \def\leads@{\hbox{\hbox to\ten@\p@{\dimen@\mathaxis@\advance\dimen@1.2\p@
       \dimen@ii\dimen@\advance\dimen@ii-.4\p@
       \leaders\hrule\height\dimen@\depth-\dimen@ii\hfil}%
       \kern-\ten@\p@
       \hbox to\ten@\p@{\dimen@\mathaxis@\advance\dimen@-1.2\p@
       \dimen@ii\dimen@\advance\dimen@ii-.4\p@
       \leaders\hrule\height\dimen@\depth-\dimen@ii\hfil}}}\fi
    \fi
    \cleaders\leads@\hfil
    \ifnum\arrcount@=\m@ne\else\ifnum\arrcount@=\thr@@\else
     \arrow@i
     \ifE@
      \ifnum\tcount@=\m@ne
      \else
       \ifcase\tcount@\char119 \or\or\char119 \or\char120 \or\char121 \or
       \char122 \or \or\or\or\or\char123 \or\char124 \or
       \char125 \or\char119 \hskip-\thr@@\p@\char119 \hskip\thr@@\p@\fi
      \fi
     \else
      \ifcase\scount@\or\or\char120 \or\char119 \or\or\or\char121 \or\char122
      \or\char123 \or\char124 \or\or\or\char125 \or
      \char119 \hskip-\thr@@\p@\char119 \hskip\thr@@\p@\fi
     \fi
    \fi\fi
    \harrow@ee}}%
  \harrow@e}%
 \iflabel@i
  \dimen@ii\z@\setbox\ZER@\hbox{$\m@th\tsize@@\label@i$}%
  \ifnum\arrcount@=\m@ne
  \else
   \advance\dimen@ii\mathaxis@
   \advance\dimen@ii\dp\ZER@\advance\dimen@ii\tw@\p@
   \ifnum\arrcount@=\thr@@\advance\dimen@ii\tw@\p@\fi
  \fi
  \advance\dimen@ii\pdimen@
  \next@{\harrow@b\smash{\raise\dimen@ii\hbox to\dimen@
   {\harrow@bb\hskip\tw@\ldimen@i\hfil\box\ZER@\hfil\harrow@ee}}\harrow@e}%
 \fi
 \iflabel@ii
  \ifnum\arrcount@=\m@ne
  \else
   \setbox\ZER@\hbox{$\m@th\tsize@\label@ii$}%
   \dimen@ii-\ht\ZER@\advance\dimen@ii-\tw@\p@
   \ifnum\arrcount@=\thr@@\advance\dimen@ii-\tw@\p@\fi
   \advance\dimen@ii\mathaxis@\advance\dimen@ii\pdimen@
   \next@{\harrow@b\smash{\raise\dimen@ii\hbox to\dimen@
    {\harrow@bb\hskip\tw@\ldimen@ii\hfil\box\ZER@\hfil\harrow@ee}}\harrow@e}%
  \fi
 \fi}
\let\tsize@\tsize
\def\tsizeCDlabels{\let\tsize@\tsize}
\def\ssizeCDlabels{\let\tsize@\ssize}
\def\tsize@@{\ifnum\arrcount@=\m@ne\else\tsize@\fi}
\def\varrow@{\dimen@\secondy@\advance\dimen@-\firsty@
 \ifN@\else\multiply\dimen@\m@ne\fi
 \setbox\ZER@\vbox to\dimen@
  {\ifN@\vskip-\Ydimen@\else\vskip\ydimen@\fi
   \ifnum\arrcount@=\m@ne\else\ifnum\arrcount@=\thr@@\else
    \hbox{\arrow@iii
     \ifN@
      \ifnum\tcount@=\m@ne
      \else
       \ifcase\tcount@\char117 \or\or\char117 \or\char118 \or\char119 \or
       \char120 \or\or\or\or\or\char121 \or\char122 \or\char123 \or
       \vbox{\hbox{\char117}\nointerlineskip\vskip\thr@@\p@
       \hbox{\char117}\vskip-\thr@@\p@}\fi
      \fi
     \else
      \ifcase\scount@\or\or\char118 \or\char117 \or\or\or\char119 \or
      \char120 \or\char121 \or\char122 \or\or\or\char123 \or
      \vbox{\hbox{\char117}\nointerlineskip\vskip\thr@@\p@
      \hbox{\char117}\vskip-\thr@@\p@}\fi
     \fi}%
    \nointerlineskip
   \fi\fi
   \ifnum\arrcount@=\m@ne
    \let\leads@\null
   \else
    \ifcase\arrcount@\let\leads@\vrule\or\let\leads@\vrule\or
    \def\leads@{\vbox to\ten@\p@{%
     \hrule\height1.67\p@\depth\z@\width.4\p@
     \vfil
     \hrule\height3.33\p@\depth\z@\width.4\p@
     \vfil
     \hrule\height1.67\p@\depth\z@\width.4\p@}}\or
    \def\leads@{\hbox{\vrule\height\p@\hskip\tw@\p@\vrule}}\fi
   \fi
  \cleaders\leads@\vfill\nointerlineskip
   \ifnum\arrcount@=\m@ne\else\ifnum\arrcount@=\thr@@\else
    \hbox{\arrow@iv
     \ifN@
      \ifcase\scount@\or\or\char118 \or\char117 \or\or\or\char119 \or
      \char120 \or\char121 \or\char122 \or\or\or\arrow@iii\char123 \or
      \vbox{\hbox{\char117}\nointerlineskip\vskip-\thr@@\p@
      \hbox{\char117}\vskip\thr@@\p@}\fi
     \else
      \ifnum\tcount@=\m@ne
      \else
       \ifcase\tcount@\char117 \or\or\char117 \or\char118 \or\char119 \or
       \char120 \or\or\or\or\or\char121 \or\char122 \or\arrow@iii\char123 \or
       \vbox{\hbox{\char117}\nointerlineskip\vskip-\thr@@\p@
       \hbox{\char117}\vskip\thr@@\p@}\fi
      \fi
     \fi}%
   \fi\fi
   \ifN@\vskip\ydimen@\else\vskip-\Ydimen@\fi}%
 \ifN@
  \dimen@ii\firsty@
 \else
  \dimen@ii-\firsty@\advance\dimen@ii\ht\ZER@\multiply\dimen@ii\m@ne
 \fi
 \rlap{\smash{\hskip\tocenter@\hskip\pdimen@\raise\dimen@ii\box\ZER@}}%
 \iflabel@i
  \setbox\ZER@\vbox to\dimen@{\vfil
   \hbox{$\m@th\tsize@@\label@i$}\vskip\tw@\ldimen@i\vfil}%
  \rlap{\smash{\hskip\tocenter@\hskip\pdimen@
  \ifnum\arrcount@=\m@ne\let\next@\relax\else\let\next@\llap\fi
  \next@{\raise\dimen@ii\hbox{\ifnum\arrcount@=\m@ne\hskip-.5\wd\ZER@\fi
   \box\ZER@\ifnum\arrcount@=\m@ne\else\hskip\tw@\p@\fi}}}}%
 \fi
 \iflabel@ii
  \ifnum\arrcount@=\m@ne
  \else
   \setbox\ZER@\vbox to\dimen@{\vfil
    \hbox{$\m@th\tsize@\label@ii$}\vskip\tw@\ldimen@ii\vfil}%
   \rlap{\smash{\hskip\tocenter@\hskip\pdimen@
   \rlap{\raise\dimen@ii\hbox{\ifnum\arrcount@=\thr@@\hskip4.5\p@\else
    \hskip2.5\p@\fi\box\ZER@}}}}%
  \fi
 \fi
}
\def\getcos@#1{%
 \ifnum\tan@i<\tan@ii
  \dimen@#1%
  \ifnum\slcount@<8 \count@9 \else \ifnum\slcount@<12 \count@8 \else
   \count@7 \fi\fi
  \multiply\dimen@\count@\divide\dimen@\ten@
  \dimen@ii\dimen@\multiply\dimen@ii\tan@i\divide\dimen@ii\tan@ii
 \else
  \dimen@ii#1%
  \count@-\slcount@\advance\count@24
  \ifnum\count@<8 \count@9 \else \ifnum\count@<12 \count@8
   \else\count@7 \fi\fi
  \multiply\dimen@ii\count@\divide\dimen@ii\ten@
  \dimen@\dimen@ii\multiply\dimen@\tan@ii\divide\dimen@\tan@i
 \fi}
\def\Nnext@{\ifN@\let\next@\raise\else\let\next@\lower\fi}
\def\arrow@@{\slcount@\angcount@
 \ifNESW@
  \ifnum\angcount@<\ten@
   \let\arrowfont@\arrow@i\global\advance\angcount@\m@ne
   \global\multiply\angcount@13
  \else
   \ifnum\angcount@<19
    \let\arrowfont@\arrow@ii\global\advance\angcount@-\ten@
    \global\multiply\angcount@13
   \else
    \let\arrowfont@\arrow@iii\global\advance\angcount@-19
    \global\multiply\angcount@13
  \fi\fi
  \Tcount@\angcount@
 \else
  \ifnum\angcount@<5
   \let\arrowfont@\arrow@iii\global\advance\angcount@\m@ne
   \global\multiply\angcount@13 \global\advance\angcount@65
  \else
   \ifnum\angcount@<14
    \let\arrowfont@\arrow@iv\global\advance\angcount@-5
    \global\multiply\angcount@13
   \else
    \ifnum\angcount@<23
     \let\arrowfont@\arrow@v\global\advance\angcount@-14
     \global\multiply\angcount@13
    \else
     \let\arrowfont@\arrow@i\global\angcount@117
  \fi\fi\fi
  \ifnum\angcount@=117 \Tcount@115 \else\Tcount@\angcount@\fi
 \fi
 \Scount@\Tcount@
 \ifE@
  \ifnum\tcount@=\z@\advance\Tcount@\tw@\else\ifnum\tcount@=13
   \advance\Tcount@\tw@\else\advance\Tcount@\tcount@\fi\fi
  \ifnum\scount@=\z@\else\ifnum\scount@=13 \advance\Scount@\thr@@\else
   \advance\Scount@\scount@\fi\fi
 \else
  \ifcase\tcount@\advance\Tcount@\thr@@\or\or\advance\Tcount@\thr@@\or
  \advance\Tcount@\tw@\or\advance\Tcount@6 \or\advance\Tcount@7
  \or\or\or\or\or\advance\Tcount@8 \or\advance\Tcount@9 \or
  \advance\Tcount@12 \or\advance\Tcount@\thr@@\fi
  \ifcase\scount@\or\or\advance\Scount@\thr@@\or\advance\Scount@\tw@\or
  \or\or\advance\Scount@4 \or\advance\Scount@5 \or\advance\Scount@\ten@
  \or\advance\Scount@11 \or\or\or\advance\Scount@12 \or\advance
  \Scount@\tw@\fi
 \fi
 \ifcase\arrcount@\or\or\global\advance\angcount@\@ne\else\fi
 \ifN@\shifted@\firsty@\else\shifted@-\firsty@\fi
 \ifE@\else\advance\shifted@\charht@\fi
 \goal@\secondy@\advance\goal@-\firsty@
 \ifN@\else\multiply\goal@\m@ne\fi
 \setbox\shaft@\hbox{\arrowfont@\char\angcount@}%
 \ifnum\arrcount@=\thr@@
  \getcos@{1.5\p@}%
  \setbox\shaft@\hbox to\wd\shaft@{\arrowfont@
   \rlap{\hskip\dimen@ii
    \smash{\ifNESW@\let\next@\lower\else\let\next@\raise\fi
     \next@\dimen@\hbox{\arrowfont@\char\angcount@}}}%
   \rlap{\hskip-\dimen@ii
    \smash{\ifNESW@\let\next@\raise\else\let\next@\lower\fi
      \next@\dimen@\hbox{\arrowfont@\char\angcount@}}}\hfil}%
 \fi
 \rlap{\smash{\hskip\tocenter@\hskip\firstx@
  \ifnum\arrcount@=\m@ne
  \else
   \ifnum\arrcount@=\thr@@
   \else
    \ifnum\scount@=\m@ne
    \else
     \ifnum\scount@=\z@
     \else
      \setbox\ZER@\hbox{\ifnum\angcount@=117 \arrow@v\else\arrowfont@\fi
       \char\Scount@}%
      \ifNESW@
       \ifnum\scount@=\tw@
        \dimen@\shifted@\advance\dimen@-\charht@
        \ifN@\hskip-\wd\ZER@\fi
        \Nnext@
        \next@\dimen@\copy\ZER@
        \ifN@\else\hskip-\wd\ZER@\fi
       \else
        \Nnext@
        \ifN@\else\hskip-\wd\ZER@\fi
        \next@\shifted@\copy\ZER@
        \ifN@\hskip-\wd\ZER@\fi
       \fi
       \ifnum\scount@=12
        \advance\shifted@\charht@\advance\goal@-\charht@
        \ifN@\hskip\wd\ZER@\else\hskip-\wd\ZER@\fi
       \fi
       \ifnum\scount@=13
        \getcos@{\thr@@\p@}%
        \ifN@\hskip\dimen@\else\hskip-\wd\ZER@\hskip-\dimen@\fi
        \adjust@\shifted@\advance\adjust@\dimen@ii
        \Nnext@
        \next@\adjust@\copy\ZER@
        \ifN@\hskip-\dimen@\hskip-\wd\ZER@\else\hskip\dimen@\fi
       \fi
      \else
       \ifN@\hskip-\wd\ZER@\fi
       \ifnum\scount@=\tw@
        \ifN@\hskip\wd\ZER@\else\hskip-\wd\ZER@\fi
        \dimen@\shifted@\advance\dimen@-\charht@
        \Nnext@
        \next@\dimen@\copy\ZER@
        \ifN@\hskip-\wd\ZER@\fi
       \else
        \Nnext@
        \next@\shifted@\copy\ZER@
        \ifN@\else\hskip-\wd\ZER@\fi
       \fi
       \ifnum\scount@=12
        \advance\shifted@\charht@\advance\goal@-\charht@
        \ifN@\hskip-\wd\ZER@\else\hskip\wd\ZER@\fi
       \fi
       \ifnum\scount@=13
        \getcos@{\thr@@\p@}%
        \ifN@\hskip-\wd\ZER@\hskip-\dimen@\else\hskip\dimen@\fi
        \adjust@\shifted@\advance\adjust@\dimen@ii
        \Nnext@
        \next@\adjust@\copy\ZER@
        \ifN@\hskip\dimen@\else\hskip-\dimen@\hskip-\wd\ZER@\fi
       \fi	
      \fi
  \fi\fi\fi\fi
  \ifnum\arrcount@=\m@ne
  \else
   \loop
    \ifdim\goal@>\charht@
    \ifE@\else\hskip-\charwd@\fi
    \Nnext@
    \next@\shifted@\copy\shaft@
    \ifE@\else\hskip-\charwd@\fi
    \advance\shifted@\charht@\advance\goal@-\charht@
    \repeat
   \ifdim\goal@>\z@
    \dimen@\charht@\advance\dimen@-\goal@
    \divide\dimen@\tan@i\multiply\dimen@\tan@ii
    \ifE@\hskip-\dimen@\else\hskip-\charwd@\hskip\dimen@\fi
    \adjust@\shifted@\advance\adjust@-\charht@\advance\adjust@\goal@
    \Nnext@
    \next@\adjust@\copy\shaft@
    \ifE@\else\hskip-\charwd@\fi
   \else
    \adjust@\shifted@\advance\adjust@-\charht@
   \fi
  \fi
  \ifnum\arrcount@=\m@ne
  \else
   \ifnum\arrcount@=\thr@@
   \else
    \ifnum\tcount@=\m@ne
    \else
     \setbox\ZER@
      \hbox{\ifnum\angcount@=117 \arrow@v\else\arrowfont@\fi\char\Tcount@}%
     \ifnum\tcount@=\thr@@
      \advance\adjust@\charht@
      \ifE@\else\ifN@\hskip-\charwd@\else\hskip-\wd\ZER@\fi\fi
     \else
      \ifnum\tcount@=12
       \advance\adjust@\charht@
       \ifE@\else\ifN@\hskip-\charwd@\else\hskip-\wd\ZER@\fi\fi
      \else
       \ifE@\hskip-\wd\ZER@\fi
     \fi\fi
     \Nnext@
     \next@\adjust@\copy\ZER@
     \ifnum\tcount@=13
      \hskip-\wd\ZER@
      \getcos@{\thr@@\p@}%
      \ifE@\hskip-\dimen@\else\hskip\dimen@\fi
      \advance\adjust@-\dimen@ii
      \Nnext@
      \next@\adjust@\box\ZER@
     \fi
  \fi\fi\fi}}%
 \iflabel@i
  \rlap{\hskip\tocenter@
  \dimen@\firstx@\advance\dimen@\secondx@\divide\dimen@\tw@
  \advance\dimen@\ldimen@i
  \dimen@ii\firsty@\advance\dimen@ii\secondy@\divide\dimen@ii\tw@
  \global\multiply\ldimen@i\tan@i\global\divide\ldimen@i\tan@ii
  \ifNESW@\advance\dimen@ii\ldimen@i\else\advance\dimen@ii-\ldimen@i\fi
  \setbox\ZER@\hbox{\ifNESW@\else\ifnum\arrcount@=\thr@@\hskip4\p@\else
   \hskip\tw@\p@\fi\fi
   $\m@th\tsize@@\label@i$\ifNESW@\ifnum\arrcount@=\thr@@\hskip4\p@\else
   \hskip\tw@\p@\fi\fi}%
  \ifnum\arrcount@=\m@ne
   \ifNESW@\advance\dimen@.5\wd\ZER@\advance\dimen@\p@\else
    \advance\dimen@-.5\wd\ZER@\advance\dimen@-\p@\fi
   \advance\dimen@ii-.5\ht\ZER@
  \else
   \advance\dimen@ii\dp\ZER@
   \ifnum\slcount@<6 \advance\dimen@ii\tw@\p@\fi
  \fi
  \hskip\dimen@
  \ifNESW@\let\next@\llap\else\let\next@\rlap\fi
  \next@{\smash{\raise\dimen@ii\box\ZER@}}}%
 \fi
 \iflabel@ii
  \ifnum\arrcount@=\m@ne
  \else
   \rlap{\hskip\tocenter@
   \dimen@\firstx@\advance\dimen@\secondx@\divide\dimen@\tw@
   \ifNESW@\advance\dimen@\ldimen@ii\else\advance\dimen@-\ldimen@ii\fi
   \dimen@ii\firsty@\advance\dimen@ii\secondy@\divide\dimen@ii\tw@
   \global\multiply\ldimen@ii\tan@i\global\divide\ldimen@ii\tan@ii
   \advance\dimen@ii\ldimen@ii
   \setbox\ZER@\hbox{\ifNESW@\ifnum\arrcount@=\thr@@\hskip4\p@\else
    \hskip\tw@\p@\fi\fi
    $\m@th\tsize@\label@ii$\ifNESW@\else\ifnum\arrcount@=\thr@@\hskip4\p@
    \else\hskip\tw@\p@\fi\fi}%
   \advance\dimen@ii-\ht\ZER@
   \ifnum\slcount@<9 \advance\dimen@ii-\thr@@\p@\fi
   \ifNESW@\let\next@\rlap\else\let\next@\llap\fi
   \hskip\dimen@\next@{\smash{\raise\dimen@ii\box\ZER@}}}%
  \fi
 \fi
}
\def\outCD@#1{\def#1{\Err@{\noexpand#1must not be used within \string\CD}}}
\def\preCDspace#1{\RIfMIfI@
 \onlydmatherr@\preCDspace\else\advance\preCDskip@#1\relax\fi\else
 \onlydmatherr@\preCDspace\fi}
\def\postCDspace#1{\RIfMIfI@
 \onlydmatherr@\postCDspace\else\advance\postCDskip@#1\relax\fi\else
 \onlydmatherr@\postCDspace\fi}
\def\predisplayspace#1{\RIfMIfI@
 \onlydmatherr@\predisplayspace\else
 \advance\abovedisplayskip#1\relax
 \advance\abovedisplayshortskip#1\relax\fi
 \else\onlydmatherr@\preCDspace\fi}
\def\postdisplayspace#1{\RIfMIfI@
 \onlydmatherr@\postdisplayspace\else
 \advance\belowdisplayskip#1\relax
 \advance\belowdisplayshortskip#1\relax\fi
 \else\onlydmatherr@\postdisplayspace\fi}
\def\PreCDSpace#1{\global\preCDskip@#1\relax}
\def\PostCDSpace#1{\global\postCDskip@#1\relax}
\def\CD#1\endCD{%
 \outCD@\cgaps\outCD@\rgaps\outCD@\Cgaps\outCD@\Rgaps
 \preCD@#1\endCD
 \advance\abovedisplayskip\preCDskip@
 \advance\abovedisplayshortskip\preCDskip@
 \advance\belowdisplayskip\postCDskip@
 \advance\belowdisplayshortskip\postCDskip@
 \vcenter{\offinterlineskip
  \vskip\preCDskip@\Let@\global\colcount@\@ne\global\rowcount@\z@
  \everycr{%
   \noalign{%
    \ifnum\rowcount@=\Rowcount@
    \else
     \getrgap@\rowcount@\vskip\getdim@
     \global\advance\rowcount@\@ne\global\colcount@\@ne
    \fi}}%
  \tabskip\z@
  \halign{&\global\xoff@\z@\global\yoff@\z@
   \getcgap@\colcount@\hskip\getdim@
   \hfil\vrule\height\ten@\p@\width\z@\depth\z@
   $\m@th\displaystyle{##}$\hfil
   \global\advance\colcount@\@ne\cr
   #1\crcr}\vskip\postCDskip@}%
 \preCDskip@\z@\postCDskip@\z@
 \def\getcgap@##1{\ifcase##1\or\getdim@\z@\else\getdim@\standardcgap\fi}%
 \def\getrgap@##1{\ifcase##1\getdim@\z@\else\getdim@\standardrgap\fi}%
 \let\Width@\relax\let\Height@\relax\let\Depth@\relax\let\Rowheight@\relax
 \let\Rowdepth@\relax\let\Colwidth@\relax
}
\catcode`\@=\active