TeXhax Digest Tuesday, April 14, 1987 Volume 87 : Issue 26 TEXHAX26.87 Editor: Malcolm Brown Today's Topics: %% nefarious notes math mode fonts in plain TeX Re: math mode fonts in plain TeX Anyone have APL macros? DeTeX (a response) Unix Version of TeX INRSTeX Table macros wanted Tektronix and MacPaint figure insertion Problems with new version of AMSTEX.TEX BibTeX wish list (continued) LaTeX notes ---------------------------------------------------------------------- Date: 4/14/87 From: Malcolm Subject: nefarious notes % Egads, I go away for a few days and find that a great many TeXhax % submissions have piled up! You may expect a flurry of TeXhax % issues as I attempt to catch up with all this material. % % onwards: ------------------------------ Date: Tue, 07 Apr 87 10:30:05 n To: texhax-request@score.stanford.EDU From: Subject: math mode fonts in plain TeX Am I just a 'silly person' or have I got a genuine problem ? When using mathmode to put superscripts on text (eg; for cubic centimetres), I have followed the rules and sought to ensure that the "cm" is in the same font as the rest of the text around it, like this: ${\rm cm^3}$ However, when \rm is redefined to be anything other than a cmr font, or alternatively, when I use my own \font definition:- \font\psmtimr=psmtimr at 10pt %PostScript Times-Roman at 10pt . . . ${\psmtimr cm^3}$ I get a reversion back to math italic. Its almost as if TeX has the following test when it enters math mode: if (font = computer modern roman) then set font to computer modern roman else set font to computer modern math italic........ Am I making a simple mistake here, or is this a real problem ? Its annoying to have to mix the somewhat more modern PostScript Roman with CMR on all the units with sub or superscripts....so help!!! %bye %centerline{Paul Davis} %centerline{embl, postfach 10.2209, 6900 heidelberg, frg} %centerline{DAVIS@EMBL.BITNET%WISCVM.WISC.EDU} ------------------------------ Mail-From: BEETON created at 8-Apr-87 03:30:13 Date: Wed 8 Apr 87 03:30:13-PDT From: Barbara Beeton Subject: Re: math mode fonts in plain TeX i believe you're just making a simple mistake. check your definition of \textfont0, \scriptfont0 and \scriptscriptfont0 -- these should also be designated to be your preferred font at the appropriate sizes (see the texbook, p 351 for the computer modern defs). these are the family definitions that tex uses to deal with math (note that \def\rm on the same page mentions \fam0). there are some attributes that math requires in addition to the dimensions needed for setting text; if these are not present in the .tfm file available for the postscript fonts, you may have some spacing problems, but that's another story, and i've insufficient experience with non-metafont fonts to help you there. -- barbara beeton ------------------------------ Date: 06 Apr 87 20:49:00 EDT From: Richard Zaccone To: Subject: Anyone have APL macros? Does anyone have macros that will let me produce APL characters? I'm interested in reproducing an APL function in a document. Macros that work with either plain TeX or LaTeX would be fine. Rick Zaccone Bucknell University zaccone@bucknell.bitnet ------------------------------ Date: Mon, 6 Apr 87 20:53:03 pst From: Kamal Al-Yahya To: TeXhax@score.stanford.edu Subject: DeTeX (a response) I have written a detex program as part of textools package. I mentioned in a previous texhax message, and sent it to those who requested (and I was unable to respond to them). The source should be on the unix distribution tape by now. You can also get it from mod.sources (vi anonymous ftp to a site that maintain mod.sources, try seismo.css.gov). If you can't get it from those places, send me mail and I'll send you the source. (Please note that I was unable to reply to some people because the address they supply is not reached by our host.) P.S. Try one of these e-mail addresses to contact me: kamal@hanauma.stanford.edu kamal%hanauma@score.stanford.edu ------------------------------ Date: Tue, 7 Apr 87 10:34:49 EDT From: Charlie Martin To: texhax@score.stanford.edu Subject: Unix Version of TeX Can someone tell me a path to an FTP-able (arpa) copy of the new version of TeX, LaTeX and particularly SliTeX for Unix? Also, is there a way to find this sort of thing out directly? Be kind in your description, I've just gotten access to arpanet and don't know the ropes yet. Thanks, Charlie Martin crm@cs.duke.edu ------------------------------ Date: Tue 7 Apr 87 11:53:26-PDT From: Ted Shapin Subject: INRSTeX Table macros wanted To: TeXhax@SCORE.STANFORD.EDU I would like to get the table macros mentioned in Tugboat June 1986 (vol 7 #2) page 106 "Table Making with INRSTeX". Can someone mail it to me? Ted Shapin. (BEC.SHAPIN@ECL.ARPA) ------------------------------ Date: Tue, 7 Apr 87 11:35:18 PDT From: KARNEY%PPC.MFENET@nmfecc.arpa To: TeXhax@Score.Stanford.EDU Subject: Tektronix and MacPaint figure insertion Erik Kilgore writes asking about inserting Tektronix figures into TeX files. I can't help him on getting his figures out on his LN03+, but we have been doing this for some time on our QMS 1200 printers. Inserting Tektronix figures =========================== Two ingredients are required: (1) a \special command in the TeX file with some agreed-upon argument (2) smarts in the print driver (in our case Phil Andrews' GTEX program) to interpret the \special and take appropriate actions. The first thing to do is the decide on the format of the \special command. Of course, it would be nice if all print drivers handled Tektronix figure insertion in the same way. (Then the same TeX file or DVI file can be printed on several printers.) So I'll describe the format recognized by GTEX for Tektronix figures in the hope that others will adopt the same format. The \special command looks like: \special{tektronix-figure } is the name of a file containing the figures in Tektronix 4014 format. GTEX supplies a default file type of .dat on our VAX/VMS system. is the number of the frame within this file. 0 means everything up to the first erase-screen command, 1 everything between the first and second erase-screen commands, etc. Most software puts an erase-screen command as the first thing in the file so frame 1 is indeed the "first" frame. and are the sizes in the horizontal and vertical directions. These are measured in scaled points (sp) -- see below. The Tektronix origin (0,0) coincides with the point at which the \special is given. The top right corner of the plot (i.e., [1024,1024] in 4010 coordinates or [4096,4096] in 4014 coordinates) will be placed at a point sp to the right and sp up from here. (Thus to preserve the aspect ratio of the figure we need = .) is the rotation angle as an integer number of degrees. This is measured counter-clockwise from the horizontal. In order to affect the conversion into scaled points, the user usually accesses this \special via an \insertfigure macro which is defined by \catcode`\@=11 \newcount\rotation \rotation0 \def\insertfigure#1 {\begingroup \toks@={#1}\afterassignment\insfig@\count@} \def\insfig@{\afterassignment\insfi@@\dimen@} \def\insfi@@{\afterassignment\insf@@@\dimen@ii} \def\insf@@@{\count0=\dimen@\count2=\dimen@ii\toks2={ }% \special{tektronix-figure \the\toks@\the\toks2 \the\count@\the\toks2 \the\count0 \the\toks2 \the\count2 \the\toks2 \the\rotation }\endgroup} \catcode`\@=12 Then a figure is inserted with e.g., \rotation=0 \insertfigure myplot 1 5in 5in This plots the first frame of myplot.dat with the origin at the point of the \insertfigure and the scale adjusted so that the full addressable area fills a 5in by 5in square. Note that ANY dimension can be used in \insertfigure (e.g., .9\hsize, 5 truein, 1.5\wd0, etc.). \insertfigure does NOT reserve space on the page for the figure. The user should normally put the whole construction into a \vbox (Plain TeX) or a picture environment (LaTeX). The use of scaled points in the specification of the \special has the following advantages: (1) the print driver only has to worry about one unit (and that's the unit everything else in the DVI file uses) (2) it is easy for TeX to convert any dimension into sp. [I know that some print drivers expect conventional units (\special{ ... 5pt ...}) in the arguments of a \special. I believe this is a mistake. The print driver has to know the several different units that a user can specify and even then dimensions cannot be specified as .9 \hsize.] MacPaint picture insertion ========================== While I about it, let me also advertize the format recognized by GTEX for the \special command to include MacPaint pictures. \special{include-macpaint } is the file containing the MacPaint picture. The default file type is .mac. This picture is unloaded from a Mac to the VAX using the Mac Xmodem protocol (using MACSNVAX on the VAX and VersaTerm on the Mac). GTEX converts from MacPaint format into a format recognized by the QMS. (Several MacPaint to QMS converters have appeared over the past few years.) The top left corner of the figure is put at the location of the \special. and MacPaint lets you generate a picture with 576 x 720 pixels. The resolution of the QMS laser printer is 300/in. Each MacPaint pixel is represented by a small x array of QMS pixels. Recommended values of and are = = 2,3,4. Thus a full MacPaint image will print as 3.84in x 4.8in (2 x 2) 5.76in x 7.2in (3 x 3) 7.68in x 9.6in (4 x 4) (The last is close to the ``standard'' MacPaint size.) This \special makes use of the QMS printers ability to print a bit map with an arbitrary rectangular pixel size. However, the requirement that each MacPaint pixel is represented by the same integer-sized rectangle of QMS pixels means that only a discrete set of sizes is available. In particular, note that the size of the MacPaint document is NOT affected by the TeX magnification. Charles Karney MFENET: Karney@PPC.MFENET ARPANET: Karney%PPC.MFENET@NMFECC.ARPA BITNET: Karney%PPC.MFENET@ANLVMS.BITNET ------------------------------ Date: Tue, 7 Apr 87 14:19:34 PDT From: KARNEY%PPC.MFENET@nmfecc.arpa To: TeXhax@Score.Stanford.EDU Subject: Problems with new version of AMSTEX.TEX I'm confused by the recently announced revision to AMSTEX.TEX. The file I retrieved today from SCORE:: begins with: % AMS-TEX VERSION 0.999999 - FOR USE WITH TEX VERSION 1.0 % COPYRIGHT (C) 1983 BY AMERICAN MATHEMATICAL SOCIETY While the file I have already on my system (from Jan 26, 1986) begins with % AMS-TEX VERSION 1.1 % COPYRIGHT (C) 1985 BY AMERICAN MATHEMATICAL SOCIETY AMSTEX.CHG refers to control sequences which are not defined in the `new' file. Also the `new' file is only about half the length of the `old' one. Anyone know what's going on? Charles Karney MFENET: Karney@PPC.MFENET ARPANET: Karney%PPC.MFENET@NMFECC.ARPA BITNET: Karney%PPC.MFENET@ANLVMS.BITNET %%% Barbara Beeton replies: The version of amstex.tex installed at Score on Apr 2 was an old one, for which I apologize (the Math Society is still using this version for some work, owing to production lags between initial keying and publication). The correct file, version 1.1b, has now been installed. I hope that not too many sites have been inconvenienced. Thanks to Charles Karney for letting me know right away. -- Barbara Beeton ------------------------------ Date: Tue, 7 Apr 87 11:50:06 PDT From: KARNEY%PPC.MFENET@nmfecc.arpa To: TeXhax@Score.Stanford.EDU Subject: BibTeX wish list (continued) A couple more wish list items for BibTeX: (1) Abbreviations as part of another string. Currently a field can be an abbreviation or a string but not a mixture. I would like to able to do @string{cffk = "Charles F. F. Karney"} @string{njf = "Nathaniel J. Fisch"} @ARTICLE{ref, AUTHORS = cffk + " and " +njf, ...} This assumes that BibTeX understands "+" as a string concatenation operator. Another possibility would be to define an immediate operator (let's say "!!") which expands the following abbreviation. Thus the above example would read AUTHORS = "!!cffk and !!njf" (2) Documentation. All I have is a rather terse description of the commands dated November 1985 (which included a promise of more to come on in the spring of 1986). This has prevented me from making any but minor adjustments to the distributed styles. The documentation should include worked examples of the formatting and any other information a BibTeX style hacker needs to know. Charles Karney MFENET: Karney@PPC.MFENET ARPANET: Karney%PPC.MFENET@NMFECC.ARPA BITNET: Karney%PPC.MFENET@ANLVMS.BITNET ------------------------------ From: lamport@src.DEC.COM (Leslie Lamport) Date: 7 Apr 1987 1815-PDT (Tuesday) To: TeXhax@Score.Stanford.edu Subject: LaTeX notes Jeffrey Hallett, in "Some notes on replying", writes: People do not submit questions to have them critiqued, but rather, answered... It is not the place of the answerer to make fun of what the requestor is asking... I would request that if he cannot answer a question without degrading its contents, that he not respond; the person is only looking for a solution to a problem, not a roasting session. Many LaTeX users think that my primary goal is to make things easier for them. They're wrong. My primary goal is to make things easier for their readers. If someone asks how to do something that will make his document harder to read, I think it's more important to point this out to him than to tell him how to do it. I don't think I'm being unduly arrogant to say that, despite my comparative ignorance about the principles of typographic design, I know a lot more than most subscribers to TeXHaX. To my knowledge, I have never "roasted" a questioner, only the typography that he is trying to create. I appologize if anyone feels that I have attacked him or her personally; that was not my intention. I used to make the same kinds of mistakes that I now criticize. As for the remark that Lamport's comments of "stupid" and "nonsensical" in reference to the STANDARD sociological format are completely out of line and uncalled for. Just because it is not used in Mr. Lamport's circles, doesn't give him the right to degrade it. I would like to point out that this format is by far the most widely used and accepted. As I indicated in my original remarks, my main reason for calling the format "stupid" and "nonsensical" is because it makes the document harder to read, not because I don't like the circles it's used in. The fact that lots of people do something foolish may help explain why it's done, but that doesn't make it any less foolish. Lawrence Crowl writes: How do I indent the first paragraph in a section in LaTeX? I have tried changing \@afterindentfalse to \afterindenttrue in \def\part in art11.doc. It has no effect. Read the comments describing the \@startsection macro--either in latex.tex or in the .doc file. Changing the sign of an argument will have the desired effect. However, before doing so, make sure you know what you're doing. There are good design reasons why typesetters usually don't indent the paragraph following a section heading--reasons having to do with making the text easier to read. If you don't know what those reasons are, then you shouldn't be messing around with the document style. Charles Karney asks for a DeTeX program. We have a Unix program that appears to have been written by Howard Trickey; I expect that someone else can provide a better pointer to it than I can. Leslie Lamport ------------------------------ %%% %%%\bye %%% End of TeXhax Digest **************************