******************************************************************************* * * * 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 . __5 ********************************************************************** * Letters to the Editor * ********************************************************************** Date: 14 May 1988 From: Michael Barr 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 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 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" 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 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 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 [[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 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 '&l1H'. The file 'lower.hp' contains '&l4H'. The file 'envelope.hp' contains 'E&l1O&l3h38E&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 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 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 . 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 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 (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, . 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 . Article submissions, contributions for the Toolbox, and letters to the editor are always welcome and should be sent to . 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 . Internet subscribers may subscribe by sending a request to . JANET subscribers should send subscription requests to . 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 Japanese users should send subscription requests to . 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 . Requests to be added or deleted from the mailing list should be sent to . UKTeX. A U.K. version of TeXhax. To subscribe, send a note to Peter Abbott at . TeXline. A TeX newsletter edited by Malcolm Clark. To subscribe, send a note to . 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: ) or Massimo Calvani 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 . 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": ^ * + ~