% BEST OF TEXHAX notes for TeXline % by Sebastian Rahtz % Malcolm - i am unused to plain TeX, and have quickly hacked together % some macros. please feel free to redo at will. wish I was back in % LaTeX..... %--------------------------------------------------------------------- % program quoting macros % \def\UncatcodeSpecials{\def\do##1{\catcode`##1=12 }\dospecials} {\begingroup\obeyspaces\catcode`\ =13\endgroup} % \def\SetupVerbatim{\tt\def\par{\leavevmode\endgraf}\catcode`\`=\active \obeylines\UncatcodeSpecials \obeyspaces\catcode`\ =13} {\catcode`\`=\active \gdef`{\relax\lq}} % \def\program{\begingroup\parindent=0em\par \SetupVerbatim\xprogram} \begingroup \catcode`\|=0 \catcode`\\=12 |obeylines|gdef|xprogram#1\endprogram{#1|endgroup|vskip 10pt|parindent=0em|par} |endgroup % % miscellaneous \parindent=1em \def\and{\item{$\bullet$}} \def\sq{\smallskip\begingroup\leftskip=3em\noindent \sf\parindent=0em\parskip=2pt} \def\eq{\smallskip\hrule\smallskip \parindent=1em\parskip=0pt\leftskip=0em\endgroup} \def\bs{$\backslash$} % % names \def\ps{{\sc PostScript}} \font\mf=logo10 \hyphenchar\mf=-1 \def\LaTeX{{\rm L\kern-.36em\raise.3ex\hbox{\sc a}\kern-.15em T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}} \font\sc=cmcsc10 \font\sf=cmss10 \def\texline{\TeX line} \def\hax{\TeX{\sc hax}} \def\metafont{{\mf METAFONT}} \def\amstex{$\cal A$\kern-.1667em\lower.5ex\hbox{$\cal M$}\kern-.125em $\cal S$-\TeX} \def\bibtex{{\sc Bib}\TeX} \def\slitex{{\sc Sli}\TeX} %------------------------------------------- \centerline{\bf Best of \hax, Summer 87} \centerline{\it Sebastian Rahtz, Department of Electronics and Computer Science, University of Southampton} \medskip Those readers of \texline\ who are not daily users of electronic mail, and/or use \TeX\ primarily on micros, may not be aware of the existence of the \hax\ mailing list, which exists to share information around the international \TeX\ community. It is distributed from the University of Stanford under the editorship of Malcolm Brown, and uses a digest format; Malcolm stores incoming mail (requests for information, news of new products, replies to other questions, `official' communications from TUG in advance of TUGboat) until it reaches critical mass, then bundles it together with a list of contents and sends it to everyone on the \hax\ list. Typically, this happens two or three times a week, and each issue contains about a dozen contributions, which means that a vast amount of \TeX -related material is flitting across the networks all the time. The purpose of this article is to describe the range of \TeX ery covered in \hax, and to reprint some of the more interesting topics. Readers who wish to join in this activity (be prepared for a lot of browsing of mail messages!) must have an account on their local mainframe or mini with access to network mail (consult your local guru); send mail to {\tt texhax-request\%uk.ac.ucl.cs} and ask that your name be put on the list to receive \hax\ (don't forget to tell them your own mail address). As things stand at the moment, this international mail will not cost you anything, as one copy is sent to London and forwarded to you from there. \hax\ is read by a very large number of people, to judge by contributions, from America, Canada, Britain, Europe, Japan, Australia etc. Leslie Lamport is a regular contributor with answers to \LaTeX\ problems, Barbara Beeton monitors it for TUG, and even Donald Knuth adds the occasional note. It is a good place to send an esoteric question, as usually someone with an unpronounceable name from an institution you have never heard of will send in an answer. If you want a more local answer (`who has got a copy of xxx in Britain?'), there is a UK version of \hax, recently set up by Peter Abbott at Aston, to bring together specifically UK \TeX xies---mail to {\tt abbott@uk.ac.aston.mail} to get on that list. For the purpose of this article, I have looked at the 36 issues of \hax\ that reached me between May 22nd and September 6th (an average of about two a week). There were approximately 480 contributions dealing with every sort of \TeX\ arcana; just searching the subject fields (not necessarily a proper reflection of contents), I found 129 pieces relating to \LaTeX\ (including 22 sets of {\it \LaTeX\ Notes} from Leslie Lamport), 14 pieces on \bibtex, 11 on \metafont, 6 on \slitex, and just 1 on \amstex. My subjective impression is that \LaTeX\ matters are an even higher proportion of \hax\ even than appears from these figures. In general, contributions vary from the questions about hardware (usually printers), to the private life of \TeX\ macros, as evinced in the following two excerpts: {\sq Date: 09 Jun 87 15:11:35 ADT Subject: Font tapes for IBM 4250 >From: MIKEMAC\%UNBMVS1.BITNET@forsythe.stanford.edu My order for the IBM 4250 font tapes just came back with ``I no longer have a font tape for the 4250 printer. The person who supplied it to me originally has not made another one for version 2 of TeX." Where can I get one of these tapes? What's the difference between V1.01(the one she doesn't have) and 2? Will they still work? \eq} and {\sq Date: Wed, 5 Aug 87 20:27:30 CDT >From: ``Douglas N. Arnold"$<$arnold\%s1.ima.umn.edu@umn-cs.cs.umn.edu$>$ Subject: TeX eats l's after fil If an `l' or and `L' follows a unit of glue such as `fil', even separated by spaces, it is aparently parsed as part of the name of the unit. This leads to some fairly strange behavior. For example, the following script will put a `K' and a `M' in the dvi file, but no `L'! \program \def\q#1{\hskip 0 pt plus 0 fil #1} \q{K}\q{L}\q{M} \end \endprogram I know that TeX has no bugs ... but is it really supposed to do this? -- Doug Arnold na.arnold@score.stanford.edu = arnold\%s1.ima.umn.edu@umn-cs.arpa \%\% Barbara Beeton responds: Date: Wed 5 Aug 87 20:25:06-PDT >From: Barbara Beeton$<$BEETON@Score.Stanford.EDU$>$ Subject: Re: TeX eats l's after fil the ``l"-gobbling you've encountered is legitimate, and easily explained. the full syntax of \bs hskip is \program \hskip plus minus \endprogram since your example didn't include a ``minus", tex keeps looking. since ``fil" is a ``pseudo-dimension" it can continue, up to 3 ``l"s (if your data had been ``llama", all you would have gotten in the output would have been ``ama"). similarly, if the data had started with the word ``minus", not followed by a proper$<$dimen$>$, minus would have been gobbled and you probably would have gotten a nasty message to the effect that a$<$dimen$>$ was expected, and 0pt will be assumed. the best way to avoid this is to put \relax after your skip expression. this is covered explicitly in the texbook; look it up in the index (page 469): ``l after fil". -- barbara beeton \eq} Sometimes \hax\ gets onto a general issue---there have been discussions over the last year on such questions as: { \and Can University authorities be persuaded to drop their `double-spaced Courier' thesis requirements for students who have access to a proper typesetting system like \TeX? \and What freedom should \LaTeX\ users have to tinker with the layout? Leslie Lamport feels strongly that only experienced document designers should be able to alter e.g. the font used in a running head. \and Can a consistent set of standards for dvi drivers be put together? What facilities should they have? How do you handle \bs specials? This question was addressed in detail at the TUG meeting in August, and a committee was set up to look into it. \and What is the relationship of \ps\ to \TeX? Lamport suggested \TeX\ be changed to output pure \ps, others defend their LN03s to the death. } Usually, of course, \hax\ is question and answer; here are some random selections of items that should give a general flavour of what happens on a daily basis: {\sq Date: Wed, 13 May 87 08:33 EDT Subject: have you had problems with Metafont? From: Chris Lindblad $<$CJL@REAGAN.AI.MIT.EDU$>$ I'm having problems with some broken screen-resolution fonts. Metafont as standardly configured produces garbage font files for some fonts that are smaller than 10pt at 80 dpi, and I don't know how to hack Metafont parameters to fix it. The GF files that metafont produces causes GFtoPXL to blow up, resulting with PXL files that are totally unreadable. So I'm trying to frob with Metafont a little each day in some of my free time to try to get it to do something reasonable. The problem is that I don't understand anything about it, so I'm not getting anywhere. The fonts that I have generated at 118 dots per inch that we use with the dvitool SUN TeX previewer program that Jeff McCarrel wrote get pretty bad at small point sizes. 80 dots per inch must look really awful. I tried generating something at 80 dots per inch and like Chris I had problems, but different ones; metafont stopped 2 times with a ``strange path (turning number is zero)" error in the file romanp.mf when I tried to run it on cmr8.mf with the following mode: \program % previewlow mode: for Textset previewer at lowest resolution mode_def previewlow = % for Textset previewer at lowest resolution proofing := 0; % no, we're not making proofs fontmaking := 1; % yes, we are making a font tracingtitles := 0; % no, don't show titles pixels_per_inch := 80; % really REALLY lowres blacker := 0.65; % make the pens a bit blacker fillin := 0.2; % compensate for diagonal fillin o_correction := 0.4; % don't overshoot as much enddef; \endprogram I just hit return twice and then it finished up with no more complaints and gftopxl and gftopk didn't have any problems with the gf resulting file. \eq} {\sq Date: Fri 12 Jun 87 14:33:02-EDT >From: John Gourlay $<$GOURLAY-J\%OSU-20@ohio-state.ARPA$>$ Subject: Pic-like software for TeX John Renner, a former student of mine now at Adobe, has written a program called TeXtyl to allow TeX users to draw lines and curves in their documents. It's actually a postprocessor: one runs TeX on an input file containing \bs specials that define a drawing, and then runs TeXtyl on the dvi file to obtain a new dvi file in which the \bs specials are replaced with dvi commands to print the lines and curves by piecing together small characters from special fonts. It's in the public domain, but contact John (adobe!renner@decwrl.dec.com) for details. \eq} {\sq Date: Wed, 17 Jun 87 14:59:51 EDT >From: phr@PREP.AI.MIT.EDU (Paul Rubin) Subject: tex macro for reference cards The GNU Emacs reference card is typeset using some TeX macros designed specifically for setting reference cards. It is distributed as the file "etc/refcard.tex" with GNU Emacs, which you can ftp from the usual places. \eq} {\sq Date: Fri, 19 Jun 87 12:34:01 edt >From: clayton@lavalamp (R. Clayton) Subject: Spreading the word Anita Cochran recently asked for a macro that evenly spaces letters in an hbox with the end letters flush against the sides. The following macros should do: \program \def \dolist {\afterassignment\dodolist \let\next=} \def \dodolist {\ifx \next \endlist \let \next \relax \else \\ \let\next\dolist \fi \next} \def \endlist {\endlist} \def \\ {\next\hfil } \def \spreadem#1#2{\hbox to #1{\dolist #2\endlist\hfilneg}} \spreadem{2.0 in}{spread} \spreadem{1.5 in}{the} \spreadem{1.0 in}{word} \bye \endprogram These macros were adopted from the macros given as the solution to problem 11.5 in the TEXbook. The idea is to stick an \bs hfil after every letter (token) in the word (argument). The glue after the final letter causes the word to be ``ragged-right" in the box; this is fixed by canceling the glue with an \bs hfilneg. \eq} {\sq Date: Fri, 19 Jun 87 13:27 EST >From: $<$JWS\%PSUARLC.BITNET@forsythe.stanford.edu$>$ Subject: WEB for Ada? Is there a version of WEB that accepts the Ada language? Thanks, Jack Sharer, JWS@PSUARLC \eq} {\sq Date: Fri, 24 Jul 87 18:07 PDT >From: $<$ASND\%TRIUMFCL.BITNET@forsythe.stanford.edu$>$ Subject: Typesetting chemical papers Like Th. Kneser, I also needed chemical equilibrium symbols and came up with the following, which may be useful. Note that these are for plain TeX and for chemical equations that are being typeset in Roman. \program % Definitions and stuff for chemistry, equilibrium symbols : % \eq}bm -- unlabeled equilibrium (longer than harpoons) % \eq}bmlab~#1_#2 -- long equilibrium sign with forward (#1) and backward (#2) % labels % \yields -- long right arrow % \yieldslab~#1 -- `` `` `` with a label above (#1) % To typeset chemical equations, % type \rm just after the $ or $$. Also, when using \eq}align or % \eq}aligno, type \cr\rm wherever you would normally type \cr. % The labels on \eq}bmlab and \yieldslab come out in italic automatically % (use \rm to get roman). Elsewhere, italicize variables like K_W or N_0 % using \cit. % \def\cit{\fam=-1} \% Chemistry ITalic \def\longrharpup{\relbar\joinrel\rightharpoonup} \def\longlharpdn{\leftharpoondown\joinrel\relbar} \def\rlPOON#1{\vcenter{\hbox{\ooalign{\raise2.3pt \hbox{$#1\longrharpup$}\crcr $#1\longlharpdn$}}}} \def\eq}bm{\mathrel{\mathpalette\rlPOON{}}\rm} \def\eq}bmlab~#1_#2{\mathrel{\mathop{\eqbm}\limits~{#1}_{#2}}\rm} \def\yields{\longrightarrow\rm} \def\yieldslab~#1{\mathrel{\mathop{\longrightarrow}\limits~{#1}} \rm} \endprogram To make subscripts come out aligned I have put (for example) \program \fontdimen16\twelvesymboltext=3.24pt \fontdimen17\twelvesymboltext=3.24pt \fontdimen16\twelvesymbolscript=2.65pt \fontdimen17\twelvesymbolscript=2.65pt \endprogram in with my font definitions following the example of the TeXbook p.179. These 12 pt numbers were determined by trial and eye...leading to a question of my own: How can I look at the font parameters for an arbitrary font and determine the proper font dimensions to make chemical subscripts all come out aligned? Or, Has someone determined the numbers already? Donald (asnd@triumfcl.bitnet or userasnd@ubcmtsg.bitnet) \eq} One common feature of \hax\ is the swopping of style files for \LaTeX. For those who are not aware of it, here is the latest description of the Rochester \LaTeX\ style file collection: {\sq Subject: Contents of LaTeX style collection, 2nd August 1987 Date: Sun, 02 Aug 87 14:03:33 -0400 From: Ken Yap $<$ken@cs.rochester.edu$>$ The LaTeX style collection now has the files listed below. More submissions are very welcome. { \settabs 3 \columns \+ 00directory&format.sty&slem.doc \cr \+ 00index&fullpage.doc&slem.sty \cr \+ 00readme&fullpage.sty&spacecites.doc \cr \+ a4.sty&geophysics.sty&spacecites.sty \cr \+ a4wide.sty&german.sty&suthesis.doc \cr \+ aaai-instructions.tex&ieeetr.bst&suthesis.sty \cr \+ aaai-named.bst&ist21.sty&texindex.doc \cr \+ aaai.sty&latex.bug&texindex.pas \cr \+ acm.bst&layout.readme&texindex.sty \cr \+ agugrl.sample&layout.tex&texnames.doc \cr \+ agugrl.sty&lcustom.tex&texnames.sty \cr \+ agujgr.sample&lfonts\_ams.readme&textyl.readme \cr \+ agujgr.sty&lfonts\_ams.tex&textyl.shar1 \cr \+ amssymbols.sty&lgraph.shar&textyl.shar2 \cr \+ art10.txt&local.suppl&textyl.shar3 \cr \+ art11.txt&memo.sty&textyl.shar4 \cr \+ art12.txt&mfr.sty&textyl.shar5 \cr \+ article.txt&mitthesis.sample&textyl.shar6 \cr \+ biihead.sty&mitthesis.sty&textyl.shar7 \cr \+ ctex.readme&natsci.bst&textyl.shar8 \cr \+ ctex.shar1&newalpha.bst&textyl.shar9 \cr \+ ctex.shar2&nopagenumbers.doc&tgrind.sty \cr \+ ctex.shar3&nopagenumbers.sty&threepart.sty \cr \+ ctex.shar4&remark.sty&titlepage.txt \cr \+ ctex.shar5&resume.sample&trademark.sty \cr \+ ctex.shar6&resume.sty&uct10.doc \cr \+ cyrillic.sty&sc21-wg1.sty&uct11.doc \cr \+ dayofweek.tex&sc21.sty&uct12.doc \cr \+ deproc.sty&sfwmac.sty&ucthesis.doc \cr \+ deprocldc.tex&showlabels.sty&ucthesis.readme \cr \+ docsty.c&siam.bib&uuencode.shar \cr \+ docsty.readme&siam.bst&vdm.doc \cr \+ doublespace.sty&siam.doc&vdm.sty \cr \+ draft.sty&siam.sty&vdm.tex \cr \+ drafthead.sty&siam.tex&ws87.p \cr \+ dvidoc.shar1&siam10.doc&wsltex.c \cr \+ dvidoc.shar2&siam10.sty&wsltex.p \cr \+ epic.shar1&siam11.sty&xxxcustom.tex \cr \+ epic.shar2&siam12.sty&xxxslides.sty \cr } 1. For Internet users - how to ftp: Here is an example session. Disclaimer: ftp syntax varies from host to host. Your syntax may be different. The syntax presented here is that of Unix ftp. Comments in parentheses. \program % ftp cayuga.cs.rochester.edu (a.k.a. cs.rochester.edu, a.k.a. 192.5.53.209) ... (general blurb) user: anonymous password: ftp> cd public/latex-style (where the files are) ftp> ls (to see what is there) ... (lots of output) ftp> get 00index ... (more blurb) ftp> quit \endprogram 2. Non-Internet users - how to retrieve by mail: An archive server has been installed. Send a piece of mail to LaTeX-Style (@rochester.arpa, @cs.rochester.edu, via uucp or your favourite gateway) in the following format: Subject line should contain the phrase ``@file request". Body of the mail should start with a line containing only an @ (at) sign. The first line following should be a mail address FROM rochester TO [B you. Then follow by the names of the files you want, either one to each line, or many to each line, separated by spaces. End with a line containing only an @ sign. Case is not significant. For example, if you are user at site.bitnet, this is what you should send: \program To: latex-style@rochester.arpa Subject: @file request @ user%site.bitnet@wiscvm.wisc.edu (don't forget your address!) 00readme 00index @ \endprogram Caveat: our mailer is pretty ignorant of BITNET, CSNET or UUCP addresses unless they are in registered domains. It is best that you supply explicit gateway routes. Also use the new domainized form of addresses whenever possible because the old .ARPA addresses are fading away. \program user%site.bitnet@wiscvm.wisc.edu user%site.csnet@relay.cs.net (not csnet-relay.arpa anymore) site!user@seismo.css.gov (not seismo.arpa anymore) \endprogram Long UUCP paths are discouraged. System administrators get upset and your turnaround is very slow anyway. Do not include any messages in the mail. It will not be seen by human eyes. Be patient as the server is actually a batch program run once a day. Files will be sent in batches, each not exceeding 100kbytes in size. 3. IBM PC and clone users - how to get a distribution: David Hopper of Toronto, Canada is offering copies of the style collection on diskettes. This is not a commercial enterprise. David is doing this in his own time as a favour to the TeX community. The entire set of style files, not including the C-TeX files, as of June 1st, fits on one 1.2 MB diskette or three 360KB diskettes. No subsetting, please. Send David \item{ 1.} Formatted diskettes, \item{2.} Indication of the format required, \item{3.} A self-addressed mailer, and \item{4.} A \$5.00 donation per set of files, to cover postage and equipment wear \& tear. (If you live outside North America, airmail delivery will probably require more postage. You should probably contact David for details.) David's address: {\it David W. Hopper, 446 Main Street, Toronto, Ontario, Canada M4C 4Y2 } Thanks, David. Ken LaTeX-Style@Rochester.Arpa LaTeX-Style@cs.Rochester.Edu ..!rochester!latex-style \eq} \bye