TeXhax Digest Saturday, April 22, 1989 Volume 89 : Issue 38 Moderators: Tiina Modisett and Pierre MacKay %% The TeXhax digest is brought to you as a service of the TeX Users Group %%% %% in cooperation with the UnixTeX distribution service at the %%% %% University of Washington %%% Today's Topics: Needed: Pictures of past TUG meeting participants Needed: Postscript/LaTeX-generating drawing program Re: PROFILE on VMS--testers needed Re: problem with the eqnarray environment Needed: a macro which would= \input on a portion of a file Re: Linear system macros Re: Nested Conditionals Re: Version 2.95 of TeX vs. 2.93 A warning for TeX implementors Problem: Defining non-ASCII characters for TeX/LaTeX TeX for OS/2 Newsletter macros for TeX What after TeX, and, Book: "TeX in Practice" Needed: mode_def's for LaserWriter NTX Problem with the screen previewer for VT100 terminals ----------------------------------------------------------------------------- Date: Mon, 17 Apr 89 11:49 PDT From: DLATEX%UCBCMSA.BITNET@UWAVM.ACS.WASHINGTON.EDU Subject: Needed: Pictures of past TUG meeting participants Keywords: general We are currently looking for pictures of past TUG meeting participants to be included in this year's tenth anniversary program. Since this is the tenth anniversary bash, we are hoping to spice up the program with some photos of past (and present) TUG members. We would like prints and negatives. Make sure to label them with your name and address (somewhere) so we can return them to you. If there are any questions about this, please contact the TeX Users Group in Providence, RI at (401) 751-7760. Thanks. Doug Henderson (on behalf of the) TeX Users Group P.O Box 9506 Providence, RI 02940 --------------------------------------------------------------------------- Date: Sun, 16 Apr 89 14:37 EST From: Henning Schulzrinne Subject: Needed: Postscript/LaTeX-generating drawing program Keywords: PostScript, LaTeX, VMS, Ultrix, IBM PC I am looking for a program that allows interactive (!) generation of line drawings on a VAX workstation (VMS or Ultrix) or IBM PC, akin to MacDraw or MacDraft, and produces either Postscript or LaTeX-picture commands (or anything else suitable for integration with LaTeX). Thanks in advance. Henning Schulzrinne Department of Electrical and Computer Engineering University of Massachusetts at Amherst Amherst, MA 01003 USA phone: (413) 545-3179 (EST) FAX: (413) 545-0724 CS/Arpanet: HGSCHULZ@CS.UMASS.EDU -------------------------------------------------------------------------- Date: Sun, 16 Apr 89 14:05:48 BST From: Dr R M Damerell (RHBNC) Subject: Re: PROFILE on VMS--testers needed Keywords: PROFILE, VMS The last tape I got from Stanford (a long time ago) had a program called Profile, written by Knuth. It produces an execution profile for a PAscal program by reading the code and making reasonable assumptions on how it might execute on a typical machine. I have adapted it to work (on at least one occasion) on VMS. Are there any VMS users out there interested in trying it & reporting bugs? Mark -------------------------------------------------------------------------- Date: SAT 15 APR 1989 15:07:00 EST From: INHB000 Subject: Re: problem with the eqnarray environment Keywords: TeX, eqnarray I have noticed a problem: all the transmissions from you have the braces deleted. You will see the missing braces in the \begin and \end{eqnarray} below that I copied exactly from what I rec'd. I have had the same problem in sending, but not receiving memos from a correspondent at the University of Tennessee. While looking through this issue, I noticed the following from Lamport: > Amitabh Shah wants to type > > \begin eqnarray > \left[ ... \\ > ... \right] > \end eqnarray > > Unfortunately, \left and \right must come in matching pairs within a > single formula. An eqnarray environment consists of a sequence > of equations, each of which consists of three separate formulas. > > To make delimiters that span multiple lines, one needs to use > struts (to get TeX to make big delimiters) and \raisebox (to > position them vertically and make TeX think that they aren't > very big). Might I suggest an alternative, illustrated by this somewhat silly example: \begin{eqnarray*} \left[\sum_{l\le i\le m\atop m\le j \le n}\int_0^1{f(x)\,dx\over sin^2x}\right.\\ \left.\vphantom{\sum_{l\le i\le m\atop m\le j \le n}\int_0^1{f(x)\,dx\over sin^2x}}\Theta(x)\right]&=&0 \end{eqnarray*} Although the use of \left. doesn't appear to be explicitly mentioned anywwhere, it does work. Although the results in that example look dreadful, but it is what is wanted. Michael Barr ----------------------------------------------------------------------------- Date: Mon, 17 Apr 89 16:27:45 CDT From: Don Hosek Subject: Needed: a macro which would= \input on a portion of a file Keywords: macro, TeX, \input Has anybody ever written a macro that would produce the equivalent of \input using a subset of lines on a file? I'd like to input TeX and verbatim input from a subset of a file and want to keep myself from re-inventing the wheel. What I have in mind is suppose I have the following input file: \today\ is an exciting day. Yes it is \TeX\ is fun. Yes it is. Typing \Verbfile[2-4] should produce Yes it is \TeX\ is fun. Yes it is. while \Input[1-3] should produce April 17 is an exciting day. Yes it is TeX is fun. Any ideas? dh Don Hosek Internet: U33297@UICVM.UIC.EDU 3916 Elmwood Bitnet: U33297@UICVM.BITNET Stickney, IL 60402 DHOSEK@YMIR.BITNET Work: 312-996-2981 UUNet: dhosek@jarthur.claremont.edu JANET: U33297%UICVM.UIC.EDU@UK.AC.EARN-RELAY ------------------------------------------------------------------------- Date: Sat, 15 Apr 89 00:55 PDT From: Subject: Re: Linear system macros Keywords: macro, TeX, linear systems Jim Hefferon wanted a macro for aligning linear systems. I sent him a copy of what I had been using, but then did some investigating and found out that the `slow' way I had avoided was actually faster! So here is my new macro, \polyalignno. The syntax is: \polyalignno {}{} where is any number of: = [[ & & ]] \\ where the contents of [[ ]] are repeated times, and = math that will be right justified (e.g., 2y) = math that will be left justified (e.g., +,-,=) are one of: \eqno{ } \eqno{ }\polylabel{ } \leqno{ } &text The \\ may be omitted from the final line. Generally, is the number of variables in the system. See the examples below to make sense of this syntax. If the equations or the labels are very wide, they may overlap each other, unless the &text option is taken for the labelling; but then the equations will not be exactly centered on the page. If there aren't enough entries in a row that needs a label, fill with enough &'s to get to the label column. % - - - - - - - - - TeX stuff - - - - - - \catcode`@=11 \def\polyeqno#1{\llap{\@lign$#1$}} \def\polylabel#1{\kern-\displaywidth\rlap{\@lign$#1$}\kern\displaywidth} \newtoks\Pr@@mble \newcount\tempc@unt \def\polyalignno#1#2{\tempc@unt=#1\relax\Pr@@mble={}% \def\eqno{&\polyeqno}\def\leqno{&\polylabel}% See note below %%\def\manyands{}% See note below %%\def\eqno{\manyands\polyeqno}\def\leqno{\manyands\polylabel}% See note below \loop \Pr@@mble=\expandafter{\the\Pr@@mble &$\@lign\displaystyle{{}####{}}$\hfil&\hfil$\@lign\displaystyle{####}$}% %% \edef\manyands{\manyands&&} % See note below \advance\tempc@unt-1 \ifnum\tempc@unt>0 \repeat \let\\\cr \displ@y \tabskip \centering \halign to\displaywidth {\tabskip\z@skip \hfil$\@lign\displaystyle{##}$% \span\the\Pr@@mble \tabskip\centering &% %&% See note below \tabskip\z@skip##\crcr #2\crcr}} % Note below: % You will note that a premature \eqno or \leqno ruins the alignment. % This can be fixed by using \manyands instead of a single & in the % definitions of \eqno and \leqno, inserting definitions for \manyands, % and doubling the final & (to &&) in the alignment template. Although % these changes slow down processing a bit, I favor them for the convenience % of not having to pad with & & & & ... \catcode`@=12 % % -------- Examples ------------ % \def\\{$\backslash$} Test with constant on left, and one label on the left. Note how a premature \\\\ is OK\dots $$ \polyalignno3{ 99&=& 17x&+& 7y&-&2z\\ 9&=&117x&-& 2y&-&z\leqno{1.0}\\ 33&=& 3x&+&77y\\} $$ \dots but a premature \\eqno is wrong. $$ \polyalignno3{ 99&=& 17x&+& 7y&-&2z\\ 9&=&117x&-& 2y\eqno{\rm ERROR}\\ 33&=& 3x&+&77y\\} $$ unless the changes commented out are made. Test with constant on left, numbers on right, and a label for the lot. $$ \polyalignno3{ 99&=& 17x&+& 7y&-&2z\eqno{1.1a}\\ 9&=&117x&-& 2y&-&z\eqno{1.1b}\polylabel{1.1}\\ 33&=& 3x&+&77y& &\eqno{1.1c}} $$ Try again with constants left justified on the right, and with left equation numbers. $$ \polyalignno3{ 17x&+&7y&-&2z&=6&\leqno{1.2a}\\ 117x&-&2y&-&z&=-2&\leqno{1.2b}\\ 3x &+&77y&&&=12&\leqno{1.2c}\\} $$ And finally with right justified constants on the right. $$ \polyalignno3{ 17x&+&7y&-&2z&=&6\eqno{1.3a}\\ 117x&-&2y&-&z&=&-2\eqno{1.3b}\\ 3x &+&77y&&&=&12\eqno{1.3c}\\} $$ and finished. \bye % - - - - - - - - - - - - - - - - - - - - - - - % Donald Arseneau % asnd@triumfcl.bitnet ----------------------------------------------------------------------------- Date: Mon, 17 Apr 89 17:36:50 CDT From: svb@cssun.tamu.edu (Stephan v. Bechtolsheim) Subject: Re: Nested Conditionals Keywords: TeX, nested conditionals Prof. Knuth was the only one who came up with a serious answer (if you don't remember the problem, skip this note): Define the macro \ifMyConditional as follows (actually define \MyConditional and then call it as \if\MyConditional): \def\MyConditional{% TT\fi Some compuations including a \let\ifResult = \iftrue or \iffalse. \ifResult } Now lok at the nested conditional: \if... % 1. .... \if\MyConditional ... \else ... \fi \fi If 1. evaluates to true the \if\MyConditional expands to \if TT\fi .... and that first \if is neutralized through the \fi right after TT. Then later, of course, \ifResult will be evaluated matching the \else and \fi as desired. If 1. evaluates to false, just look at it how nicely it works. \if is a conditional which is recognized as such and skipped. Clean, neat, simple. Stephan ------------------------------------------------------------------------------ Date: Sun, 16 Apr 89 18:13:06 +0200 From: fj@iesd.dk (Frank Jensen) Subject: Re: Version 2.95 of TeX vs. 2.93 Keywords: TeX In TeXhax V89 #23, Kurt Lidl asked about benefits of upgrading to TeX v2.95. The moderators' note was: > %%% Moderators' note: Almost all the recent changes to TeX have to > %%% do with the behavior of the program when it is abruptly terminated > %%% under extraordinary conditions. The changes don't affect the > %%% general functionality vary much if at all. I have just compiled TeX v2.95 (and Metafont v1.7) on a Sun 3/60 runnning SunOS 3.5. The above note made me wonder what the new behavior was, so I made some tests. 1) When I type ^D (control-D) in response to TeX's `**' prompt, it responds with: ! End of file on the terminal... why? (but not followed by a newline character) The Metafont response is similar, except that the newline character is not missing. So far so good, this is what it used to be! 2) Then I tried to type a ^D in response to TeX's `*' prompt. The response certainly was a dramatic change of the usual behavior: TeX enters an infinite loop! This loop is not so easy to terminate (you have to kill the TeX process somehow, and ^C is not sufficient!) (Note: TeX also enters an infinite loop if it can't find a certain file, and you type a ^D in response to TeX's request for another file name.) If the behavior indicated by the last test is the only `benefit' I get by upgrading to v2.95, then I don't think I'm going to install this version! (I liked much more the old behavior when TeX just said ``! Emergency stop.'' and then terminated) What was the reasons for changing this behavior? (Of course, the infinite loop was not intended!!!?) Frank Jensen, fj@iesd.dk Department of Mathematics and Computer Science Aalborg University DENMARK %%%Moderators' note: The changes, though some of them were undertaken as a result of behaviour noted in the Unix environment, were introduced by Donald Knuth with a view to certain questions of system independence. I suppose we could restore the use of ^D through the Unix change file, but it would make Unix behaviour a little extra bit different from that elsewhere, where TeX will demand an input file (null.tex). As you say, the loop was definitely not intended. That is what was cured in 2.98. For now, avoid ^D. ----------------------------------------------------------------------- Date: Tue, 18 Apr 89 21:11:07 BST From: Chris Thompson Subject: A warning for TeX implementors Keywords: TeX If there are other implementors who use |selector=new_string|, or otherwise build a string in |str_pool|, as part of an implementation of the 'E' response to an error prompt: don't assume that the current string is initially empty (I did). If the error occurs while reading a `file name', it won't be: e.g. \input wombat\foobar % \foobar undefined (Compare official fixes #339 and #342.) Chris Thompson JANET: cet1@uk.ac.cam.phx ARPA: cet1%phx.cam.ac.uk@nsfnet-relay.ac.uk ------------------------------------------------------------------------ Date: 16 Apr 89 21:36 +0100 From: Ole Brevik Subject: Problem: Defining non-ASCII characters for TeX/LaTeX Keywords: TeX, LaTeX, ASCII I want to define the nonstandard (non-ASCII) characters on my keyboard (digital VT220 terminal) for use with TeX/LaTeX. I have read the TeXbook over and over again, but all my trials result in errors or failures. This is what I try to add as a "local modification" to LPLAIN. (The characters f,x and e looks like lowercase norwegian letters on my terminal screen...). %------------------------------------------------------------------------------ \catcode`\f=11 \def\f{\ae} \catcode`\F=11 \def\F{\AE} \catcode`\x=11 \def\x{\o} \catcode`\X=11 \def\X{\O} \catcode`\e=11 \def\e{\aa} \catcode`\E=11 \def\E{\AA} \uccode `f=`F \uccode `F=`F \uccode `x=`X \uccode `X=`X \uccode `e=`E \uccode `E=`E \lccode `F=`f \lccode `f=`f \lccode `X=`x \lccode `x=`x \lccode `E=`e \lccode `e=`e \sfcode`f=999 \sfcode`F=999 \sfcode`x=999 \sfcode`X=999 \sfcode`e=999 \sfcode`E=999 %------------------------------------------------------------------------------ INITEX accepts it, but the result is that all my norwegian letters end up looking like $\Lambda$, and that was not the idea... (I guess that what I do above is defining the control characters \F, \X, ... to {\AE}, {\O},... --- but what I want is to type f and get the same result as if I had written {\ae}.) I would be very happy if someone could tell me what I should do instead (please send answer to the address below), to define non-ASCII characters (like the norwegian letters) for TeX/LaTeX. : Ole Andre Brevik EAN address: : : Department of Informatics : : University of Trondheim : : AVH (College of Art and Science) : : Norway : %%% Moderators' note: It seems to us that when you %%% \catcode`\f=11 \def\f{\ae} %%% . %%% . %%% \catcode`\E=11 \def\E{\AA} %%% you are first specifying a redundancy (TeXbook p 44 near the top) %%% in that you are saying that the ASCII code for f should be associated %%% with the \catcode for a letter. It already is, when initex is compiled!! %%% Then you are defining a macro \f which is in no serious way associated %%% with the letter f. What you might do, though it would react painfully %%% with the hyphenation system, is %%% \catcode`\f=13 \let f = \ae %%% It is not clear that this is entirely advisable, although a similar %%% approach has been successful for dot-under letters in islamic %%% language transcriptions, e.g %%% \catcode`\!=13 \let ! = \d %%% which allows !s to be used in place of \d s -----------------------------------------------------------------------------+ Date: Sun, 16 Apr 89 23:41 O From: "Teo Kirkinen, HYLK, puh. 7084275" Subject: TeX for OS/2 Keywords: TeX, OS/2 Is somebody already running TeX with the OS/2 operating system? Teo Kirkinen Helsinki University Computing Centre BITNET: kirkinen@FINUH Internet: kirkinen@cc.helsinki.FI ----------------------------------------------------------------------------- Date: Mon, 17 Apr 89 20:36:55 edt From: smithda@cpsvax.cps.msu.edu (J. Daniel Smith) Subject: Newsletter macros for TeX Keywords: TeX, newsletter style Does anyone have a set of TeX macros for doing Newletters? What I am espically interested in is macros that allow for an article to be continued on a later page (as is often done in newspapers and newsletters). A TeX input file would look something like: \beginarticle{How to Use \TeX}{4in}{HowTo} Using TeX is very easy....... ... \endarticle This indicates the start of the article titled "How to Use \TeX". On the current page, there should be four inches of text. What is left should be saved (written to a file) using the key (filename) "HowTo". Later in the TeX file one could then type: \continuearticle{HowTo} This would place the rest of the text from the article "HowTo" at this point along with a line like (How to...continued from page 1) at the top of the column. Are such macros possible? Has anyone written anything similar? Of couse things like double/multiple columns would also be nice, but I think I can adapt the macros from the TeXbook to do this. Thanks for any and all help. Dan J. Daniel Smith Internet: smithda@cpsvax.cps.msu.edu Michigan State University BITNET: smithdan@msuegr Important references are given in boldface. Italicized numbers indicate fleeting references, wheras numbers in parentheses refer to mere implications or unwarranted extrapolations. Asterisks are used to identifiy particularly distasteful passages. - Peter Schickele, The Definitive Biography of P.D.Q. Bach -------------------------------------------------------------------------- Date: Mon, 17 Apr 89 05:53:57 CDT From: svb@cssun.tamu.edu (Stephan v. Bechtolsheim) Subject: What after TeX, and, Book: "TeX in Practice" Keywords: TeX Are there people around who have given SERIOUS considerations of what they would like to add to TeX? By that I mean assume a product TeY, which contains TeX as subset but contains some additional features? I have started to make notes on this subject. I am looking now for TeX wizards who would like to give me their feedback and discuss this with me. I signed a contract with Springer Verlag to publish my book "TeX in Practice". The book was formerly called "Another Look at TeX", but "TeX in Practice" will be the final title. I hope to have it done in time for the TUG meeting in Palo Alto. As soon as it is published Springer will advertise in TUGboat and you will hear from me again. I am currently at about 1100 pages, 28 chapters (if I remember correctly), I even have an editor (so it all will sound like "real English"! Stephan Bechtolsheim -------------------------------------------------------------------------- Date: Mon, 17 Apr 89 15:34:34 GDT From: peter@aries5.uwaterloo.ca (Peter Bumbulis) Subject: Needed: mode_def's for LaserWriter NTX Keywords: LaserWriter NTX, mode_def Does anyone have mode_def's for the Apple LaserWriter NTX? (Are they the same as for the LaserWriter Plus? I think that the Plus uses a Canon CX engine and the NTX uses a Canon SX engine.) I tried printing a document with CX tuned fonts on the NTX and it looked awful. It could be that the toner cartridge is going (but the built in fonts still look not too bad ...) Thanks, Peter --------------------------------------------------------------------------- Date: Mon, 17 Apr 89 15:20:51 EDT From: WIMMER%EXCELAN.ECL1.URI.EDU@UWAVM.ACS.WASHINGTON.EDU Subject: Problem with the screen previewer for VT100 terminals Keywords: TeX, dviware, previewer Hello! I am not on your mailing list as of yet, but have a question which I hope you can answer. I recently received the supposed latest version of TeX (V2.93) and have successfully installed the drivers I need for my LN03+ laser printer and also for my Printronix line printer. I am, however, having problems with the screen previewer for VT100 terminals, DVITOVDU. I get actual characters, but am missing most spaces between words and about one character every word. Has anyone else used this and had the same problems? Is there a way to `fix' it or am I just doing something wrong? The default dummy font is [300]cmr10.pk and I've tried nearly ALL the fonts without much success. I'd appreciate any help or steering the right direction I can get. Thanks. Karen Wimmer Engineering Computer Lab University of Rhode Island ps. I sent a message earlier with a weird return address. Our machine was off the network for a while. You can reply to me at: WIMMER@ECL1.URI.EDU Thanks! %%% Moderators' note: DVITOVDU is not intended to produce a proof-reader's %%% copy, but only to show approximately what the page formatting will %%% look like. Dvitty is a bit better, but it too is ignorant of the %%% difference between kerns and interword spaces, and produces rather %%% arbitrary spaces along each line. Crudetype will be the answer, %%% if we can only get it working. Anyone want to take on a web2c %%% change file for crudetype? ------------------------------------------------------------------------------- %%% The TeXhax digest is brought to you as a service of the TeX Users Group %%% in cooperation with the UnixTeX distribution service at the %%% University of Washington %%% %%% Concerning subscriptions, address changes, unsubscribing: %%% BITNET: send a one-line mail message to LISTSERV@xxx %%% where xxx is the nearest geographical site in the %%% tree shown below %%% SUBSCRIBE TEX-L % to subscribe %%% or UNSUBSCRIBE TEX-L %%% Here is the BITNET re-distribution tree as shown in a recent %%% REVIEW (The geography is guessed at from the subscription list) %%% %%% CLVM TAMVM1 FINHUTC %%% | | (Finland, UK, Scand, CERN) %%% | | | %%% TeXhax ----> UWAVM ----- MARIST ----- EB0UB011 ----- BNANDP11 %%% | (France,Italy,Spain) (Belgium) %%% | | %%% UBVM HEARN --- DEARN %%% (Netherlands) (Germany) %%% %%% Internet: send a similar one line mail message to %%% TeXhax-request@cs.washington.edu %%% Please be sure you send a valid internet address!! %%% in the form name@domain or name%routing@domain %%% and use the style of the Bitnet one-line message, so that %%% we can find your subscription request easily. %%% %%% All submissions to: TeXhax@cs.washington.edu %%% %%% Back issues available for FTPing as: %%% machine: directory: filename: %%% JUNE.CS.WASHINGTON.EDU TeXhax/TeXhaxyy.nn %%% yy = last two digits of current year %%% nn = issue number %%% %%% For further information about TeX Users Group services and publications %%% contact Karen at KLB@SEED.AMS.COM or write to TUG at %%% TeX Users Group %%% P.O. Box 9506 %%% Providence, R.I. 02940-9506 %%% Telephone (401) 751-7760 %%% %%% Current versions of the software now in general distribution: %%% TeX 2.95 (2.98 coming) metafont 1.7 %%% plain.tex 2.94 plain.mf 1.7 %%% LaTeX 2.09 ( 8/10/88) cmbase.mf see cm85.bug %%% SliTeX 2.09 gftodvi 1.7 %%% tangle 2.9 gftopk 1.4 %%% weave 2.9 gftype 2.2 %%% dvitype 2.9 pktype 2.2 %%% pltotf 2.3 pktogf 1.0 %%% tftopl 2.5 mft 0.3 %%% BibTeX 0.99c %%% AmSTeX 1.1d %%%\bye %%% End of TeXhax Digest ************************** -------