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
|
% lamsarrow.sty: fancy arrows using lams fonts
% Author: extracted from Michael Spivak's LamS-TeX by Paul Burchard
% Version Number: 4.1
% Version Date: 24 Jan 1997
%
%--------------------- LamS-TeX copyright -------------------------
% COPYRIGHT (C) 1989, 1990, 1991 by the Texplorators Corporation,
% 1572 West Gray #377, Houston, TX 77019-4948 (ALL RIGHTS RESERVED)
%------------------------------------------------------------------
%
% This macro package allows LaTeX users to make use of the LamS-TeX
% arrow fonts and create arrows with
% * any valid LaTeX \line slope (unlike LaTeX's \vector)
% * all those fancy head/tail symbols and shaft styles.
%
% Actually, these macros will accept any slope and approximate it
% by the closest LaTeX \line slope. In making the approximation
% to the desired arrow slope, these macros will work to keep the
% arrow's *vertical* dimension accurate (at the expense
% of the horizontal one, if necessary). This requires the
% opposite strategy from LaTeX's \line and \vector commands,
% where the *horizontal* dimension can always be precisely
% specified.
%
% The macros seem to have the 10pt font size hardcoded in, so
% the arrow embellishments will be on the marginally small side
% in 12pt.
%
% Commands defined in this style file:
%
% \lamsarrow(#1,#2)
% Draws an arrow which extends #1 \unitlengths in the
% x-direction and #2 \unitlengths in the y-direction from the
% current position. #1 and #2 are arbitrary real numbers,
% not both zero. Intended for use in the picture environment.
%
% \lamsvector(#1,#2){#3}
% Has the same effect as \lamsarrow, except its usage is
% completely compatible with LaTeX's \vector command. But
% with \lamsvector, there are no limits on the size of the
% integers #1, #2, and it is OK if they have common factors.
% Only valid LaTeX line slopes will actually be drawn, tho.
%
% \lamsshaft{#1}
% A local declaration which changes the style of the shaft
% of any subsequent lams arrows within the same environment
% or {...} group. The symbol #1 may be one of:
%
% - solid line (default)
% . dashed line
% = long equals sign (no head or tail printed)
% 0 invisible arrow
% ? reset to default
%
% \lamssource{#1}
% \lamstarget{#1}
% Local declarations which change the symbol placed at the
% initial and final points, respectively, of the arrow shaft.
% Affects subsequent lams arrows within the same environment
% or {...} group. For either declaration, the symbol #1 may
% be any one of:
%
% Heads:
% ^ arrow head (default for \lamstarget)
% V arrow tail (default for \lamssource)
% ' left half of arrowhead
% ` right half of arrowhead
% A double arrowhead
% Tails:
% J left fishhook tail
% L right fishhook tail
% S squiggle
% Other:
% 0 no symbol
% ? reset to default
%
% detente message
\typeout{ * LAMSTEX ARROWS * }
\typeout{ The arrows you are using are courtesy of LamS-TeX, a }
\typeout{ full-featured mathematical typsetting package which its }
\typeout{ creator, at least, believes to be superior to LaTeX. }
\typeout{ You can obtain LamS-TeX by anonymous FTP from most TeX }
\typeout{ archives, or through the TUG user group organization. }
\typeout{ }
% lams arrow fonts
\font\lamsfont@i=lams1
\font\lamsfont@ii=lams2
\font\lamsfont@iii=lams3
\font\lamsfont@iv=lams4
\font\lamsfont@v=lams5
% arrow geom params
% direction
\newif\ifN@
\newif\ifE@
\newif\ifNESW@
\newif\ifH@
\newif\ifV@
% location of source, target
\newdimen\lams@firstx
\newdimen\lams@firsty
\newdimen\lams@lastx
\newdimen\lams@lasty
\newdimen\lams@center %ignore
% shaft char dims
\newdimen\lams@ht
\newdimen\lams@wd
% misc
\newcount\ten@ \ten@10
%%%%%%%%%%%%%%%%%%%% \lamssource, \lamstarget, \lamsshaft
%
% Used to set arrow style options.
%
% EXTERNAL VARS COMPUTED
%
% \lams@source \lams@target \lams@shaft
\newcount\lams@source
\newcount\lams@target
\newcount\lams@shaft
\def\lamssource#1{%
\if#10\lams@source\m@ne\else
\if#1?\lams@source\z@\else
\if#1V\lams@source\tw@\else
\if#1^\lams@source\thr@@\else
\if#1'\lams@source6 \else
\if#1`\lams@source7 \else
\if#1J\lams@source8 \else
\if#1L\lams@source9 \else
\if#1S\lams@source12 \else
\if#1A\lams@source13 \else
\@latexerr{Invalid lamsarrow source style: #1}%
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
\def\lamstarget#1{%
\if#10\lams@target\m@ne\else
\if#1?\lams@target\z@\else
\if#1^\lams@target\tw@\else
\if#1V\lams@target\thr@@\else
\if#1'\lams@target4 \else
\if#1`\lams@target5 \else
\if#1J\lams@target\ten@ \else
\if#1L\lams@target11 \else
\if#1S\lams@target12 \else
\if#1A\lams@target13 \else
\@latexerr{Invalid lamsarrow target style: #1}%
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
\def\lamsshaft#1{%
\if#10\lams@shaft\m@ne\else
\if#1?\lams@shaft\z@\else
\if#1-\lams@shaft\@ne\else
\if#1.\lams@shaft\tw@\else
\if#1=\lams@shaft\thr@@\else
\@latexerr{Invalid lamsarrow shaft style: #1}%
\fi\fi\fi\fi\fi}
%%%%%%%%%%%%%%%%%%%% \lams@slope
%
% Utility macro to calculate arrow shaft character in lamstex arrow
% fonts, given the x- and y-dimensions of the raw arrow.
%
% EXTERNAL VARS USED
%
% \lams@firstx \lams@lastx \lams@firsty \lams@lasty
% \ifN@ \ifE@
%
% EXTERNAL VARS COMPUTED
%
% \lams@tani \lams@tanii \lams@ang
%
% INTERNAL VARS USED
%
% \lams@slopei \lams@slopeii
% \lams@tanip \lams@taniip \lams@slopeip \lams@slopeiip
% \count@ \lams@extra
\newcount\lams@tani
\newcount\lams@tanip
\newcount\lams@tanii
\newcount\lams@taniip
\newdimen\lams@slopei
\newdimen\lams@slopeip
\newdimen\lams@slopeii
\newdimen\lams@slopeiip
\newcount\lams@ang
\newcount\lams@extra
\def\lams@slopeselect{%
\\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\lams@slope{{\lams@slopei\lams@lasty
\advance\lams@slopei-\lams@firsty
\ifN@\else\multiply\lams@slopei\m@ne\fi
\lams@slopeii\lams@lastx\advance\lams@slopeii-\lams@firstx
\ifE@\else\multiply\lams@slopeii\m@ne\fi
\ifdim\lams@slopeii<\z@
\global\lams@tani6 \global\lams@tanii\@ne\global\lams@ang23
\else
\dimen@\lams@slopei\multiply\dimen@6
\ifdim\dimen@<\lams@slopeii
\global\lams@tani\@ne\global\lams@tanii6 \global\lams@ang\@ne
\else
\dimen@\lams@slopeii\multiply\dimen@6
\ifdim\dimen@<\lams@slopei
\global\lams@tani6 \global\lams@tanii\@ne\global\lams@ang23
\else
\global\lams@tanip\z@\global\lams@taniip\@ne
\def\\##1##2##3{\global\lams@ang##3\relax
\lams@slopeip\lams@slopei\lams@slopeiip\lams@slopeii
\multiply\lams@slopeiip##1\relax
\multiply\lams@slopeip##2\relax
\ifdim\lams@slopeiip<\lams@slopeip
\global\lams@tanip##1\relax\global\lams@taniip##2\relax
\else
\global\lams@tani##1\relax\global\lams@tanii##2\relax
\def\\####1####2####3{}%
\fi}%
\lams@slopeselect
\lams@slopei\lams@lasty\advance\lams@slopei-\lams@firsty
\ifN@\else\multiply\lams@slopei\m@ne\fi
\multiply\lams@slopei\lams@tanii
\multiply\lams@slopei\lams@taniip
\multiply\lams@slopei\tw@
\count@\lams@tani\multiply\count@\lams@taniip
\lams@extra\lams@tanip\multiply\lams@extra\lams@tanii
\advance\count@\lams@extra
\lams@slopeii\lams@lastx\advance\lams@slopeii-\lams@firstx
\ifE@\else\multiply\lams@slopeii\m@ne\fi
\multiply\lams@slopeii\count@
\ifdim\lams@slopei<\lams@slopeii
\global\lams@tani\lams@tanip\global\lams@tanii\lams@taniip
\global\advance\lams@ang\m@ne
\fi
\fi
\fi
\fi}%
}
%%%%%%%%%%%%%%%%%%%% \lamsarrow, \lamsvector
%
% User macros for lams arrows. They call \lams@arrow, which sets
% up parameters for \lams@harrow, \lams@varrow, and \lams@darrow.
%
% EXTERNAL VARS USED
%
% \lams@source \lams@target
%
% EXTERNAL VARS COMPUTED
%
% \ifNESW@ \ifN@ \ifE@
% \lams@center \lams@firstx \lams@firsty \lams@lasty
% \lams@wd \lams@ht
%
% INTERNAL VARS USED
%
% \lams@xsize \lams@ysize
\newdimen\lams@xsize
\newdimen\lams@ysize
\def\lamsvector(#1,#2)#3{%
\lams@xsize#3\unitlength\relax
\ifnum#1<\z@\multiply\lams@xsize\m@ne\fi
\lams@ysize\lams@xsize
\ifnum#1=\z@
\lams@xsize\z@
\ifnum#2<\z@\multiply\lams@ysize\m@ne\fi
\else
\multiply\lams@ysize#2\relax\divide\lams@ysize#1\relax
\fi
\lams@arrow{\lams@xsize}{\lams@ysize}%
}
\def\lamsarrow(#1,#2){%
\lams@xsize#1\unitlength\relax\lams@ysize#2\unitlength\relax
\lams@arrow{\lams@xsize}{\lams@ysize}%
}
\def\lams@switchsides{%
\ifnum\lams@source=6\relax\lams@source7\else
\ifnum\lams@source=7\relax\lams@source6\else
\ifnum\lams@source=8\relax\lams@source9\else
\ifnum\lams@source=9\relax\lams@source8\fi\fi\fi\fi\relax
\ifnum\lams@target=4\relax\lams@target5\else
\ifnum\lams@target=5\relax\lams@target4\else
\ifnum\lams@target=\ten@\relax\lams@target11\else
\ifnum\lams@target=11\relax\lams@target\ten@\fi\fi\fi\fi\relax
}
\def\lams@arrow#1#2{%
\lams@firstx\z@\lams@firsty\z@
\lams@lastx#1\relax\lams@lasty#2\relax
\lams@center\z@
%
% compute direction flags
\N@false\E@false\H@false\V@false
\ifdim\lams@lastx>\z@\E@true\fi
\ifdim\lams@lastx=\z@\V@true\fi
\ifdim\lams@lasty>\z@\N@true\fi
\ifdim\lams@lasty=\z@\H@true\fi
\NESW@false
\ifN@\ifE@\NESW@true\fi\else\ifE@\else\NESW@true\fi\fi
%
% fix up one-sided embellishments, depending on direction
\ifdim\lams@lastx<\z@ \lams@switchsides \fi
\ifdim\lams@lastx=\z@ \ifdim\lams@lasty<\z@ \lams@switchsides \fi\fi
%
% compute shaft char info with help of \lams@slope macro
\ifH@\else\ifV@\else
\lams@slope
\ifnum\lams@tani>\lams@tanii
\lams@ht\ten@\p@\lams@wd\ten@\p@
\multiply\lams@wd\lams@tanii\divide\lams@wd\lams@tani
\else
\lams@wd\ten@\p@\lams@ht\ten@\p@
\divide\lams@ht\lams@tanii\multiply\lams@ht\lams@tani
\fi
\fi\fi
%
% adjust arrow placement for source and target style
\ifH@\else\ifV@\else
\ifnum\lams@target=\thr@@
\ifN@\advance\lams@lasty-.3\lams@ht
\else\advance\lams@lasty.3\lams@ht\fi
\fi
\ifnum\lams@source=\tw@
\ifE@\advance\lams@firstx.3\lams@ht
\else\advance\lams@firstx-.3\lams@ht\fi
\fi
\ifnum\lams@target=12
\ifN@\advance\lams@lasty-\lams@ht
\else\advance\lams@lasty\lams@ht\fi
\fi
\fi\fi
%
% draw arrow, special-casing horizontal and vertical ones
\ifH@ \lams@harrow
\else\ifV@ \lams@varrow
\else \lams@darrow
\fi\fi
}
%%%%%%%%%%%%%%%%%%%% \lams@darrow
%
% Does actual drawing of diagonal arrows,
% with the help of \lams@cos.
%
% EXTERNAL VARS USED
%
% \lams@shaft \lams@source \lams@target
%
% \ifNESW@ \ifN@ \ifE@ (computed by \lams@arrow)
% \lams@center \lams@firstx \lams@firsty \lams@lasty (ibid)
% \lams@wd \lams@ht (computed by \lams@arrow)
%
% \lams@ang \lams@tani \lams@tanii (computed by \lams@slope)
%
% \lamsfont@i \lamsfont@ii \lamsfont@iii \lamsfont@iv \lamsfont@v
%
% INTERNAL VARS USED
%
% \lams@sl (from \lams@ang, used by \lams@cos)
% \lams@S \lams@T (from \lams@ang, \lams@source, \lams@target)
% \lams@shift (+/- \lams@firsty) \lams@adj
% \lams@goal (+/-(\lams@lasty-\lams@firsty))
% \dimen@ \dimen@ii \count@ (computed by \lams@cos)
% \arrowfont@ \lams@shaftbox \lams@ZERO
\newdimen\lams@goal
\newdimen\lams@shift
\newdimen\lams@adj
\newcount\lams@T
\newcount\lams@S
\newbox\lams@shaftbox
\newcount\lams@sl
\newbox\lams@ZERO
\def\lams@next{\ifN@\let\next@\raise\else\let\next@\lower\fi}
\def\lams@cos#1{%
\ifnum\lams@tani<\lams@tanii
\dimen@#1%
\ifnum\lams@sl<8 \count@9
\else \ifnum\lams@sl<12 \count@8
\else \count@7 \fi\fi
\multiply\dimen@\count@\divide\dimen@\ten@
\dimen@ii\dimen@\multiply\dimen@ii\lams@tani
\divide\dimen@ii\lams@tanii
\else
\dimen@ii#1%
\count@-\lams@sl\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@\lams@tanii
\divide\dimen@\lams@tani
\fi
}
\def\lams@darrow{\lams@sl\lams@ang
\ifNESW@
\ifnum\lams@ang<\ten@
\let\arrowfont@\lamsfont@i\global\advance\lams@ang\m@ne
\global\multiply\lams@ang13
\else
\ifnum\lams@ang<19
\let\arrowfont@\lamsfont@ii\global\advance\lams@ang-\ten@
\global\multiply\lams@ang13
\else
\let\arrowfont@\lamsfont@iii\global\advance\lams@ang-19
\global\multiply\lams@ang13
\fi\fi
\lams@T\lams@ang
\else
\ifnum\lams@ang<5
\let\arrowfont@\lamsfont@iii\global\advance\lams@ang\m@ne
\global\multiply\lams@ang13 \global\advance\lams@ang65
\else
\ifnum\lams@ang<14
\let\arrowfont@\lamsfont@iv\global\advance\lams@ang-5
\global\multiply\lams@ang13
\else
\ifnum\lams@ang<23
\let\arrowfont@\lamsfont@v\global\advance\lams@ang-14
\global\multiply\lams@ang13
\else
\let\arrowfont@\lamsfont@i\global\lams@ang117
\fi\fi\fi
\ifnum\lams@ang=117 \lams@T115 \else\lams@T\lams@ang\fi
\fi
\lams@S\lams@T
\ifE@
\ifnum\lams@target=\z@\advance\lams@T\tw@
\else\ifnum\lams@target=13 \advance\lams@T\tw@
\else\advance\lams@T\lams@target\fi\fi
\ifnum\lams@source=\z@
\else\ifnum\lams@source=13 \advance\lams@S\thr@@
\else\advance\lams@S\lams@source\fi\fi
\else
\ifcase\lams@target\advance\lams@T\thr@@\or
\or\advance\lams@T\thr@@\or
\advance\lams@T\tw@\or\advance\lams@T6 \or\advance\lams@T7
\or\or\or\or\or\advance\lams@T8 \or\advance\lams@T9 \or
\advance\lams@T12 \or\advance\lams@T\thr@@\fi
\ifcase\lams@source\or\or\advance\lams@S\thr@@
\or\advance\lams@S\tw@\or\or\or\advance\lams@S4
\or\advance\lams@S5 \or\advance\lams@S\ten@
\or\advance\lams@S11 \or\or\or\advance\lams@S12
\or\advance\lams@S\tw@\fi
\fi
\ifcase\lams@shaft\or\or\global\advance\lams@ang\@ne\else\fi
\ifN@\lams@shift\lams@firsty\else\lams@shift-\lams@firsty\fi
\ifE@\else\advance\lams@shift\lams@ht\fi
\lams@goal\lams@lasty\advance\lams@goal-\lams@firsty
\ifN@\else\multiply\lams@goal\m@ne\fi
\setbox\lams@shaftbox\hbox{\arrowfont@\char\lams@ang}%
\ifnum\lams@shaft=\thr@@
\lams@cos{1.5\p@}%
\setbox\lams@shaftbox\hbox to\wd\lams@shaftbox{\arrowfont@
\rlap{\hskip\dimen@ii
\smash{\ifNESW@\let\next@\lower\else\let\next@\raise\fi
\next@\dimen@\hbox{\arrowfont@\char\lams@ang}}}%
\rlap{\hskip-\dimen@ii
\smash{\ifNESW@\let\next@\raise\else\let\next@\lower\fi
\next@\dimen@\hbox{\arrowfont@\char\lams@ang}}}\hfil}%
\fi
\rlap{\smash{\hskip\lams@center\hskip\lams@firstx
\ifnum\lams@shaft=\m@ne
\else
\ifnum\lams@shaft=\thr@@
\else
\ifnum\lams@source=\m@ne
\else
\ifnum\lams@source=\z@
\else
\setbox\lams@ZERO\hbox{%
\ifnum\lams@ang=117 \lamsfont@v\else\arrowfont@\fi
\char\lams@S}%
\ifNESW@
\ifnum\lams@source=\tw@
\dimen@\lams@shift\advance\dimen@-\lams@ht
\ifN@\hskip-\wd\lams@ZERO\fi
\lams@next
\next@\dimen@\copy\lams@ZERO
\ifN@\else\hskip-\wd\lams@ZERO\fi
\else
\lams@next
\ifN@\else\hskip-\wd\lams@ZERO\fi
\next@\lams@shift\copy\lams@ZERO
\ifN@\hskip-\wd\lams@ZERO\fi
\fi
\ifnum\lams@source=12
\advance\lams@shift\lams@ht\advance\lams@goal-\lams@ht
\ifN@\hskip\wd\lams@ZERO\else\hskip-\wd\lams@ZERO\fi
\fi
\ifnum\lams@source=13
\lams@cos{\thr@@\p@}%
\ifN@\hskip\dimen@\else\hskip-\wd\lams@ZERO\hskip-\dimen@\fi
\lams@adj\lams@shift\advance\lams@adj\dimen@ii
\lams@next
\next@\lams@adj\copy\lams@ZERO
\ifN@\hskip-\dimen@\hskip-\wd\lams@ZERO\else\hskip\dimen@\fi
\fi
\else
\ifN@\hskip-\wd\lams@ZERO\fi
\ifnum\lams@source=\tw@
\ifN@\hskip\wd\lams@ZERO\else\hskip-\wd\lams@ZERO\fi
\dimen@\lams@shift\advance\dimen@-\lams@ht
\lams@next
\next@\dimen@\copy\lams@ZERO
\ifN@\hskip-\wd\lams@ZERO\fi
\else
\lams@next
\next@\lams@shift\copy\lams@ZERO
\ifN@\else\hskip-\wd\lams@ZERO\fi
\fi
\ifnum\lams@source=12
\advance\lams@shift\lams@ht\advance\lams@goal-\lams@ht
\ifN@\hskip-\wd\lams@ZERO\else\hskip\wd\lams@ZERO\fi
\fi
\ifnum\lams@source=13
\lams@cos{\thr@@\p@}%
\ifN@\hskip-\wd\lams@ZERO\hskip-\dimen@\else\hskip\dimen@\fi
\lams@adj\lams@shift\advance\lams@adj\dimen@ii
\lams@next
\next@\lams@adj\copy\lams@ZERO
\ifN@\hskip\dimen@\else\hskip-\dimen@\hskip-\wd\lams@ZERO\fi
\fi
\fi
\fi\fi\fi\fi
\ifnum\lams@shaft=\m@ne
\else
\loop
\ifdim\lams@goal>\lams@ht
\ifE@\else\hskip-\lams@wd\fi
\lams@next
\next@\lams@shift\copy\lams@shaftbox
\ifE@\else\hskip-\lams@wd\fi
\advance\lams@shift\lams@ht\advance\lams@goal-\lams@ht
\repeat
\ifdim\lams@goal>\z@
\dimen@\lams@ht\advance\dimen@-\lams@goal
\divide\dimen@\lams@tani\multiply\dimen@\lams@tanii
\ifE@\hskip-\dimen@\else\hskip-\lams@wd\hskip\dimen@\fi
\lams@adj\lams@shift\advance\lams@adj-\lams@ht
\advance\lams@adj\lams@goal
\lams@next
\next@\lams@adj\copy\lams@shaftbox
\ifE@\else\hskip-\lams@wd\fi
\else
\lams@adj\lams@shift\advance\lams@adj-\lams@ht
\fi
\fi
\ifnum\lams@shaft=\m@ne
\else
\ifnum\lams@shaft=\thr@@
\else
\ifnum\lams@target=\m@ne
\else
\setbox\lams@ZERO
\hbox{\ifnum\lams@ang=117
\lamsfont@v\else\arrowfont@\fi\char\lams@T}%
\ifnum\lams@target=\thr@@
\advance\lams@adj\lams@ht
\ifE@\else\ifN@\hskip-\lams@wd\else\hskip-\wd\lams@ZERO\fi\fi
\else
\ifnum\lams@target=12
\advance\lams@adj\lams@ht
\ifE@\else\ifN@\hskip-\lams@wd\else\hskip-\wd\lams@ZERO\fi\fi
\else
\ifE@\hskip-\wd\lams@ZERO\fi
\fi\fi
\lams@next
\next@\lams@adj\copy\lams@ZERO
\ifnum\lams@target=13
\hskip-\wd\lams@ZERO
\lams@cos{\thr@@\p@}%
\ifE@\hskip-\dimen@\else\hskip\dimen@\fi
\advance\lams@adj-\dimen@ii
\lams@next
\next@\lams@adj\box\lams@ZERO
\fi
\fi\fi\fi}}%
}
%%%%%%%%%%%%%%%%%%%% \lams@harrow
%
% Performs actual drawing of horizontal arrows.
%
% EXTERNAL VARS USED
%
% \lams@shaft \lams@source \lams@target
%
% \ifE@ (computed by \lams@arrow)
% \lams@center \lams@firstx \lams@lastx (ibid)
% \lamsfont@i \lamsfont@ii (lams fonts)
%
% \lams@axis (to correct centering of head/tail symbol chars)
%
% INTERNAL VARS USED
%
% \dimen@ \dimen@ii
% \leads@ \lams@ZERO
\newdimen\lams@axis \lams@axis90\p@\divide\lams@axis36
\def\lams@harrow{\dimen@\lams@lastx\advance\dimen@-\lams@firstx
\ifE@\let\next@\rlap\else\multiply\dimen@\m@ne\let\next@\llap\fi
\next@{\ifE@\hskip\lams@center\hskip\lams@firstx\fi
\smash{\raise-\lams@axis\hbox to\dimen@
{\lamsfont@ii
\ifnum\lams@shaft=\m@ne\else\ifnum\lams@shaft=\thr@@\else
\ifE@
\ifnum\lams@source=\m@ne
\else
\ifcase\lams@source\or\or\char118 \or\char117 \or
\or\or\char119 \or\char120 \or\char121 \or\char122 \or
\or\or\lamsfont@i\char125 \or
\char117 \hskip\thr@@\p@\char117 \hskip-\thr@@\p@\fi
\fi
\else
\ifnum\lams@target=\m@ne
\else
\ifcase\lams@target\char117 \or\or\char117 \or\char118 \or
\char119 \or\char120 \or\or\or\or\or\char121 \or
\char122 \or\lamsfont@i\char125
\or\char117 \hskip\thr@@\p@\char117 \hskip-\thr@@\p@\fi
\fi
\fi
\fi\fi
\dimen@\lams@axis\advance\dimen@.2\p@
\dimen@ii\lams@axis\advance\dimen@ii-.2\p@
\ifnum\lams@shaft=\m@ne
\let\leads@\null
\else
\ifcase\lams@shaft
\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@\lams@axis\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@\lams@axis\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\lams@shaft=\m@ne\else\ifnum\lams@shaft=\thr@@\else
\lamsfont@i
\ifE@
\ifnum\lams@target=\m@ne
\else
\ifcase\lams@target\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\lams@source\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}}%
\ifE@\else\hskip-\lams@firstx\hskip-\lams@center\fi}%
}
%%%%%%%%%%%%%%%%%%%% \lams@varrow
%
% Performs actual drawing of vertical arrows.
%
% EXTERNAL VARS USED
%
% \lams@shaft \lams@source \lams@target
%
% \ifN@ (computed by \lams@arrow)
% \lams@center \lams@firsty \lams@lasty (ibid)
%
% \lamsfont@iii \lamsfont@iv (lams fonts)
%
% INTERNAL VARS USED
%
% \dimen@ \dimen@ii
% \leads@ \lams@ZERO
\def\lams@varrow{\dimen@\lams@lasty\advance\dimen@-\lams@firsty
\ifN@\else\multiply\dimen@\m@ne\fi
\setbox\lams@ZERO\vbox to\dimen@
{\ifnum\lams@shaft=\m@ne\else\ifnum\lams@shaft=\thr@@\else
\hbox{\lamsfont@iii
\ifN@
\ifnum\lams@target=\m@ne
\else
\ifcase\lams@target\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\lams@source\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\lams@shaft=\m@ne
\let\leads@\null
\else
\ifcase\lams@shaft\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\lams@shaft=\m@ne\else\ifnum\lams@shaft=\thr@@\else
\hbox{\lamsfont@iv
\ifN@
\ifcase\lams@source\or\or\char118 \or\char117 \or
\or\or\char119 \or\char120 \or\char121 \or\char122 \or
\or\or\lamsfont@iii\char123 \or
\vbox{\hbox{\char117}\nointerlineskip\vskip-\thr@@\p@
\hbox{\char117}\vskip\thr@@\p@}\fi
\else
\ifnum\lams@target=\m@ne
\else
\ifcase\lams@target\char117 \or\or\char117 \or\char118 \or
\char119 \or\char120 \or\or\or\or\or\char121 \or
\char122 \or\lamsfont@iii\char123 \or
\vbox{\hbox{\char117}\nointerlineskip\vskip-\thr@@\p@
\hbox{\char117}\vskip\thr@@\p@}\fi
\fi
\fi}%
\fi\fi}%
\ifN@
\dimen@ii\lams@firsty
\else
\dimen@ii-\lams@firsty\advance\dimen@ii\ht\lams@ZERO
\multiply\dimen@ii\m@ne
\fi
\rlap{\smash{\hskip\lams@center\raise\dimen@ii\box\lams@ZERO}}%
}
|