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
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
|
*******************************************************************************
* *
* TTTTTTT X X M M GGGGGG A Mostly Unofficial *
* T X X MM MM G Publication for Users *
* T EEEEEEE XXX M M M M A G GG Of the TeX Computer *
* T E X X M M M A A G G Typesetting System. *
* T EEEE X X M M M AAAAA GGGGGG *
* E A A Volume 2, Number 4 *
* EEEEEEE A A Distribution: 969 or so... *
* *
*******************************************************************************
June 3, 1988
\footnote............................................................1
News
New versions of TeX and Metafont...................................2
AmS-TeX SIAM style file available..................................3
Special issue of TeXMaG planned....................................4
Letters to the Editor................................................5
Annotated alltt environment for LaTeX................................6
Commutative diagrams with LaTeX......................................7
Letter printing using DVIlaser/HP....................................8
Graphics and TeX using Laserplot.....................................9
John Sauter's package for building Computer Modern fonts............10
TeX mysteries and puzzles...........................................11
__1
\footnote{Who do we ask for help}
Recent discussion on TeXhax has included some commentary on Leslie
Lamport's [Leslie is the author of LaTeX] role in the TeXhax
community. One of the issues raised during this discussion has been
the role of local "experts" in dealing with users.
Ideally, if a TeX user has a question, they will contact their local
TeX wizard who will give them an answer. If the wizard can't answer
the question, then they will in turn present their question to TeXhax.
In reality, the situation is usually nothing like this.
First, who are these local wizards? In many cases, it's a systems
person who is handed a tape, _The TeXbook_ (perhaps the rest of
Computers and Typesetting and the LaTeX book too if they're really
lucky) and told to "get this thing working".
TeX, unlike many other text formatting systems has a high overhead
in terms of its use. For most non-trivial applications it is
necessary to define at least a few macros to get the job done. While
this has its benefits in terms of the flexibility of TeX, it is still
no consolation to the person with a physics term paper due on Monday.
Being prepared to support TeX is not a task to be taken lightly.
For the average user, the question, "How can I produce output in two
columns with tables and figures across the bottom of the page using
plain TeX?" is not something that can be easily answered. Even an
outline of how the \output routine should be written is not
sufficient; it takes a fair amount of sophistication with TeX to be
able to customize \output routines, and unless an \output routine
meeting the user's needs already exists, the TeX support person will
have to create it.
While TeXhax is a good way to solve many of the problems
encountered, it is not a catch-all. Good *local* support is essential
for TeX to be successful. At UIC, some steps in that direction are
already being made: a TeX discussion group has been set up on the
local GRAND server (using a function similar to LISTSERV), along with
information files concerning what's available on the system; TeX Users
Group classes have been attended by computer center staff people; and
several local documents have been created describing various aspects
of the system.
Perhaps the best local support groups are those that grow out of
shared experiences, and forums such as TUGboat, TeXMaG, and TeXhax
provide excellant places for sharing those experiences. If there is
any response to this, I will print whatever comments readers might
have regarding support of TeX at the local level.
G'day,
-dh
__2
**********************************************************************
* New versions of TeX and Metafont *
**********************************************************************
On May 25, Don Knuth reported the following:
Today I repaired five (5) bugs in TeX and two (2) in METAFONT,
thereby making TeX version 2.92 and MF version 1.4.
Five. Yes, five. Plus two is seven.
Quite a blow to any feelings of confidence I once had...
Two TeX bugs were reported, one by Robert Messer and one by Peter
Breitenlohner. The Messer bug appeared last month in TeXhax,
where it was analyzed by Chris Thompson: When I'm scanning a file
name, I use the string pool as a buffer, and this conflicts with
use of the string to define a new control sequence (if the file
name contains a macro call that has parameters that are undefined
control sequences).
Following DRF's dictum, I tried to think if any other bugs of a
similar nature could occur; and indeed I noticed that another case
arises if \string or \meaning or \the or suchlike occur as part of
the file name being scanned. (In previous versions of TeX,
constructions like "\input X\jobname" worked, but only by sheer
luck... the `X' was lost and combined with the \jobname and that
whole thing was rescanned... very kludgy and certainly not what I
intended nor would it work with \expandafter.)
While testing that, I noticed another strange thing you could do
with TeX version 2.91: Try typing \input\romannumeral6 to the **
prompt, then say \end on the next line; TeX tries to open file
".tex", then it tells you it has written a transcript file called
"viTEXPUT".
I needed to patch the make_name_string routine when fixing the
latter bug. This is one of the routines that's often in a change
file, so people may have to make a small update to their change
file when they install 2.92.
In summary, I found three bugs because of what Messer reported;
luckily I had to pay for only one of them. What about the others?
Well, Breitenlohner noticed that \patterns would fail if a pattern
starts with a character whose \lccode is 1. While fixing that, I
noticed a weird circumstance that would arise only if an extremely
nasty user tried very hard to cause a range error; thus, five bugs total.
Both METAFONT bugs were found by Chris Thompson. One was a typo,
easily fixed; the other was craftily contrived in the TRIP/TRAP
mold (I mean, it was not the sort of thing any reasonable person
would ever run into, yet it produced a bug natheless). No bugs had
been found in METAFONT for almost two years, so I had pretty much
forgotten how to install a new version!
Breitenlohner also pointed out an infelicity in PLAIN.TEX; I've
updated that too. To top it all off, another typo in the MFbook
was reported.
New versions of all related files were put up for anonymous FTP on
score.stanford.edu as well as updates being distributed to all TeX
implementors.
Differences between TeX 2.92 and TeX 2.9, MF 1.4 and MF 1.3, and
plain.tex 2.3 and plain tex 2.92 will be mailed to the TeXhax
readership separately.
__3
**********************************************************************
* AmS-TeX SIAM style file available *
**********************************************************************
By Douglas N. Arnold (dna@emmy.umd.edu)
We are announcing the public distribution of two AmSTeX style files.
The first, amstexsiam.sty, is intended to simplify the preparation of
articles for publication in the journals of the Society for
Industrial and Applied Mathematics. It has been used to produce
papers which are totally acceptable to the SIAM editorial staff.
(SIAM is willing and able to include acceptable TeX output directly
in their journals.) The second style file, imappt.sty, is intended
for reports and preprints on 8.5 by 11 inch paper. It is presently
used by the Institute of Mathematics and its Applications in
Minneapolis for their preprint series. The style files are about 500
lines in length each and each comes with documentation on its use and
a sample paper. They were written by B. Lucier and myself and derive
from the amsppt style of M. Spivak.
The style files can be obtained via electronic mail through netlib. To
obtain them along with the accompanying documentation mail the message
send amstex from typesetting
send imappt from typesetting
to netlib@anl-mcs.arpa (on Arpanet) or research!netlib (on UUCP). If
you can't reach netlib, but can reach me, I will send copies via
electronic mail on request.
-- Douglas N. Arnold
Department of Mathematics
University of Maryland
College Park, MD 20742
(301) 454-7066
dna@emmy.umd.edu or arnold@eneevax.umd.edu
__4
**********************************************************************
* Special issue of TeXMaG planned *
**********************************************************************
TeXMaG V2N5 (tentatively scheduled for mid-July) will be the first
"theme" issue of TeXMaG, concerning non-English (or even
"non-American") typesetting with TeX. Topics may include, but are not
limited to: hyphenation, extended character sets, macro packages,
fonts, generating accented characters with Metafont, input problems
(e.g. how to denote Kanji characters from an English keyboard),
modified versions of TeX, &c.
Send submissions for the special issue to Don Hosek <U33297@UICVM>.
__5
**********************************************************************
* Letters to the Editor *
**********************************************************************
Date: 14 May 1988
From: Michael Barr <INHB@MCGILLC.BITNET>
I would like to comment on one letter in the current issue. Our office
used the T^3 processor, a WYSIWYG system for a couple years. At the
request of the secretaries (who saw various people come in with TeX
files to print them out on the department's laser printer, they asked
to learn that. They are now using TeX at their own request, because
they found T^3 too hard to use. Now I don't expect them to use it the
way it was meant to be used (I don't expect them to *ever* define a
macro, for example), but they are quite good at inputting formulas,
even fairly complicated ones and I hope to get them to the point of at
least using files of macros that I or others will make for them.
They are using only plain TeX, but I expect them to use LaTeX when
necessary. One complaint I have is that the documentation for LaTeX
is woefully incomplete. There is not, for example, a single example
to suggest that the parameters to the picture macro can be a counter
as well as an actual number. It cannot be, however, a length. Or,
more precisely, I have not figured out how to make it a length.
Michael Barr
======================================================================
Date: 30 Mar 1988
From: Philip Taylor <CHAA006@VAXB.RHBNC.AC.UK>
In your recent \footnote (TeXMaG V2N3), you agree with Bernie Cosell
concerning the "unfriendliness" of TeX, and suggest that TeX should
evolve to
(1) Incorporate graphics in some standard way.
(2) Use popular fonts such as Times Roman, Helvetica, Century [...]
(3) [provide] A special low resolution family of fonts
(4) [provide] an easy-to-use *interactive* [interface to] TeX.
I have considerable sympathy with all of these points, but would offer
a few comments:
(0) TeX's initial diagnostics may be unfriendly, but the 'H'
option provides such friendly and encouraging messages that I
really cannot agree that TeX is deficient in this area.
(1) I believe that a full integration of TeX and PostScript is a
possible, reasonable and sensible approach to this. At the
moment, TeX produces a DVI file (by definition, although I
believe that somewhere in the TeXbook Knuth suggests that
non-DVI-based implementations exist), and one is required to
post-translate this into PostScript. Is it not possible that
some generous soul will attempt a full integration, generating
PostScript directly from TeX (will it still be able to be
called TeX, if it doesn't generate DVI ?)
If the same approach could also be taken with MetaFont
(PostScript outline fonts produced directly by MetaFont from MF
definitions), I think many of us would feel a foretaste of what
would happen if heaven had been granted.
(2) TeX *does* use such "popular" fonts; it is only Plain.TeX that
makes pre-suppositions concerning the use of CM fonts. By
writing one's own Plain.TeX (e.g. PSMPLAIN.TEX), it is possible
to use TeX unchanged, and to use the "popular" fonts rather
than CM. Unfortunately, the "popular" fonts aren't complete in
the area of math symbols and math extension, and it is
therefore necessary to either avoid math-mode entirely
(surprisingly difficult), or to use CM-fonts where necessary.
I entirely agree with (3) and (4).
Philip Taylor
RHBNC, University of London, U.K.
======================================================================
Date: 1 Apr 88
From: Simon Tortike <STORTIKE@UALTAVM.BITNET>
I enjoy reading TeXMag every time it comes. I should like to add that
I do do not think TeX is about to be replaced by WYSIWYG systems on
the Mac or anything else. No reputable publisher is going to publish
a math/physics/engg book using poor-quality math symbols, and TeX is
the easiest way I know of doing this. It is also easier to write a
long equation in TeX than in one of the better math programs on the
Mac, such as Expressionist and MathType, particularly when there is
much editing to do. TeX is of course better at the spacing of these,
too. However, support for fonts other than CM is highly necessary. The
math fonts are probably best left in CM, though. None of the
PostScript symbols look particularly polished. FTL systems, in MacTeX,
have created PostScript outlines of the CM math fonts, permitting them
to be used as PostScript fonts with other text fonts such as Times,
Helvetica, etc. They do not look as good as the original CM math fonts
to me, though.
Keep up the good work,
Simon Tortike.
======================================================================
Date: 30 Mar 88
From: KLASSEN@UVVM.BITNET
Just a small suggestion regarding SIZECHEK EXEC:
you can delete the two 'SET CMSTYPE' commands if you prefix the
'LISTFILE' command with "address command". Also, good programming
practice suggests that you should insert:
address command 'MAKEBUF'
stacked=queued()
where the first 'SET CMSTYPE' was, and replace:
if Orc=28 then Exit -1
by
if Orc=28 then do; address command 'DROPBUF'; Exit -1; end
and replace:
Do Queued()
by
Do (Queued()-stacked)
and insert:
address command 'DROPBUF'
just before the final 'Exit' command.
Anyway, keep up the good work.
Melvin Klassen
Software Development, University of Victoria
(604) 721-7670
======================================================================
Date: 3 Apr 88
From: jonradel%icecream.Princeton.EDU@Princeton.EDU
To: texline@vaxa.cc.ic.ac.uk
I found issue number 7 in my mailbox today, thank you. I had a
couple of quick responses to your editorial on the front page.
I think one reason you are getting e-mail requests for TeXline
without `snail-mail' addresses is that one your primary sources of
publicity here in the U.S., TeXMaG, lists TeXline amid a batch of
e-mail digests and newsletters, only your e-mail address, and no
indication that TeXline comes only on paper. I'm dropping a copy of
this note to Don Hosek as a hint that he mention the medium you use.
--Jon Radel
[[Editor's note: Hint taken :-)]]
======================================================================
Date: Tue, 12 Apr 88 13:37 N
From: "M.L.Livusetto" <LUVISETTO@IBOINFN.BITNET>
I have been able to read only today the last 2 issues of TeXMaG. First
of all my thanks and compliments for your job both on TeXMaG and on
the information side on what and where people can look at to find TeX
and related software. I have also received from Max Calvani a
collection of addresses for TeX, spoolers and previewers (collect from
a server, I think), in this way I am able to help people that has no
DECnet access. I think that TeXMaG is completely different from TeXhax
and TUGboat and has information not found elsewhere (just to note, the
list of fonts with addresses), therefore I encourage you to go on with
your efforts.
Best regards,
-mll
__6
**********************************************************************
* Annotated alltt environment for LaTeX *
**********************************************************************
By: Charles J. Antonelli <Cja@Crim.Eecs.Umich.Edu>
Here's a a LaTeX macro which allows one to mark and refer to selected
lines of an alltt environment (provided by Leslie Lamport some time
ago [[Editor's note: alltt.sty is available from the LaTeX-Style
repository; see the end of the issue for information on obtaining
files from that repository.]]). I wrote it when I found out I had to
annotate some program listings that were constantly changing, and I
got tired of renumbering the references to them by hand.
%----- cut here ------------------------------------------------------
% Environment Name: listing
%
% Usage:
% \begin{listing}{foo}{bar}
% statement1
% statement2 \lmark{bletch}
% statement3
% ...
% \end{listing}
%
% Description:
% The listing environment defines an alltt environment
% within a figure environment. Within the alltt
% environment, the construction \lmark{bletch} marks the
% right hand side of the line on which it appears with
% the notation y, where y is a counter that increases
% by one for each line so marked. \ref{bletch} yields
% x(y), where x is the figure number. foo becomes the
% figure \label and bar becomes its \caption. \lmark
% numbers are drawn in tex \oldstyle (see texbook p.435)
% on the listings, in keeping with aesthetics.
%
% Caveats:
% Do not place one listing environment within another.
%
% Author:
% Charles J. Antonelli, 14 Jan 88.
% \@enewlabel#1#2 is like \@newlabel#1#2 except that the
% former defines the label with \edef rather than \def.
% this is useful when you wish to expand #2 at the time
% \@enewlabel is encountered, not when the label is
% referenced.
\def\@enamedef#1{\expandafter\edef\csname #1\endcsname}
\def\enewlabel#1#2{\@ifundefined{r@#1}{}{\@warning{Label `#1' multiply
defined}}\global\@enamedef{r@#1}{#2}}
% \listingcaption is like \caption except it doesn't do a
% \refstepcounter, which it never should have done
% in the first place.
\def\listingcaption{\@dblarg{\@caption\@captype}}
% we define a counter to count instances of \lmark. the
% counter is reset for each new listing environment.
\newcounter{lmarknum}
% beginning the listing environment sets the lmarknum counter
% to 1, begins a figure, increments the figure counter,
% labels the figure, begins an alltt, and saves the caption.
% ending the listing environment ends the alltt, puts
% out the saved caption, and ends the figure. we need
% to bump the figure counter ourselves because latex does
% it during \caption processing at the end of the figure,
% and we need to do it at the beginning. we need to save
% the caption argument because latex doesn't allow
% \newenvironment parameters to appear in the end text.
\newenvironment{listing}[2]{\setcounter{lmarknum}{1}\begin{figure}\refstepcounte
r{figure}\label{#1}\begin{alltt}\gdef\@@cheat{\listingcaption{#2}}}{\end{alltt}\
@@cheat\end{figure}}
% the lmark command puts out a right-justified \hbox of
% fixed size, within which \thelmarknum is left-justified.
% this vertically lines up lmarks on multiple lines nicely.
% we then define the argument label with the composite
% number \thefigure(\thelmarknum}, and increment the
% lmarknum counter.
\newcommand{\lmark}[1]{{{\hfill \hbox to
1in{\hbox{$\fam=1\tenmi\thelmarknum$}\hfil}\enewlabel{#1}{{\thefigure
(\thelmarknum)}}\addtocounter{lmarknum}{1}}}}
% \lline and \Lline give us a convenient shorthand when
% referring to \lmarks. we'd love to use \line, but
% that's already been taken.
\newcommand{\lline}[1]{line~\ref{#1}}
\newcommand{\Lline}[1]{Line~\ref{#1}}
%--- cut here --------------------------------------------------------
__7
**********************************************************************
* Commutative diagrams with LaTeX *
**********************************************************************
By Michael Barr <Inhb@McgiLLc.Bitnet>
I use a lot of what are called commutative diagrams and I am spending
some time making macros to do that efficiently. So far, I have written
macros for all kinds of squares. Below is a LaTeX style file
containing the square macros and a file that exhibits the macros' use.
publish them if you think they are interesting. I plan to go on from
there to do triangles in all orientation. There are comments in both
files that explain their use.
%%%---Cut Here--------------------------------------------------------
% File: SQMAC.STY
\long\def\ig#1{\relax}
\ig{Thanks to Roberto Minio for this def'n. Compare the def'n of
\comment in AMSTeX.}
\ig{ Copyright 1988 Michael Barr
Department of Mathematics and Statistics
McGill University
Montreal, Quebec, Canada
H3P 1S4
inhb@mcgillc.bitnet
All commercial rights reserved. May be freely distributed
for non-commercial use, so long as this notice is included.}
\setlength{\unitlength}{.1em}
\newlength{\ulabeloffset}
\newlength{\ulabelwidth}
\newlength{\arrowwidth}
\newlength{\lnodewidth}
\newlength{\rnodewidth}
\newlength{\loffset}
\newlength{\roffset}
\nawcount\tarrowflag
\newcount\larrowflag
\newcount\rarrowflag
\newcount\barrowflag
\newcount\height
\newcount\width
\newcount\arrowlen
\newcount\labelheight
% The following is like \vector, except it makes a monic (tailed) arrow.
\def\mvector(#1,#2)#3
{
\begin{picture}(#3,#3)(-2,0)
\put(0,4){\vector(#1,#2){#3}}
\put(0,4){\vector(#1,#2){3}}
\end{picture}
}
% The following is like \vector, except it makes an epic (2-headed) arrow.
\def\evector(#1,#2)#3
{
\arrowlen #3
\begin{picture}(\arrowlen,\arrowlen)(-2,0)
\put(0,4){\vector(#1,#2){\arrowlen}}
\advance \arrowlen by -4
\put(0,4){\vector(#1,#2){\arrowlen}}
\end{picture}
}
\catcode`@=11 % unhide @sign definitions
\def\absvector(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax
\@linelen=#3
\ifnum\@xarg =0 \@vvector
\else \ifnum\@yarg =0 \@hvector \else \@svector\fi
\fi}
\catcode`@=12 % @signs are no longer letters
\ig{This definition of \function below is a modification of one due to
Charles Wells whose idea it was to try to make the length of the arrow
depend on the sizes of the nodes. Much elaborated, it forms the basis
of the square macro.}
\newcommand{\setwidths}[4]
{
\settowidth{\lnodewidth}{#1}
\settowidth{\rnodewidth}{#2}
\setlength{\loffset}{0.5\lnodewidth}
\setlength{\roffset}{0.5\rnodewidth}
\addtolength{\loffset}{3\unitlength} %allows a little space
\addtolength{\roffset}{3\unitlength} %before & after the arrow
\setlength{\arrowwidth}{#4\unitlength}
\addtolength{\arrowwidth}{-\loffset}
\addtolength{\arrowwidth}{-\roffset}
\setlength{\ulabeloffset}{\loffset}
\settowidth{\ulabelwidth}{#3}
\advance\ulabeloffset by .5\arrowwidth
\advance\ulabeloffset by -.5\ulabelwidth
}
\newcommand{\dofunc}[4]
{
\setwidths{#1}{#2}{#3}{#4}
\begin{picture}(0,0)
\put(0,0){\makebox(0,0){#1}}
\put(-3,0){\hspace{\loffset}\absvector(1,0){\arrowwidth}}
\put(#4,0){\makebox(0,0){#2}}
\put(0,4){\hspace{\ulabeloffset}{#3}\hspace{\ulabeloffset}}
\end{picture}
}
% The four parameters are (lnode,rnode;label,width)
\def\func(#1,#2;#3;#4)
{ %begin func
\makebox(0,0){\dofunc{#1}{#2}{#3}{#4}
}%end box
}%end func
\ig{The next procedure is to set parameters for a square. The six
parameters are all numbers. The first 4 flag the four arrows of the
square as follows:
top or bottom left or right
arrow arrow
< -3 leftwards, normal upwards, normal ( <----- )
-3 leftwards, epic upwards, epic ( <<---- )
-2 leftwards, monic upwards, monic ( <----< )
-1 leftwards, normal upwards, normal ( <----- )
0 omitted omitted
1 rightwards, normal downwards, normal ( -----> )
2 rightwards, epic downwards, epic ( ---->> )
3 rightwards, monic downwards, monic ( >----> )
> 3 rightwards, normal downwards, normal ( -----> )
In other words, when the parameter is positive, the arrow goes in the
ordinary (linguistic) direction and when negative, in the opposite
direction. When the parameter is 0, the arrow is omitted. When the
absolute valute of the parameter is 2, you get a monic (tailed) arrow
and when it is 3, you get an epic (double headed) arrow. Any other
non-zero value gives an normal arrow.
The last 2 parameters, for which 60 and 70 are a reasonable values, are
the distance between the vertical, resp. horizontal arrows in
increments of .1 em.
The procedure \resetparms sets the first 4 of these parameters to 1 and
the last two to 60 and 70.
NOTE: ONE OF THE PROCEDURES \setparms OR \resetparms SHOULD BE EXECUTED
BEFORE A SQUARE IS MADE.
The procedure \square takes 8 parameters, in the format
[#1`#2`#3`#4;#5`#6`#7`#8] which are in order,
[NW`NE`SW`SE;t`l`r`b], the first four being the nodes and the last four
the labels on the arrows.
The top and bottom arrows have their lengths automatically adjusted to
compensate for the widths of the nodes. Thus 50 will be a reasonable
value for the width parameter, but only if the labels are not too long.
The examples below show how these squares may be fitted together to make
more complicated diagrams. Although it may be possible in principle to
superimpose the joint arrow, it seems safer to omit one of them. Minor
arithmetic errors might otherwise result in thick lines. Note, in the
examples, the use of the procedure \phantom to make the arrow lengths
proper, while avoiding overlapping nodes.
Note the \hspace and \space used to properly space them. I don't
understand the spacing rules used in picture mode to figure out how to
do these automatically and so they are determined by trial and error. I
suspect they depend on the widths of the nodes and the heights of the
labels. Also note the blank lines between the two squares in the second
example. This is necessary for proper spacing.}
\ig{In case you are interested why I used the peculiar syntax for the
parameters, it is because I didn't like to type braces and I also didn't
want to use things like parens and commas that I am likely to use as
parts of nodes and arrows. But feel free to change this syntax.}
\def\setparms[#1`#2`#3`#4;#5`#6]
{
\tarrowflag #1
\larrowflag #2
\rarrowflag #3
\barrowflag #4
\width #5
\height #6
}
\newcommand{\resetparms}
{
\tarrowflag1
\larrowflag1
\rarrowflag1
\barrowflag1
\width50
\height50
}
\resetparms %initializes defaults
\ig{The parameters are the nodes and arrows in linguistic order.
Note: if one of the nodes has an asscript, then the other one on
the same line must too. Use an empty box (e.g. blah_{}) if necessary.}
\def\square[#1`#2`#3`#4;#5`#6`#7`#8]%
{
\advance \height by 30
\begin{picture}(\width,\height)(0,4)
\arrowlen\height
\labelheight\height
\divide\labelheight by 2
\advance \height by -15
\advance \arrowlen by -44
\setwidths{#1}{#2}{#5}{\width}
\put(0,\height){\makebox(0,0){#1}}
\ifnum\tarrowflag>0
\put(-3,\height){\hspace{\loffset}\absvector(1,0){\arrowwidth}}
\ifnum\tarrowflag=3
\advance\arrowwidth by -4\unitlength
\put(-3,\height){\hspace{\loffset}\absvector(1,0){\arrowwidth}}
\fi
\ifnum\tarrowflag=2
\put(-1,\height){\hspace{\loffset}\absvector(1,0){\unitlength}}
\fi
\else\ifnum\tarrowflag<0
\advance\loffset by \arrowwidth
\put(-3,\height){\hspace{\loffset}\absvector(-1,0){\arrowwidth}}
\ifnum\tarrowflag=-3
\advance\arrowwidth by -4\unitlength
\put(-3,\height){\hspace{\loffset}\absvector(-1,0){\arrowwidth}}
\fi
\ifnum\tarrowflag=-2
\put(-5,\height){\hspace{\loffset}\absvector(-1,0){\unitlength}}
\fi
\fi\fi
\put(\width,\height){\makebox(0,0){#2}}
\advance \height by 4
\put(0,\height){\hspace{\ulabeloffset}{#5}\hspace{\ulabeloffset}}
\advance \height by -11
\ifnum\larrowflag>0
\put(0,\height){\vector(0,-1){\arrowlen}}
\ifnum\larrowflag=3
\advance\arrowlen by -4
\put(0,\height){\vector(0,-1){\arrowlen}}
\advance\arrowlen by 4
\fi
\ifnum\larrowflag=2
\advance \height by -2
\put(0,\height){\vector(0,-1){1}}
\advance \height by 2
\fi
\else\ifnum\larrowflag<0
\advance\height by-\arrowlen
\put(0,\height){\vector(0,1){\arrowlen}}
\ifnum\larrowflag=-3
\advance\arrowlen by -4
\put(0,\height){\vector(0,1){\arrowlen}}
\advance\arrowlen by 4
\fi
\ifnum\larrowflag=-2
\advance \height by 2
\put(0,\height){\vector(0,1){1}}
\advance \height by -2
\fi
\advance\height by\arrowlen
\fi\fi
\ifnum\rarrowflag>0
\put(\width,\height){\vector(0,-1){\arrowlen}}
\ifnum\rarrowflag=3
\advance\arrowlen by -4
\put(\width,\height){\vector(0,-1){\arrowlen}}
\fi
\ifnum\rarrowflag=2
\advance \height by -2
\put(\width,\height){\vector(0,-1){1}}
\fi
\else\ifnum\rarrowflag<0
\advance\height by-\arrowlen
\put(\width,\height){\vector(0,1){\arrowlen}}
\ifnum\rarrowflag=-3
\advance\arrowlen by -4
\put(\width,\height){\vector(0,1){\arrowlen}}
\advance\arrowlen by 4
\fi
\ifnum\rarrowflag=-2
\advance \height by 2
\put(\width,\height){\vector(0,1){1}}
\advance \height by -2
\fi
\fi\fi
\put(-3,\labelheight){\makebox(0,0)[r]{#6}}
\advance \width by 3
\put(\width,\labelheight){\makebox(0,0)[l]{#7}}
\advance \width by -3
\setwidths{#3}{#4}{#8}{\width}
\put(0,15){\makebox(0,0){#3}}
\ifnum\barrowflag>0
\put(-3,15){\hspace{\loffset}\absvector(1,0){\arrowwidth}}
\ifnum\barrowflag=3
\advance\arrowwidth by -4\unitlength
\put(-3,15){\hspace{\loffset}\absvector(1,0){\arrowwidth}}
\fi
\ifnum\barrowflag=2
\put(-1,15){\hspace{\loffset}\absvector(1,0){\unitlength}}
\fi
\else\ifnum\barrowflag<0
\advance\loffset by \arrowwidth
\put(-3,15){\hspace{\loffset}\absvector(-1,0){\arrowwidth}}
\ifnum\barrowflag=-3
\advance\arrowwidth by -4\unitlength
\put(-3,15){\hspace{\loffset}\absvector(-1,0){\arrowwidth}}
\fi
\ifnum\barrowflag=-2
\put(-5,15){\hspace{\loffset}\absvector(-1,0){\unitlength}}
\fi
\fi\fi
\put(\width,15){\makebox(0,0){#4}}
\put(0,7){\hspace{\ulabeloffset}{#8}\hspace{\ulabeloffset}}
\end{picture}
}
%%%---Cut Here--------------------------------------------------------
% File: sqsample.tex
\documentstyle[12pt,sqmac]{article}
\pagestyle{empty}
\def\colim{\mathop{\rm colim}\nolimits}
\newcommand{\bp}{\begin{picture}}
\newcommand{\ep}{\end{picture}}
\begin{document}
\setparms[0`-1`-2`-3;70`70]
\square[$AAAAA$`$BB$`$DD$`$CCC$;$f$```$g$]
\hspace{5em}
\setparms[-1`-2`-3`-4;70`70]
\square[$AAAAA$`$BB$`$DD$`$CCC$;$f$```$g$]
\setparms[-2`-3`-4`0;70`70]
\square[$AAAAA$`$BB$`$DD$`$CCC$;$f$```$g$]
\hspace{5em}
\setparms[-3`-4`0`-1;70`70]
\square[$AAAAA$`$BB$`$DD$`$CCC$;$f$```$g$]
\setparms[-4`0`-1`-2;70`70]
\square[$AAAAA$`$BB$`$DD$`$CCC$;$f$```$g$]
\setparms[0`1`2`3;70`70]
\square[$AAAAA$`$BB$`$DD$`$CCC$;$f$```$g$]
\hspace{5em}
\setparms[1`2`3`4;70`70]
\square[$AAAAA$`$BB$`$DD$`$CCC$;$f$```$g$]
\setparms[2`3`4`0;70`70]
\square[$AAAAA$`$BB$`$DD$`$CCC$;$f$```$g$]
\hspace{5em}
\setparms[3`4`0`1;70`70]
\square[$AAAAA$`$BB$`$DD$`$CCC$;$f$```$g$]
\setparms[4`0`1`2;70`70]
\square[$AAAAA$`$BB$`$DD$`$CCC$;$f$```$g$]
%In the diagrams below, the parameters specify that the squares are
%height 90 units (approximately 90 points) and the left and right arrows
%are, respectively, monic and epic. The horozontal backspace of 21 units
%was determined by trial and error and depends in a way I don't
%understand on the sizes of the nodes. In the second square the upper
%arrow is monc, the left hand one omitted, the right hand arrow epic and
%the bottom ordinary. The nodes marked \phantom are used to calculate
%the lengths of the arrows, but are not actually printed. For more
%information, see the commentary in the file squarmac.tex.
\begin{center}
\makebox
{
\setparms[1`2`-3`-1;60`90]
\square[$AAAAA$`$BB$`$DD$`$CCC$;$f$```$g$]
\hspace{-14\unitlength}
\setparms[2`0`3`1;60`90]
\square[\phantom{$BB$}`$EEEE$`\phantom{$CCC$}`$FFF$;$l$``$m$`$n$]
}
\end{center}
\newpage
\ig{I have been unable to figure out how to center a diagram like the
one below, since every attempt to cause a cr gives an error to the
centering macro. It can be done by eye, of course. It is also hard ot
prevent a page break here.}
\setparms[1`1`1`1;60`70]
\square[$AAA$`$BB$`$C$`$DDDD$;$f$`$g$`$h$`$k$]
\tarrowflag0
\vspace{-31\unitlength}
\setparms[1`1`1`1;60`80]
\square[\phantom{$C$}`\phantom{$DDDD$}`$EE$`$FFF$;$l$``$m$`$n$]
\ig{
In the diagrams below (which, together with the surrounding text, are from
an actual paper) the fact that there is a blank line above the text and
not, but a \\ below, is because that is what works. Instead, one could
have a blank line below and begin the next line with \noindent. If \\
is used to separate the text above from the square, then \hspace has no
effect, although \hspace* would probably work. It appears that one
cannot put such a diagram into a {center} environment. I get an
"impossible" error message, but I assume that was the real reason.
This illustrates the use of \vector to add other arrows to a diagram.
In general, I don't know how, except by trial and error, to say exactly
where these arrows should go, but I assume that with experience, it will
become easier to place them.
One more comment: If the parameters are set inside a proedure, then they
will be reset when that environment is exited. On the other hand the
line \tarrowflag3 above set a parameter globally and then resetting it
in the first of the diagrams below does not reset it for the second. It
is probably to ALWAYS set or rest the parameters so that if a diagram is
moved, or something inserted above it, it will always be correct.}
Now let $A$ be an arbitrary object of ${\cal A}$ that satisfies all the Horn
sentences. Like any object of ${\cal A}$, $A$ is a filtered colimit of
finitely presented algebras. Write $A=\colim A_i$. Then we have a
diagram for each $i$
\hspace{7em}
\bp(0,70)
\put(37,44){\vector(-1,-1){26}}
\setparms[1`1`1`1;40`40]
\square[$A_i$`$\Phi\Psi A_i$`$A$`$\Phi\Psi A$;$f_i$```$f$]
\ep\\
where the diagonal arrow exists because $A$ satisfies all those Horn
sentences. Since $\Psi$ is a left adjoint, it preserves filtered
colimits and $\Phi$ does by assumption. Taking colimits, we get
\hspace{6em}
\bp(0,70)
\put(63,44){\vector(-2,-1){52}}
\setparms[1`1`1`1;68`40]
\square[$\colim A_i$`$\colim\Phi\Psi A_i$`$A$`$\colim\Phi\Psi A$;```]
\ep
From the fact that both vertical arrows are isomorphisms, it follows by
an easy diagram chase that the diagonal is too.
\ig{ The following illustrates a minor flaw in the \square macro and two
possible workarounds. Neither is perfect; the first still doesn't leave
them lined up perfectly (apparently because superscripts don't go up as
far as subscripts go down) while the second leaves the nodes on the same
line, but leaves both of them a bit high with respect to the arrow than
unadorned nodes. Only a perfectionist will notice anything wrong with
either of them}
\resetparms\width70
\square[$AAAAA_1$`$BB$`$CCC$`$DD$;$f$```$g$]
\resetparms\width70
\square[$AAAAA_1^{}$`$BB$`$CCC$`$DD$;$f$```$g$]
\hspace{10em}
\resetparms\width70
\square[$AAAAA_1$`$BB_{}$`$CCC$`$DD$;$f$```$g$]
\end{document}
%%%---Cut Here--------------------------------------------------------
__8
**********************************************************************
* Letter printing using DVIlaser/HP *
**********************************************************************
By Alan Johnson <FGKODAJ@ALASKA>
[[Editor's note: the macros provided below, while designed for use
with DVIlaser/HP, should be easily adaptable to any other printer
that allows software selection of input trays and inclusion of
printer command files]]
If no one has provided an envelope driver for the HP Laser printer,
this might be of interest. The macros are useful when your company
uses it's own letterhead and when the the return address is printed
on the envelopes. Two macros are provided; one that accesses the
lower tray of the laser printer and the other that accesses the
manual feed.
Start with the letter style provided in Donald Knuth's _TeXbook_ and
get rid of his letterhead. Modify or add the macros below to the
style. The address in the letter is assumed to be four lines with the
4th line containing the city and state-zip separated by a comma. The
label on the envelope will have the state-zip on the line following
the city. The internal landscape font of the laser printer is used.
For draft viewing of the letter exclude '\letterhead' from your
letter.
%------------------Cut Here------------------------------------------
\def\letterhead{\special{hp: plotfile c:lower.hp}}
\headline={\ifnum\pageno>1
\special{hp: plotfile c:upper.hp}\par
\headerfont To: \addressee\hfil\today\hfil Page \folio
\else \hfil \fi}
\def\envelope{\special{hp: plotfile c:envelope.hp}
\special{hp: plotfile c:envelope.lbl}}
\newbox\addressinfobox
\newdimen\addressinfoboxhsize
\newdimen\addressinfoboxlength
\addressinfoboxhsize=3truein
\def\address{\beginlinemode\getaddress}
{\obeylines\gdef\getaddress #1
#2
#3
#4
#5, #6
{\openout0=c:envelope.lbl #1\gdef\addressee{#2}
\write0{}\write0{#2}\write0{#3}\write0{#4}\write0{#5}
\write0{#6}\closeout0 %
\global\setbox\addressinfobox=\vbox\bgroup\raggedright\headerfont %
\hsize=\addressinfoboxhsize \everypar{\hangindent2em}#2
#3\par#4\par#5, #6
\def\endmode{\egroup\endgroup
\vbox{\bigskip\bigskip\bigskip\bigskip}
\vbox{\leftskip=\longindentation \today}
\bigskip\copy\addressinfobox \bigskip\bigskip}}}
\def\endletter{\bigskip\bigskip\closing \endmode\envelope \supereject\end}
%-------------Cut Here------------------------------------------------
The files that are sent to the printer are Hewlett Packard PCL
commands. The term <esc> refers to the escape character (027). The
files contain the values between the double quotes, but not including
the double quotes. The file 'upper.hp' contains '<esc>&l1H'. The file
'lower.hp' contains '<esc>&l4H'. The file 'envelope.hp' contains
'<esc>E<esc>&l1O<esc>&l3h38E<esc>&a48L'.
The label for the envelope is picked up from the '\address' area of
the letter and written to the file 'envelope.lbl', because ASCII text
is needed for the landscape printing of the label (i.e. the label is
not typeset). Some of the problems encountered are (1) a blank page
comes out between the pages of the letter, and (2) a blank page comes
out prior to the label for the envelope. However, it does work.
__9
**********************************************************************
* Graphics and TeX using Laserplot *
**********************************************************************
By Alan Johnson <FGKODAJ@ALASKA.BITNET>
I have successfully combined in-text graphics and text using TeX or
any wordprocessor that can import a file without modifying it when
sending the file to a printer. For those of you using a HPGL
(Hewlett Packard graphics language) and a HP Laser+ printer, this
will be of interest. I have successfully included files created by
Freelance, Lotus and custom software driving a HP7475 plotter. The
key element is Laserplot by Insight Corp. (HP35188A product code for
Hewlett Packard) which rasterizes the HPGL code. However, it has
three aspects that are limiting. The figure is upside down in
relation to printed text; form feeds are sent before and after the
graph; and the raster image has fixed addressing. I have been using
several custom software packages that solve the problems and provide
a properly oriented figure that is based on relative addressing. The
relative addressing means that as you modify your text, the figure
moves automatically. The converse of this would be that the figure
is always in the same location on the page. Once the printer-reading
file has been created, I can essentially forget that it exists,
because when I send my text to the printer, the file is automatically
included. To include a file that is rasterized, the DVILASER/HP User
Manual by ArborText provides the following macro
%--------
\def\insertplot#1#2#3{\par
\hbox{%
\hskip #3
\vbox to #2{
\special{hp: plotfile #1}
\vfil
}%
}
}
%--------
To include two figures side by side use the following
%---------
\def\insertplots#1#2#3#4#5{\par
\hbox{%
\hskip #2
\vbox to #5{
\special{hp: plotfile #1}
\vfil}%
\hskip #4
\vbox to #5{
\special{hp: plotfile #3}
\vfil}%
}
}
%--------------
The discussion of the arguments is included in the User Manual. The
first argument is the file name (no subdirectories allowed), second
is depth of figure, and third is offset from the left. The custom
software is still under development and is expected to support files
created by DISSPLA and Tel-a-graph.
__10
**********************************************************************
* John Sauter's Package for building Computer Modern fonts *
**********************************************************************
By Don Hosek <DHOSEK@HMCVAX.BITNET>
In TUGboat 7(3), John Sauter announced a package he had created for
VAX/VMS for building Computer Modern fonts at any size he desired.
For example, he had wanted to create a computer modern sans-serif
font with a design size of 11 points (CMSS11), as well as other
non-standard design sizes. By examining the parameter files used by
Don Knuth in creating the normal Computer Modern fonts, he managed
to come up with alternative paramater files that, using the design
size as input would generate the appropriate sized Computer Modern
font. For example, Metafont source for CMSS11 would look like:
%%%-------------------------------------------------------------------
design_size:=11;
input build_cmss;
%%%-------------------------------------------------------------------
Such a scheme greatly simplifies creating non-standard sizes
considerably. In addition, his parameter files will generate
identical results to the standard Computer Modern fonts.
However, Sauter's parameter files have limitations at excessive
sizes. For example, inter-character spacing in a cmr36 font generated
with this package was far too small, and some character combinations
(such as "88") had no visible inter-character space, and so the
characters appear to touch. This does not appear to be a problem with
all fonts (cmssdc40 looks fine), and for sizes in normal text ranges
the parameter files work quite well.
In addition to the Metafont code for the paramter files, Sauter
also included several COM files for building sets of CM fonts. While
these would be useful under many circumstances, Sauter uses a
somewhat unorthodox manner of running Metafont: rather than creating
an extended base file with INIMF, he creates a different MF file for
for each fontat each magnification, which sets the magnification and
output device. Most TeX installers will find it more expedient to
simply create their own COM files for running batch jobs to create
fonts. Since these COM files don't really serve any other purpose and
aren't necessary for the use of his MF code, the package is more
system-independent than is indicated in the TUGboat article.
I have renamed Sauter's files to be unique in eight characters.
These files will hopefully be available from Listserv@Tamvm1 in the
near future. Meanwhile, if anybody wants a copy of the files, they
can send two formatted PC floppy disks with sufficient return postage
(or international reply coupons for non-U.S. requests) to me at
Platt Campus Center
Harvey Mudd College
Claremont, CA 91711
For copies of the MF files.
__11
**********************************************************************
* TeX mysteries and puzzles *
**********************************************************************
Solutions to both puzles were only submitted by Donald Arseneau
<ASND@TRIUMFER.BITNET>. Below are his answers:
I think the Singapore puzzle is impossible to solve well using TeX
alone. The problem, which crops up many times, is that *everything*
is a single stream of tokens, including both characters and formatting
commands. Thus it is hard to design a filter that can treat, for
example, periods or "pt" differently in N.A.S.A. launched \hbox to
22.5 pt{pt 109}. \Singapore has that same problem, in that it can
resubmit itself after single tokens (letters or csnames) but it
inserts itself in the middle of assignments or commands (macros or
primitives) with parameters. Thus the macro \Singapore can only be
used for text with quite simple macro calls, such as shown below.
It has a feature designed into it to allow more complex macro
calls though; such things can be enclosed in braces and they will
work. Moreover, text enclosed in braces is typeset in all roman.
%----------------Cut Here---------------------------------------------
%
%
\def\Singapore{\everyhbox{\Singapore}% If you want, and other \every's too.
\Sing}
\def\Sing\afterassignment\testtoken \let\singtoken= }
\def\testtoken{%
\ifcat\bgroup\singtoken \let\next=\continuesing
\else \ifcat\egroup\singtoken \let\next=\singtoken \let\singtoken=\relax
\else \let\next=\Sing \ifcat A\singtoken \otherfont \else \rm \fi
\fi\fi \singtoken \next}
%
\def\continuesing{\rm\aftergroup\Sing}
%
\def\otherit{\it\let\otherfont=\otherrm}
\def\otherrm{\ifhmode \/\fi\rm\let\otherfont=\otherit}
\let\otherfont=\otherit
%
T'was brillig and the slithy toves did gyre and gimble in the wabe;
all mimsey were the borogoves and the mome raths outgrabe.
{\Singapore
T'was {brillig} and the slithy toves did gyre and gimble in the wabe;
all mimsey were the {borogoves} and the mome raths outgrabe.
\smallskip %%% \smallskip is OK, \vskip\smallskipamount would DIE.
T'was brillig and the slithy toves did gyre and gimble in the wabe;
all mimsey were the {borogoves} and the mome raths outgrabe.
{\vskip 1cm %% OK because in braces}
{T'was} brillig {and the} slithy toves
{did} gyre {and} gimble {in the} wabe;
{all} mimsey {were the} borogoves {and the} mome raths outgrabe.
}
Yes, t'was brillig.
\bye
%----------------Cut Here---------------------------------------------
Now, his solution to the Bible puzzle:
%----------------Cut Here---------------------------------------------
% How to make a character that is discardable at a line break?...
% Hmmm, glue is discardable, but not boxes... hmmm... Hey, aren't
% leaders special glue? Yes and they are discardable!
%
% Put the character we want to separate verses with in a box:
\newbox\dotbox
\setbox\dotbox\hbox{$\cdot$}% Could use \bullet instead of \cdot
% if a number of type sizes/faces are being used, move the \setbox
% command just given into the \verse macro.
%
% \verse
%
% Define a macro to start each verse with. Use as shown below.
% (This macro is actually very short without the comments.)
\def\verse#1.{% no space here; include some space before \verse when typing.
\ifvmode\leavevmode\null % Can't use leaders at the beginning of a paragraph
\else
% ----- optional -----
% Want to put a goodbreak in to promote line breaks at verse boundaries.
% Unfortunately, a break at a penalty does not discard glue, so have to
% take care of it ourselves...
\skip255=\lastskip \unskip % remember, then get rid of, last skip
\penalty-50 % favors breaks between verses,
% choose a penalty to match the layout you are using.
\hskip\skip255\nobreak % Put skip back.
% ----- end option -----
% Now put in one dot using leaders, which are discardable:
\cleaders\copy\dotbox \hskip\wd\dotbox
% Alternatively, for a dot bigger than \cdot and smaller than
% \bullet but, unfortunately, square, use instead:
% \leaders\hrule height3.2pt depth-1.8pt \hskip 1.4pt
% Don't allow breaks after the dot, put in one space
\nobreak\
% do the marginal note and ignore extra spaces.
\fi \nobreak\marginalnote{#1}\nobreak\ignorespaces}
%
%
% Define a bogus \marginalnote macro fot the purposes of this puzzle:
\def\marginalnote#1{\vadjust{}}
%
%
%
\hsize=5in
\verse26. Now as they were eating, Jesus took some bread, and when he
had said the blessing he broke it and gave it to the disciples.
``Take it and eat''; he said, ``this is my body.''
\verse27. Then he took the cup, and when he had returned
thanks he gave it to them. ``Drink all of you from this,''
he said, \verse28. ``for this is my blood, the blood of the
covenant, which is to be poured out for many for the
forgiveness of sins.
\verse 29.From now on, I tell you, I shall not drink wine
until the day I drink the new wine with you in the kingdom
of my Father.''
\bye % Donald Arseneau (asnd@triumfcl.bitnet)
%----------------Cut Here---------------------------------------------
[[Editor's note: One other technique for inserting the dots is to use
the TeX primitive \discretionary.]]
__12
TeXMaG is an independantly published electronic magazine available
free of charge to all interested parties reachable by electronic
mail. It is published sporadicly, and the editor likes to think that
its monthly so the readers humor him. Subscription requests should
be sent to Don Hosek <DHOSEK@HMCVAX.BITNET> or send the following
message to LISTSERV@BYUADMIN: SUBS TEXMAG-L Your_Full_Name. European
subscribers may send the SUBS command to LISTSERV@DEARN, subscribers
on CDNnet should send subscription requests to
<list-request@ubc.csnet> (being sure to mention that they wish to
subscribe to TeXMaG), and JANET subscribers should send requests to
be added to the list to Peter Abbott, <ABBOTTP@UK.AC.ASTON.MAIL>.
Back issues are available for anonymous FTP in the file
BBD:TEXMAG.TXT on SCIENCE.UTAH.EDU. BITNET users may obtain back
issues from LISTSERV@TCSVM (in an interactive message or as the
first line of a mail file, send the command GET TEXMAG VvNn where v
is the volume number and n is the issue number), or from
UBSERVE@UBVMSC (in an interactive message, send the command SEND
TEXMAG.VvvvNnnn where vvv and nnn are as above). Janet users may
obtain back issues from Peter Abbott (e-mail address above) and
DECNET/SPAN users may obtain them from the Decnet repository (see
below). They may also be obtained from Don Hosek
<DHOSEK@HMCVAX.BITNET>. Article submissions, contributions for the
Toolbox, and letters to the editor are always welcome and should be
sent to <DHOSEK@HMCVAX.BITNET>.
Other publications of interest to TeX users are:
TeXHAX. Arpanet mailing list for persons with questions,
suggestions, etc.. about TeX, LaTeX, MetaFont and related programs.
Submissions for this list should be sent to
<TeXHAX@Score.Stanford.EDU>. Internet subscribers may subscribe by
sending a request to <TeXHAX-REQUEST@Score.Stanford.EDU>. JANET
subscribers should send subscription requests to
<texhax-request@uk.ac.ucl.cs.nss>. BITNET users may subscribe by
sending the following command (as an interactive message or as the
first line of a mail message) to LISTSERV@TAMVM1: SUBS TEX-L
your_full_name. The list is peer-linked to other listserves in the
United States and Europe. Australian users should send subscription
requests to <munnari!elz@uunet.uu.net> Japanese users should send
subscription requests to <takagi%icot.jp@relay.cs.net>. Back issues
are available by anonymous FTP from Score.Stanford.Edu and from
Listserv@Tamvm1 (in an interactive message or as the first line of a
mail file send the command GET TEXHAXnn yy where nn is the issue
number and yy are the last two digits of the year. Issues 100 and
above are namad TEXHAnnn yy)
Unix-TeX. Arpanet mailmng list specifically for users of TeX under
the Unix operating system. Submissions for this list should be sent
to <Unix-TeX@JUNE.CS.WASHINGTON.EDU>. Requests to be added or deleted
from the mailing list should be sent to
<Unix-TeX-Request@JUNE.CS.WASHINGTON.EDU>.
UKTeX. A U.K. version of TeXhax. To subscribe, send a note to Peter
Abbott at <info-tex-request@uk.ac.aston.mail>.
TeXline. A TeX newsletter edited by Malcolm Clark. To subscribe, send
a note to <texline@uk.ac.ic.cc.vaxa>.
TUGBoat. A publication by the TeX Users Group. An excellant reference
for TeX users. For more information about joining TUG and subscribing
to TUGBoat send (real) mail to:
TeX Users Group
c/o American Mathematical Society
P. O. Box 9506
Providence, RI 02940-9506, USA
LaTeX-style collection. A collection of LaTeX files is available for
FTP and mail access at cayuga.cs.rochester.edu. To obtain files via
FTP, login to cayuga.cs.rochester.edu (192.5.53.209) as anonymous,
password guest and go to the directory public/latex-style (where the
files are). The file 00index contains a brief description of current
directory contents. If your site does not have FTP access, you may
obtain files by mail by sending a message to
latex-style@cs.rochester.edu with the subject "@file request". The
first line of the body of the message should be an @. The second line
should contain a mail address from rochester TO you (for example, if
you are user@site.bitnet, the second line should be
user%site.bitnet@cunyvm.cuny.edu). The lines that follow should be
the filenames you desire and the last line should also contain only
an @.
LISTSERV@DHDURZ1 has file archives of interest to TeX users. Included
are the Beebe drivers and contents of the LaTeX style collection, as
well as some TeX macros. Many files are available only in German.
LISTSERV@TAMVM1 also has file archives that may be of interest to TeX
users on BITNET, including the files from the Score.Stanford.EDU FTP
directories and back issues of TeXHAX. For a list of files available,
send the following command to LISTSERV@TAMVM1: GET TeX FILELIST.
DECNET. There is a TeX file collection on DECnet accessible from
DECnet and SPAN. Available files include the Beebe DVI drivers, the
LaTeX style collection, and back issues of TeXhax, TeXMag, and UKTeX.
For more information, contact Marisa Luvisetto (DECNET:
<39947::luvisetto>, Bitnet: <LUVISETTO@IBOINFN.BITNET>) or Massimo
Calvani <CALVANI@VAXFPD.INFNET> U.S. Users should contact Ed Bell
<7388::Bell>
JANET. Peter Abbott keeps an archive of TeX-related files available
for FTP access. For more information send mail to
<Abbottp@Uk.Ac.Aston.Mail>.
Special thanks to those who contributed to this issue, Carol King,
Chris Yoder, and Heather Sherman.
Character code reference:
Upper case letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ
Lower case letters: abcdefghijklmnopqrstuvwxyz
Digits: 0123456789
Square, curly, angle braces, parentheses: [] {} <> ()
Backslash, slash, vertical bar: \ / |
Punctuation: . ? ! , : ;
Underscore, hyphen, equals sign: _ - =
Quotes--right left double: ' ` "
"at", "number" "dollar", "percent", "and": @ # $ % &
"hat", "star", "plus", "tilde": ^ * + ~
|