Subject: TeXhax Digest V89 #65 From: TeXhax Digest Errors-To: TeXhax-request@cs.washington.edu Maint-Path: TeXhax-request@cs.washington.edu To: TeXhax-Distribution-List:; Reply-To: TeXhax@cs.washington.edu TeXhax Digest Wednesday, July 5, 1989 Volume 89 : Issue 65 Moderators: Tiina Modisett and Pierre MacKay %%% From the moderators: This is the second mailing of TeXhax V89 #65. %%% Yes, we are responsible for the truncated copy you received; a %%% lone period on a line was the culprit and we missed it. %%% Thanks to everyone who alerted us to the error. %%% 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: Re: TeX bug in kerning 'A' with 'v'? Re: Getting TeX labeling on graphics User interface guidelines for LaTeX: OzTeX, PD Tex for the Mac Pronunciation of TeX The canonical pronunciation of TeX Problem with TeX( _ and $) Re: TeX-Hax Digest V89 #56 (extra hpace after commas in maths mode) ------------------------------------------------------------------------- Date: Thu, 29 Jun 89 11:09 EDT From: "Jerry Leichter (LEICHTER-JERRY@CS.YALE.EDU)" Subject: Re: TeX bug in kerning 'A' with 'v'? Keywords: TeX, bug In a recent TeXhax, Amitabh Shah complains that TeX does not insert a kern between "A" and "v"; he thinks a kern of -0.125em looks best. He asks whether this is a bug in TeX. The first thing to understand is that while TeX inserts the kerns, it makes no decisions about WHEN they are needed. Kerning information is provided by the font designer, and stored in the TFM file. It is easy to see all this infor- mation by using the TFTOPL program, which converts a TFM file to a human- readable "property list". Here is an extract of the property list for cmr10: (CHARACTER C A (CHARWD R 0.750002) (CHARHT R 0.683332) (COMMENT (KRN C t R -0.027779) (KRN C C R -0.027779) (KRN C O R -0.027779) (KRN C G R -0.027779) (KRN C U R -0.027779) (KRN C Q R -0.027779) (KRN C T R -0.083334) (KRN C Y R -0.083334) (KRN C V R -0.111112) (KRN C W R -0.111112) ) ) This is the full description of "A" in CMR10. The first three lines show the character being defined - C means "character", for non-printable characters the representation would be O followed by an octal value - the width, and the height. (These are given as fractions of the design size, which is 10pt.) The rest shows all the kerns that the designer (Don Knuth) has chosen to define for characters that immediately follow "A". (It's a comment because this information is actually stored separately in the TFM file - TFTOPL copies it here for ease of reference.) As you can see, "AV" gets the "V" kerned back by about a 1.1pt. As you can also see, the designer has chosen to provide no kerning for "Av". Whether kerning is needed or not is a matter of educated judgement. Whether Knuth such judgement as he worked on CMR or not, he DID have expert advice from several accomplished font designers. So I would not question his desci- sion on this matter lightly. It's also important to understand that most people, when they first begin to understand what kerning is, tend to "over-kern". When kerning is visible, it's too large! The trick is to add just enough to make it INvisible. Kerning is also affected by the size at which you use a typeface. Large, displayed type usually needs more kerning than simple text type - and the need does NOT scale up linearly. If you use a font magnified - e.g., cmr10 at 12pt - TeX will scale the kerning parameters (among others) linearly, which is one reason the result will not look as good as cmr12. If you are setting a head- ing that you want to look really RIGHT, you often have to insert the kerns yourself. (Be warned, though, of one "gotcha'": If the font designer speci- fied a kern between two letters, the instant you insert any of your own kern- ing, the automatic kerning is lost. So your starting point may not be quite where you expect!) Finally, beware of one confounding influence: 300dpi is not a high enough resolution to avoid visible problems with rounding. A 1pt kern is only about four pixels, and the defined DVI driver algorithm for controlling rounding allows an error of two pixels. (There are good reasons for not keeping the error to zero, since doing that can induce side-effects that are even less pleasant.) Sometimes, what appears to be a kerning problem is really just a matter of unfortunate rounding. Try moving the word around on the page and see if it looks different in different positions. -- Jerry ----------------------------------------------------------------------------- Date: Thu, 29 Jun 89 09:20:51 EDT From: beck@cs.cornell.edu (Micah Beck) Subject: Re: Getting TeX labeling on graphics Keywords: TeX, graphics In TeXhax Digest V89 #56, Charles Karney writes: > Most of my graphics is generated by scientific programs ... > Unfortunately, no scientific graphics packages do their labeling in TeX. > ... > A step towards a more streamlined solution is as follows: Assume that the > graphics package can output alphanumeric labels and each label has > associated with it a position on the plot (and possibly a writing direction > if rotated text is to be supported). Assume also that the DVI driver can > locate these labels and their corresponding positions and directions. In > the LaTeX file, you would include a series of commands, one for each label: > ... A better approach is for the scientific program to produce its output not in PostScript or some other page description language, but in a higher level graphics description language which can be edited in some reasonable way and which is compatible with TeX. A pipedream, you say? Not so! Such a graphics language exists, and at least one scientific graphics tool uses it. The language is Fig code, the intermediate format of the Fig graphics editor. The tool that uses it is GnuTeX, a version of the GnuPlot numerical plotting program. Fig code can be translated into many TeX-compatible forms by the TransFig software package. But your application does not produce Fig code, I hear you say. Well, many such programs have a low level "driver" interface for producing various graphics languages, and Fig can be made an option. A reference manual for Fig is included with the TransFig software. Merging DVI and PostScript at a low level using postprocessing is possible, but it is problematic at best. The idea is to get your graphics in a form which you can work with before it is translated to PostScript. TransFig is available via anonymous FTP from svax.cs.cornell.edu, and from the Clarkson archive (sun.soe.clarkson.edu) by FTP or mail. The TransFig manual is also available as Cornell CS Dept. Tech Report #89-967. Micah Beck beck@cs.cornell.edu Cornell CS Dept. ---------------------------------------------------------------------------- Date: Wed, 28 Jun 89 15:17:19 PDT From: KARNEY%PPC.MFENET@CCC.MFECC.LLNL.GOV Subject: User interface guidelines for LaTeX: Keywords: LaTeX, user guidelines The American Physical Society recently has adopted LaTeX for the production of some author-prepared articles for Physical Review. It has written a style called REVTEX which the authors are to use when preparing their manuscripts. From reading the documentation on REVTEX, it was clear that in several respects its conventions were different from LaTeX's and thus likely to confuse users. However, LaTeX's conventions aren't written down anywhere! They should be. I think a well thought out set of "user interface guidelines" can make learning new formats much easier. (Apple has proved this with the guidelines it published for Macintosh applications.) Here's a start at such guidelines, illustrated by what I consider to be violations of these guidelines in the case of REVTEX. (I should emphasize that I think REVTEX does most things right! In particular, I think the choice of LaTeX for a starting point is the right one.) * Macros should take arguments in {}s and optional arguments in []s. Delimited macros should not be used. (Of course, power users know they can get by with \frac12 instead of \frac{1}{2}.) Counter-example: REVTEX defines \def\case#1/#2{{\textstyle\frac{#1}{#2}}}. This makes its usage incompatible with \frac. It also has a macro defined \dec#1.#2 {...} (to do alignment on decimal points). I wonder how often user will forget that space to delimit the second argument. * A starred variant of a macro should provide a minor modification of the basic command. (Thus: eqnarray* removes the equation numbers, \section* removes the number.) I believe the convention is "*" means you get a little less. Counter-example: REVTEX redefines \section and requires \nonum\section to suppress the section number. * Outside of verbatim environments, should act like a space. \\ should be used to separate the input into lines where this makes sense. Counter-example: REVTEX defines an "institut" environment for specifying the address of the author in which \obeylines is in effect. * Existing documented LaTeX commands should be used where possible. In particular, the declarative \title, \author commands should be used to specify the title and author and \maketitle should do the typesetting of the material declared in this way. Counter-example: REVTEX defines a title environment which typesets the title. This means that changes in the manuscript are necessary when switching styles. * Macro names should be rather explicit. Users can always abbreviate them if need be. Names should normally be lower case (good exceptions: \Large, \LARGE, etc. and \Alpha, etc.). Counter example: REVTEX uses \FL to set equations flush left. Either the normal flushleft command (suitable redefined) should be used, or a more explicit name like \leftequations should be used. * Normal grouping rules should be observed. The effect of commands which effect how text is typeset (font changing commands, etc.) should be delimited by braces. Counter-example: REVTEX's \FL command only affects the next equation. * Don't make the user do extra work. For example, in Physical Review footnotes in a table are typeset at the bottom of the table (as in the minipage environment). \footnote should be redefined within tables to make this happen. Counter-example: REVTEX defines a \tablenote for this purpose and this command doesn't provide the automatic numbering. Any other suggestions for guidelines?? Charles Karney Phone: +1 609 243 2607 Plasma Physics Laboratory FAX: +1 609 243 2160 Princeton University MFEnet: Karney@PPC.MFEnet PO Box 451 Internet: Karney%PPC.MFEnet@NMFECC.LLNL.GOV Princeton, NJ 08543-0451 Bitnet: Karney%PPC.MFEnet@LBL.Bitnet ------------------------------------------------------------------------------- Date: Thu, 29 Jun 89 02:29:46 PDT From: David_Dalton@mtsg.ubc.ca Subject: OzTeX, PD Tex for the Mac Keywords: OzTeX, Macintosh Here is another posting from Info-Mac Digest. Date: Tue, 27 Jun 89 22:45:17 CDT From: c3ar%zaphod@gargoyle.uchicago.edu Subject: Public Domain TeX In Digest #113, Peter Abbott announces the availability of OzTeX, a public domain version of TeX for the Macintosh. (See his posting for a description.) I have agreed to help redistribute this in the US. I received version 1.1 from Australia today and almost simultaneously the powers-that-be here advised me that they will make available a spot on one of our machines for anonymous ftp. I am also searching for other archives that are willing to make this available. When I find out the exact address of the machine on which this will be placed here, I will send another anouncement. In the mean time, anyone interested can send me email at one of the addresses below. Be forwarned that the total OzTeX delivery is very large (it takes ten 800k diskettes), mostly because it contains the full set of CM fonts. The fonts used are in standard PK format, so any additional fonts on mainframes can be ported easily to the Mac. --Walter Walter C3arlip c3ar@zaphod.uchicago.edu (the "3" is silent) c3ar%zaphod@UCHIMVS1.bitnet _____________________________________________________________________________ Date: Thu 29 Jun 89 10:21:53-EDT From: b beeton Subject: Pronunciation of TeX Keywords: TeX the official pronunciation is right there in the TeXbook, page 1: "Insiders pronounce the \chi\ of \TeX\ as a Greek chi, not as an `x', so that \TeX\ rhymes with the word blecchhh. It's the `ch' sound in Scottish words like {\sl loch} or German words like {\sl ach}; it's a Spanish `j' and a Russian `kh'. When you say it correctly to your computer, the terminal may become slightly moist." and while i'm at it, i recommend (re)reading that page of the TeXbook for other reasons, namely the importance of rendering the name TeX in the proper form. i thought that all TeXhackers would have memorized all this by now, but i guess i was overconfident ... -- bb "when in doubt, read the instructions." ------------------------------------------------------------------------- Date: Thu, 29 JUN 89 12:41:22 BST From: CHAA006%vaxa.rhbnc.ac.uk@NSFnet-Relay.AC.UK Reply-To: Philip Taylor (RHBNC) Subject: The canonical pronunciation of TeX Keywords: TeX Jan-Ameij asked ``How should one pronounce TeX?''. I think perhaps that one should not even attempt to do so, until one has read `` {\it The \TeX book}$^1$''. Thereafter there should be no problem. 1 {\it The \TeX book}, D.E.~Knuth, published by Addison-Wesley at about {\it\$}33 (hardback), {\it\$}21 (paperback). Philip Taylor Royal Holloway and Bedford New College. ---------------------------------------------------------------------------- Date: Thu, 29 Jun 89 10:35 GMT From: Ian Murphy Subject: Problem with TeX( _ and $) Keywords: TeX I'm writing a program to typeset programs and I want TeX to handle the _ and $ symbol rather than my converting all occurences of _ to \_. So I tried out my macros on a test program and they worked fine, heres what I did: \def\dollar{\$}\def\uscore{\_} \catcode`$=\active \catcode`_=\active \def${\dollar} \def_{\uscore} Simple but effective, BUT (and theres always a but :-)) I know want to be able to say something like \program{progname} %. %. %. \endprogram where the \program macro will set the catcodes of _ and $ (no problem) and, heres where I found the difficulty, redefine the _ and $ *active symbols* to be the respective functions, this is what I tried \def\program{ \begingroup \catcode`$=\active \catcode`_=\active \def${\dollar} \def_{\uscore} } \program %%%% call the macro and wait for the errors TeX complained about the \def$, so I guessed that it was reading the dollar before it was executing the \catcode`$, so I did the following \def\program{ \begingroup \catcode`$=\active \catcode`_=\active } \noexpand\def\setsyms{ \def${\dollar} \def_{\uscore} } \program And again it complained that it expected a \ before the $. I know whats happening... TeX is setting the catcode of the $ in \def$ to math shift before it executes my \catcode. The question is how can i coerce TeX into not setting the $ to a mathshift upon reading ( I thought the \noexpand would prevent it from doing anything with the tokens in the macro, i was wrong)?????? |Ian Murphy (^v^) | Internet : IAN@VAX1.UCC.IE | |Dept. Computer Science | ARPA : IAN@IRUCCVAX.BITNET | |University College Cork, | janet : EARN%IRL.HEA.UCC.IRUCCVAX::IAN | |Ireland. | Voice : "IAN!!!" | |And Procyon Informatics, Dublin for the duration of the summer, | | murphy_i@procyon.ie should get there, otherwise the Uni. address will do. | ------------------------------------------------------------------------------ Date: Thu, 29 JUN 89 14:56:22 BST From: CHAA006%vaxa.rhbnc.ac.uk@NSFnet-Relay.AC.UK Reply-To: Philip Taylor (RHBNC) Subject: Re: TeX-Hax Digest V89 #56 (extra hpace after commas in maths mode) Keywords: TeX, extra hspace Michael Barr asked about a problem with breaks and spaces in TeX. I won't reproduce Michael's examples verbatim, as they are quite lengthy, but there seem to be a few obvious comments: (1) In example 1, there appears a rather clumsy way of making the comma active in maths mode; \mathcode `\, = 32768 is all that is needed to ensure that a comma is active in maths mode; it is still, of course, necessary to make it active for the duration of its definition. (2) In example 2, using \seq, the \catcode of the commas in the parameter to \seq are established before \seq is elaborated; thus the changing of the \catcode within \seq is without effect. (3) In example 3, the braces delimiting the list prevent line-breaking; removing them re-instates the apparent action of [1]. It seems that the ideal syntax for Michael's list would be something like: $ \seq {a,b,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z} $ that is, \seq should appear to take a parameter, but should not in fact do do because of [2] above. Furthermore, because of [3], the braces surrounding the list must eventually disappear. Let us work towards developing a suitable set of definitions: \chardef \passive 12 \def \activecomma {\catcode `\, = \active} \def \passivecomma {\catcode `\, = \passive} \newtoks \list \begingroup \activecomma \gdef ,{\mathchar "213B \mskip \thinmuskip}% a binary operator gains % a penalty automatically \endgroup \def \expandlist {\passivecomma \the \list}% throw away the braces \def \seq {\activecomma \afterassignment \expandlist \list =} % %%% all of which will allow % Here is a long sequence that hangs over the end of the line $ \seq {a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z} $ \end Philip Taylor Royal Holloway and Bedford New College. ----------------------------------------------------------------------- %%% Further information about the TeXhax Digest, the TeX %%% Users Group, and the latest software versions is available %%% in every tenth issue of the TeXhax Digest. %%% %%% Concerning subscriptions, address changes, unsubscribing: %%% %%% BITNET: send a one-line mail message to LISTSERV@xxx %%% SUBSCRIBE TEX-L % to subscribe %%% or UNSUBSCRIBE TEX-L %%% %%% Internet: send a similar one line mail message to %%% TeXhax-request@cs.washington.edu %%% %%% 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 %%% %%%\bye %%% End of TeXhax Digest ************************** -------