TeXhax Digest Friday, February 27, 1987 Volume 87 : Issue 13 TEXHAX13.87 Editor: Malcolm Brown Today's Topics: Reply to Jonathan Ross dvi previewer for MVII's common tex Re: "Standardized" font names Logo composition Symbol fonts; Maths in LaTeX ---------------------------------------------------------------------- From: lamport@decwrl.DEC.COM (Leslie Lamport) Date: 15 Feb 1987 1913-PST (Sunday) To: TeXhax@Score.Stanford.edu Subject: Reply to Jonathan Ross Jonathan Ross writes: I would like to be able to generate LaTeX documents which have a page numbering scheme that is like 1 of N, 2 of N ... etc where N is the last page number of the document. My first attempt was to use \renewcommand{\thepage}{\arabic{page} of \pageref{endpage}} ... This approach is doomed to failure because \pageref{foo} expands to the value of \thepage where the \label{foo} is defined, so this would produce page numbers of the form `3 of 57 of 57 of 57 of ... 57', with one `of' for each time LaTeX was run. You need to do something like \renewcommand{\thepage}{\arabic{page} of \ref{endpage}} \newcounter{fooctr} and have the following on the last page: \setcounter{fooctr}{\value{page}} \addtocounter{fooctr}{-1} \refstepcounter{fooctr}{1} \label{endpage} This still causes LaTeX to bomb the first time it's run, a problem that can be solved by commenting out the new definition of \thepage the first time it's run. This is, however, a bad solution. The page number is really `3', not `3 of 54'. This approach leads to all sorts of horrors, like a table of contents entry of the form 2.1 Gnats and Gnus .......................... 27 of 54 The proposed change is a change to the document style, and requires learning about document style changes. Browsing through the appropriate .doc file will reveal the commands that generate the running foot; adding a \pageref{endpage} command in the appropriate place will easily solve the problem, if the user is willing to add his own command at the end of the document. A more elegant approach is to redefine the \end{document} command to include a \label{endpage} command. Finding the required definition requires browsing through the file latex.tex. (Look for `\def\enddocument'.) Ed Bell might consider using LaTeX with its \include command if he wants to run TeX on only part of a document. Medhi Widjaja's solution still causes TeX to do most of the work of processing the unprinted document. There doesn't seem to be too much advantage to this approach over the simple-minded one of having the device driver just print out the desired pages of the .dvi file. Stephen Page complains that It should be easier for the beginning user to remove or replace the ENTIRE header [including page number] with his/her own. The user, beginning or otherwise, should not be concerned with formatting decisions such as where the page number gets displayed and whether the chapter heading is centered or flushleft when displayed in the running head. Such decisions should be left to document-style designers, who presumably know what they're doing. It was not my intention to make things as easy as possible for document-style designers. (Doing so would have been much more work and would have made LaTeX even bigger.) Anyone with a reasonable knowledge of TeX can look inside the .doc files, consulting latex.tex for more details if necessary, and figure out how to reformat the running head. Users would do themselves and their readers a great service by not trying to be document designers. Leslie Lamport ------------------------------ To: texhax@sierra Subject: dvi previewer for MVII's Date: 17 Feb 87 12:13:15 PST (Tue) From: Richard Roy I am looking for a SUN-3 and a MVII dvi previewer which uses the GF fonts rather than the pixel format fonts. Does anyone have such programs running under SULTRIX for either the MVII workstations (runnning the new X-window system) or the SUN-3 stations running suntools? As a second choice, I'd be interested in obtaining a set of pixel fonts for use with xdvi (the X-window previewer from project athena). Does anyone have such files and/or experience in using the previewer on MVII's? RR x5-5698 ------------------------------ Date: Wed, 18 Feb 87 07:29:19 +0100 To: TeXhax@score.stanford.edu From: Piet van Oostrum Subject: common tex I understand that there is an implementation of TeX in C under Unix. Could someone tell me how this can be obtained? Thanks and regards, Piet van Oostrum Dept of Computer Science University of Utrecht Budapestlaan 6 P.O. Box 80.012 3508 TA Utrecht The Netherlands tel: +31-30-531806 UUCP: ...!mcvax!ruuinfvax!piet ------------------------------ Mail-From: MACKAY created at 18-Feb-87 10:21:24 Date: Wed 18 Feb 87 10:21:24-PST From: Pierre MacKay Subject: Re: "Standardized" font names To: phil@RICE.EDU In-Reply-To: <478.phil.titan@Rice> ReSent-Date: Wed 18 Feb 87 10:59:42-PST ReSent-From: Pierre MacKay ReSent-To: texhax@SU-SCORE.ARPA The METAFONT utility fonts are a rather special case, since the reference to them tends to be rather hardwired into gftodvi output. The problem is that each run recognizes only one gray, only one black, and only one slant. We have two output devices, and have to maintain grlgp.????pxl and grado.????pxl (yes, alas, still pxl). It was a while before I discovered how to set special slantfonts etc. (The METAFONTbook, p. 329), and I use this method where necessary, but it is simpler for a large run just to mv grlgp to gray. There are, on the whole, so few, and it is often possible to reserve a special directory for METAFONT work where the oddities can be kept away from the normal text fonts. Let's make this a plebiscite. Do enough people think that the METAFONT special utility fonts (including half-tone, and similar things) ought to be classed under one initial letter to make it worth considering a modification to gftodvi? Pierre A. Mackay TUG site coordinator for Unix systems. ------------------------------ From: lamport@decwrl.DEC.COM (Leslie Lamport) Date: 19 Feb 1987 0938-PST (Thursday) To: TeXhax@Score.Stanford.edu Subject: Logo composition Re: From: "Benjamin J. Woznick" Subject: Logo composition Wants to convert a logo involving a combination of fonts. He claims that the \LaTeX command doesn't work in nonRoman fonts. First, I consider that the \LaTeX\ command correctly produces the LaTeX logo regardless of the currently selected font. The LaTeX logo consists of \rm and \sc letters. The logo is independent of the type style of the surrounding text. The logo that Woznick wants requires a command that knows the current type size and style. The current type size can be found in either of two ways: * LaTeX \let's \@currsize to the current size command (e.g., \normalsize or \large); a series of \ifx commands can therefore determine the current size. * LaTeX sets \strutbox to a box of height .7*b and depth .3*b, where b is the default \baselineskip for the size, the size-changing command setting \baselineskip to b*\baselinestretch. The type style can be determined from the value of \the\fam, which is 0 for Roman, 1 for italic (I think), and so on. Looking at the definition of \it, \bf, etc. will determine their values. Of course, there are lots of size/style combinations, and if you have to do something different on each one, it's a lot of work. If I were doing LaTeX over again, I'd use a more rational system of sizes like the one used by TROFF. But, I'm not... Re: From: Robert Wentworth Subject: LaTeX double spacing and mathematical typesetting Leslie Lamport criticizes university dissertation style requirements ... and suggests one produce two versions, an official version ``formatted with `\tt \raggedright' declarations'', and ``another version, with the standard document styles, for people to read.'' ... this attitude strikes me as rather snobbish. The implication is that if a document isn't going to be produced according to ultimate aesthetic standards, it doesn't deserve to be anything but junk---`\tt \raggedright' indeed! Personally, ... I just want to produce documents which are as aesthetic as possible given a finite investment of effort. (The suggestion to produce two versions strikes me as a bit impractical, giving printing/binding costs.) If Wentwort just wants to produce documents that are aesthetic as possible, he should fill the pages with pretty pictures. Personally, I want to produce documents that people want to read. I don't give a damn about aesthetics. Wentworth has the common misconception that document design is a matter of aesthetics. It's not. The function of design is to make the document as easy to read as possible; a design is bad not because it is unaesthetic, but because it makes the document harder to read. If being more concerned with the document's readers than with university regulations is snobbishness, then I'm happy to be a snob. My suggestion of \tt\raggedright has three reasons behind it: * Thumbing one's nose at the officials. * Making the official version so unattractive that no one is likely to read it. * Making the official version more readable. Yes, I do mean making it more readable. Typewriter formats are designed to make typewritten text more readable. If one uses line width and spacing dimensions designed for typewriters, the resulting document will be more readable if it is produced on a typewriter than with typesetting fonts. By more closely simulating the device for which the format was designed, \tt\raggedright will produce a document that is easier to read. While I'm at it, I'm wondering about LaTeX's limitations as far as mathematical typsetting goes... Currently I use plain TeX rather than LaTeX because my documents typically involve very complicated mathematics which I have been led to believe would be all but impossible to format nicely in LaTeX. From page 204 of the LaTeX manual: "Most Plain TeX commands can be used in LaTeX, but only with care... A LaTeX command may not work properly when used with Plain TeX commands not described in this book." Just about any formula typeset with Plain TeX commands can be used in the middle of ordinary text. It can also be used in most simple LaTeX environments--such as in \[ ... \]. It can probably appear in an equation or eqnarray environment if it doesn't muck around with the equation number. On the other hand, if you use random TeX commands inside a section heading, or in an `@' expression of an array environment, you may run into trouble. So, most of the time you want to use TeX's math features, you can do so in LaTeX. However, as with using Plain TeX itself, you pay for the extra power by ocassional unpleasant surprises. Re: From: JARWALA%ecs.umass.edu@RELAY.CS.NET Subject: Problem in using \sbox in Latex pictures... The LaTeX input in the message includes: \sbox{\tran}{ \setlength{\unitlength}{0.1in} \thicklines \begin{picture}(3,4) ... This command sets box \tran to a box containing two interword spaces (probably about 6pt wide) followed by a box 3 units wide produced by the picture environment. The left-hand corner of the box is therefore about 6pt to the left of the left-hand corner of the box produced by the picture environment. I presume that Jarwala is unaware of this extra space in box \tran. It can be eliminated by putting removing the spaces between the `{' and the `\setlength' and between the `}' and the `\thicklines'. Look up `space' and `%' in the index of the LaTeX manual for further information. Leslie Lamport ------------------------------ Date: Thu, 19 Feb 87 11:52:44 PST From: KARNEY%PPC.MFENET@nmfecc.arpa To: TEXHAX@SCORE.STANFORD.EDU Subject: Symbol fonts; Maths in LaTeX In answer to a couple of points from V87 #11: (1) From: William LeFebvre Subject: Re: More mathematical symbols Speaking of mathematical symbols: what am I supposed to use to represent these different sets: Real numbers, Natural numbers, Imaginary numbers, and Complex numbers? There are "blackboard bold" characters in the AMS font MSYM10, which are close to what you want. This font and another symbol font and Cyrillic fonts is available at SCORE . Unfortunately, these fonts are written in the old Metafont, so there's no way for most people to generate new pixel files. (SCORE has a set at \magstep0 300/in and I have PK files at the standard magsteps for 300/in.) (2) From: Robert Wentworth Subject: LaTeX double spacing and mathematical typesetting While I'm at it, I'm wondering about LaTeX's limitations as far as mathematical typsetting goes... What limitations? Anything you can do in plain TeX you can do in LaTeX. In particular all the advanced math hacking described in the later chapters of the TeXbook also work in LaTeX. The only omissions I found in LaTeX's handling of equations are: (a) \eqalign is replaced by the eqnarray environment. I slightly prefer the spacing that eqnarray gives me. (b) There's no easy way to generate equation numbers like (1a), (1b), (1') etc. However these are both easily fixed by reading in eqalign.sty (via the optional arg to \documentstyle) where eqalign.sty contains: % eqalign (style option for all style) to reenable PLAIN TeX's % \eqalign command and generalize the LaTeX's equation numbering. % Written by Charles Karney (Karney%PPC.MFENET@NMFECC.ARPA) 1986/01/03. % This style option can be used with any style. E.g., % \documentstyle[11pt,eqalign]{article} % It provides: % (1) \eqalign, \displaylines, \eqalignno, and \leqalignno from Plain % TeX. % (2) \eqn(A5c) gives \eqno\hbox{(A5c)}. This ensures that the "A" and % "c" are set in Roman. % (3) \eqnum increments the equation counter and prints it. E.g., % $$x^2+y^2=z^2, \eqn(\eqnum)$$ % (4) \eqlab{