TeXhax Digest Sunday, July 24, 1988 Volume 88 : Issue 67 This weeks Editor: Malcolm Brown Today's Topics: Random notes and complaints re: Standardizing on PostScript TFMs Re: TeXhax Digest V88 #64 (LaTeX notes) When is a loop not a loop? Page # of # pages (TeXhax65.88) TeX stuff for PC/MS-DOS (TeXhax63.88) Page # of # pages Problems combining \tt, \obeyspaces, and \halign Mirror-image fonts RE: Rest of line as macro argument Metafont CM files TeX to C/Web to C Problems with problems. LaTeX problem? re: verbatim mode [TeXhax Digest V88 #65] TeX and METAFONT on SPAN ---------------------------------------------------------------------- From: chase@orc.olivetti.com Subject: Random notes and complaints Date: Tue, 19 Jul 88 12:22:53 -0700 I am installing a Unix-tex tape containing TeX 2.9, LaTeX 2.09 (25 Jan 1988), METAFONT 1.3, tape made on 5 May 1988. I am installing this on a Sun 3/60 running SunOS 3.4, and I am using ctex and the modifications posted by Pierre MacKay to make a gargantuan TeX. Results/problems: + Gargantuan (C) tex works fine, and is very large. + The new bibtex also appears to work well. - It was a little confusing where the patches where to be applied, since there were (different) copies of "ctex.ch" in both ./tex82 and ./tex82/texdir. The patches should be applied to ./texdir/ctex.ch. - There was some confusion regarding use of "TEX.POOL" in the gigantic version of tex; I think web2c generated it as "tex.pool", requiring (additional) intervention on my part to set things straight. - The ctex makfile should also make "slitex". - lfonts.tex calls for amcsc10, yet there is no such font in the distribution. I changed it to call for cmcsc10 (which I can generate with METAFONT), but wonder if there was a reason. - ctex/itex.c had the following three lines of code in it which resulting in NOT using my TEXINPUTS environment variable in the undumped versions of TeX and LaTeX. if ( readyalready == 314159L ) goto lab1 ; setpaths () ; I moved the call to setpaths before the initialization test and crossed my fingers. - The true-font-sizes package in TeXcontrib/sauter lacks the file "build_cmbsy.mf". However, with fairly minor effort (a morning watching my Sun recompile code, copy files, and run latex and bibtex to confirm that it all still works) I have an up-to-date system that seems to run. David Chase Olivetti Research Center, Menlo Park, CA for sure for MX-header-eating mailers oliveb!orc!chase for uucp mailers ------------------------------ Date: Tue, 19 Jul 88 19:51:06 EDT From: Mike DeCorte Subject: re: Standardizing on PostScript TFMs There is a slight problem with this. Right now the naming conventions used by Adobe are fine but what is to be done if and when Times Roman fonts are made in MF? If not Times Roman pick your favorite font that is available in both the PostScript and non PostScript worlds. What might be best would be if the tfm's for the mf version of font X were the same as the tfm's for the PostScript version of font X. Then the user could have a single dvi file that could use either font but this may not be possible or practical. Michael DeCorte // (315)268-2292 // P.O. Box 652, Potsdam, NY 13676 Internet mrd@sun.soe.clarkson.edu // Bitnet mrd@clutx.bitnet ------------------------------ Date: Tue, 19 Jul 88 16:58:44 PDT From: lamport@decwrl.dec.com (Leslie Lamport) Subject: Re: TeXhax Digest V88 #64 (LaTeX notes) Micah Beck writes: The following use of the \addcontentsline command together with an \include'd file causes unexpected ordering of lines in the table of contents. This LaTeX document bug.tex: \documentstyle[12pt]{article} \begin{document} \tableofcontents Some text. \clearpage \addcontentsline{toc}{section}{Added Line 1} \include{p1} \end{document} ... This is a bug that was first reported to me almost a year ago, but I apparently failed to note it in latex.bug. The problem occurs when an \addcontentsline or \addtocontents command immediately precedes an \include. There doesn't seem to be any easy way to fix the problem. The only thing to do is put the \addcontentsline command in the \include'd file. The answer to Peter Galko's "Formatting problem" can be found in the LaTeX code. (Or, he can solve his problem more easily by using LaTeX.) Leslie Lamport ------------------------------ Date: Wed, 20 Jul 88 01:00:08 BST From: CET1%phoenix.cambridge.ac.uk@NSS.Cs.Ucl.AC.UK Subject: When is a loop not a loop? TeXperts will be familiar with the effect that \def\a{\a\b} \a generates "! TeX capacity exceeded, sorry [input stack size=200]", while \def\a{\a} \a causes TeX to loop, due to TeX's tail recursion removal. However, the effect caused by \def\a{\the\a} \a was new to me. What happens is that indefinite amounts of Pascal stack are consumed (in detail: |get_x_token| calls |expand| calls |ins_the_toks| calls |the_toks| calls |get_x_token| ...). The results of that depend on one's local Pascal runtime system, of course. (On my machine, using IBM's Pascal/VS under MVS, the runtime system tries to expand the stack as necessary. Eventually I get IEA705I ERROR DURING GETMAIN SYS CODE = 80A-10 CET1 PHXSESS PHXSESS 00 IEA705I 00F5EA00 008F1338 008F1338 00001200 00003000 Error state abend SCC=80A-10 in program TEX which the veriest babe could understand as meaning "I have run out of store".) With something like \def\a{\the\a\b} \a it's a competition as to whether TeX's input stack or the Pascal stack will run out first; in the previous case TeX's tail recursion removal again prevents the possibility of its input stack overflowing. In fact, many similar examples can be constructed: for example \the can be replaced by \number, or \ifnum. I don't suppose the effect can be considered a bug. What surprises me is that I haven't met it before. What are other users' experiences? Are there other, fundamentally different, ways of making TeX consume indefinitely much Pascal stack? (To be precise: an amount of stack not bounded by a (linear?) function of the TeX configuration constants.) Of course, the user here who originally had the problem that led me to discover this hadn't done anything quite as straightforward as the above examples! His input looked like this \def\oldheader{\the\headerline} \def\headerline{} % Most of the document here \def\headerline{\the\oldheader} % And then use \headerline the next time the \output routine is called! being under a misapprehension about the relationship of \def, \edef, macros and token registers. Chris Thompson JANET: cet1@uk.ac.cam.phx ARPA: cet1%phx.cam.ac.uk@nss.cs.ucl.ac.uk ------------------------------ Date: Wed, 20 Jul 88 02:08:16 EDT From: jonradel%icecream.Princeton.EDU@Princeton.EDU (Jon Radel) Subject: Page # of # pages (TeXhax65.88) ------------------------------ Date: Wed, 20 Jul 88 02:07:56 EDT From: jonradel%icecream.Princeton.EDU@Princeton.EDU (Jon Radel) Subject: TeX stuff for PC/MS-DOS (TeXhax63.88) ------------------------------ Date: Wed, 20 Jul 88 05:09:27 EST From: integin!svb@purdue.edu (Stephan Bechtolsheim) Subject: Page # of # pages You need two passes, unless you saved all the pages in box registers in the output routine until you reached the last page and then wrote the boxes out. Obviously there is a problem with respect to the amount of memory you need to save all these boxes. Stephan v. Bechtolsheim, integin!svb@arthur.cs.purdue.edu, (317) 463 0162 ------------------------------ From: ches@research.att.com Date: Wed, 20 Jul 88 11:23:12 EDT The LN01 driver that we used at NJIT was obtained from its author, Flavio Rose, of Digital Equipment Corp in Marlboro, Mass. NJIT was never authorized to distribute that software. It worked fairly well, though I had troubles with some of the largest fonts. It was written in PL/I: we did have a compiler, so we never tried to fix it. Bill Cheswick ches@research.att.com research!ches ------------------------------ Date: Wed, 20 Jul 88 13:42 N From: Subject: Problems combining \tt, \obeyspaces, and \halign I'm trying to typeset `tables' which represent the menu screens in a user interface display. Because the typewriter type font characters have identical widths, I figured the easiest way to do this (experienced but sensitive Wizards please brace yourselves) would be with the \obeyspaces command: I can copy the menu display straight into the file as it appears on screen. The macro below almost works. However, on the left hand side of the table, between the vertical bar and the text, mysterious spaces are inserted. I don't know why they appear, so naturally, I don't know how to get rid of them. Can anyone explain and resolve this problem, or point me to the (thus far elusive) appropriate TeXbook reference? Desired output: ----------------------------------------- | MAIN MENU | | | | Lexicon: Application: Environment: | | LIST SHOW SQL*PLUS | | CREATE TABLE VMS | | MODIFY UNLOAD | | DROP LOAD INSTALL | ----------------------------------------- Actual output: --------------------------------------------- | MAIN MENU | | | | Lexicon: Application: Environment: | | LIST SHOW SQL*PLUS | | CREATE TABLE VMS | | MODIFY UNLOAD | | DROP LOAD INSTALL | --------------------------------------------- Crude macro: $${\vbox{ \tt \obeyspaces \frenchspacing \offinterlineskip \hrule height 1.5pt \halign {&\vrule width1.5pt#& \strut#\cr height10pt&\omit&\cr &{ MAIN MENU }&\cr &{ }&\cr &{ Lexicon: Application: Environment: }&\cr &{ LIST SHOW SQL*PLUS }&\cr &{ CREATE TABLE VMS }&\cr &{ MODIFY UNLOAD }&\cr &{ DROP LOAD INSTALL }&\cr height10pt&\omit&\cr \noalign{\hrule height 1.5pt} } } } $$ Gavin Burnage CELEX -- Centre for Lexical Information Reply: University of Nijmegen GAVIN@HNYMPI52.BITNET Wundtlaan 1 6525 XD NIJMEGEN The Netherlands ------------------------------ Date: Wed, 20 Jul 88 15:14:10 EDT From: toms@ncifcrf.gov Subject: Mirror-image fonts Bengt Martensson pointed out that the PostScript command -1 1 scale should work, and indeed it does. Tom Schneider toms@ncifcrf.gov ------------------------------ Date: Wed, 20 Jul 1988 14:26 EDT From: Jim Walker Subject: RE: Rest of line as macro argument Here's how you can write a macro that takes the rest of the line as its argument: \def\test{\begingroup\obeylines\innertest} {\obeylines \gdef\innertest#1~~M{\message{#1}\endgroup}} The second \obeylines causes \innertest to look for an active carriage return, i.e., one with a category code of 13. The first \obeylines insures that the end of the line does have that category code. Incidentally, the bibliography stuff in AmS-TeX does NOT work this way; you can have more than one item per line, or one item on more than one line, e.g., \ref \book The \TeX book \publ Addison-Wesley \yr 1984 \by Donald E. Knuth \publaddr Reading, Massachusetts \endref -- Jim Walker, Dept. of Mathematics, Univ. of S. Carolina ------------------------------ Date: Wed, 20 Jul 1988 15:35 EDT From: Brian Holmes Subject: Metafont CM files Does anyone have 12 point MF files for CM fonts. I'm trying to generate 12 point sizes, but I do not know the standard numbers to use in the MF file. (If there is any?) Are they located on BITNET anywhere? Am I asking the wrong question? Can anyone tell me where I can get ahold of Metafont documentation? * Brian Holmes \ / ___ * * Wayne State University \/\/su | | * * Detroit Michigan ____| |____ * * | | | | * * BITNET : BHOLMES@WAYNEST1 | | | | * * INTERNET : Brian_Holmes%WU@UM.CC.UMICH.EDU | | | | * * UUCP : {UMIX|ITIVAX}!WAYNE-MTS!BRIAN_HOLMES ============= * ------------------------------ Date: Wed, 20 Jul 88 15:46 EDT From: Ted Nieland - SRL <@WPAFB-AAMRL.ARPA:TNIELAND@FALCON> Subject: TeX to C/Web to C I have been seeing a lot of messages about WEBtoC and TEXtoC. Where can these tools be found? I am currently finishing a TeX/LaTeX collection and would to include these in the collection. | M. Edward (Ted) Nieland - Systems Analyst | US Snail: | Arpa Internet: | Systems Research Laboratories, Inc. | TNIELAND@WPAFB-AAMRL.ARPA | 2800 Indian Ripple Road WP 196 | TNIELAND%FALCON@WPAFB-AAMRL.ARPA | Dayton, OH 45440 | A T & T: (513) 255-8846/8760/5156 ------------------------------ Date: Wed, 20 Jul 88 14:23 PDT From: MCGLK%MAX.ACS.WASHINGTON.EDU@Forsythe.Stanford.EDU Subject: Problems with problems. Now that I've gotten over my alignment problems, there's something else I want to ask, after beating my head against it for a while. Please pardon the lack of whitespace in the following excerpts: I'm working on a textbook in LaTeX. The problems section, in theory, is easy enough: \section{Problems} \begin{enumerate} \item problem problem problem problem problem ... ...22 other items... \item problem problem problem problem problem ... \end{enumerate} resulting in X.Y Problems 1. problem problem problem problem problem ... ... 24. problem problem problem problem problem ... However, the authors want to indicate difficult problems by having a boldface asterisk in front of the number, like so: *13. problem problem problem problem problem ... The amateur who was working on this before I was just used \item[{\bf *}13.] problem problem ... which resulted in 12. problem problem problem problem problem ... *13. problem problem problem problem problem ... 13. problem problem problem problem problem ... which he apparently never proofread. Ideally, what I'd like to do is have something called \itemstar, which works exactly like \item, only with a boldfaced asterisk in front. The problem is that there are occasionally nested {enumerate} environments, and the difficult part is only a subitem of a single problem, so I need it to work on any level of enumeration. LaTeX stores the current enumeration depth in \@enumdepth, and the current item number (in the proper style for that enumeration depth) in \theenumi, \theenumii, \theenumiii, and \theenumiv. So, I tried various combinations (which I presumed would have problems), and finally came up with this: \catcode`@=11 \edef\itemstar#1{\item[{\bf *}\theenum\romannumeral\@enumdepth] \advance\enum\romannumeral\@enumdepth by 1} \catcode`@=12 I wanted the definition to translate \theenum\romannumeral\@enumdepth into \theenumi .. \theenumiv depending on the \@enumdepth, but it complains that \theenum isn't defined, which is true. I can't seem to get it to expand the \romannumeral\@enumdepth and tack that onto \theenum to get the proper macro. This goes for the \advance command as well---I really need that \enum\romannumeral\@enumdepth expanded. Any good ideas? --Ken McGlothlen mcglk@max.acs.washington.edu mcglk@max.bitnet mcglk@scott.biostat.washington.edu ------------------------------ Date: Wed, 20 Jul 88 01:43:37 EDT From: Mike DeCorte Subject: LaTeX problem? In the local guide on line 182 there is the command \hbox{\verb|\input|} I find this odd as the LaTeX manual says that \verb cannot be used in the argument to a command. I also don't see why the \hbox is needed. Why did Leslie Lamport do this? Also, in an itemize env, if I have a \item \hbox{a} b c the "a" will be put to the above the bullet to the left. As I expected a \leavevmode fixes it but, I would still like to know if this is expected (read documented) behavior and I have missed something obvious. Michael DeCorte // (315)268-2292 // P.O. Box 652, Potsdam, NY 13676 Internet mrd@sun.soe.clarkson.edu // Bitnet mrd@clutx.bitnet ------------------------------ Date: Thu, 21 Jul 88 01:52:23 EDT From: Mark W. Eichin Subject: re: verbatim mode [TeXhax Digest V88 #65] >Date: Thu, 14 Jul 88 16:31:44 GMT >From: Marion Neubauer <$90%DHDURZ1.BITNET@Forsythe.Stanford.EDU> >I need an environment which does the same things that verbatim does, >but it should accept one command: "\input{...}". I dealt with this problem for my thesis with the following mutation of the \begin{verbatim} from latex.tex. The \begin{code} environment is from Tim Shepard, which was just a verbatim environment that allowed line breaking (undoing a bugfix in latex.tex :-). The \begin{frepcode} environment was built from it, with the \input embedded in it, designed for inputting raw code files. There are some vestiges of an attempt to make tabs (%%I) work; all of my attempts have failed (and I had to turn the thesis in regardless). Sorry for the lack of comments; this stuff was written and transmogrified under pressure of thesis deadlines by several people. The \Spacing changes were done to make sure code was single spaced; the thesis itself had to be double spaced (brain damaged MIT thesis requirements...) At some point it should be improved (I would really like to see tabs working!) or replaced with a real language specific code environment. Mark Eichin SIPB Member & Project Athena ``Watchmaker'' Usage: \begin{frepcode}{filename}\end{frepcode} \begin{code} code segment \end{code} File: % Utility stuff from Tim Shepard (shep@ptt.lcs.mit.edu) % % It defines appropriate stuff so you can do \begin{code} ... \end{code} % %% hacked [eichin:19880515.1257EST] to do frepcode and other stuff. \typeout{Useful Crunchy LaTeX pieces, frepcode} \newcommand{\Spacing}[1]{ \renewcommand{\baselinestretch}{#1} \tiny \normalsize } \catcode`\@=11\relax {\catcode`\ =\active\gdef\@vobeyspaces{\catcode`\ \active \let \@xobeysp}} \def\@xobeysp{\leavevmode{} } \begingroup \catcode `|=0 \catcode `[= 1 \catcode`]=2 \catcode `\{=12 \catcode `\}=12 \catcode`\\=12 |gdef|@xcode#1\end{code}[#1|end[code]] |gdef|@sxcode#1\end{code*}[#1|end[code*]] |endgroup \def\@scode{\obeyspaces\@code} \def\@code{\trivlist \Spacing{1.0} % \item[]\if@minipage\else\vskip\parskip\fi \leftskip\@totalleftmargin\rightskip\z@ \parindent\z@\parfillskip\@flushglue\parskip\z@ \@tempswafalse \def\par{\if@tempswa\hbox{}\fi\@tempswatrue\@@par} \obeylines \small\tt \let\do\@makeother \dospecials} \begingroup \catcode `|=0 \catcode `[= 1 \catcode`]=2 \catcode `\{=12 \catcode `\}=12 \catcode`\\=12 |gdef|@xfrepcode#1\end{frepcode}[#1|end[frepcode]] |gdef|@sxfrepcode#1\end{frepcode*}[#1|end[frepcode*]] |endgroup \def\@sfrepcode{\obeyspaces\@frepcode} \def\@frepcode{\trivlist \Spacing{1.0} % \item[]\if@minipage\else\vskip\parskip\fi \leftskip\@totalleftmargin\rightskip\z@ \parindent\z@\parfillskip\@flushglue\parskip\z@ \@tempswafalse \def\par{\if@tempswa\hbox{}\fi\@tempswatrue\@@par} \obeylines \small\tt \let\do\@makeother \dospecials} \catcode`\%%I=\active \gdef%%I{\mbox{\space\space\space\space\space\space\space\space}} \def\frepcode#1{\@frepcode % \frenchspacing\@vobeyspaces\catcode`\%%I=\active \@xfrepcode\input{#1}} \let\endfrepcode=\endtrivlist \def\code{\@code \frenchspacing\@vobeyspaces\catcode`\%%I=\active \@xcode} \let\endcode=\endtrivlist \catcode`\%%I=10 \catcode`\@=12 %% end Mark Eichin SIPB Member & Project Athena ``Watchmaker'' ------------------------------ Date: Thu, 21 Jul 88 14:12:39 HMT From: FRAGIAD%GRCRUN11.BITNET@CUNYVM.CUNY.EDU Hi from Crete. Does anybody out there has modified Cnaf's TeX previewer so as to use GF(or PK) files instead of PXL's ? Also is there any modification of dvi2ps(in c) to use PK files and a change file for gftopk.web(pktype,web,pktopxl.web) for Vax/Vms? Also since I am new to TeX world could someone give some more information on PK file format. Thanks for your answers and time. Bye. p.s.Replies to sxoinas@grcrvax1 ------------------------------ Date: Thu, 21 Jul 88 15:19:12 ECT From: HANCHE%NORUNIT.BITNET@CUNYVM.CUNY.EDU In TeXhax #65 Marion Neubauer wants a \verbatim environment in which she can say \input{...} and actually have the file input. While that seems a bit difficult to do, I have found a solution that might be better: \makeatletter \newcommand{\verbinput}[1]{{\@verbatim\frenchspacing\@vobeyspaces \input{#1}\endtrivlist}} \makeatother (If the definition above is done in a .sty file the \makeatletter and \makeatother commands can be omitted.) It is now possible to say \verbinput{foobar.c}, which results in the C file being typeset just like it had been included in a verbatim environment. The above solution was easily found by looking at the definition of \verbatim in latex.tex. - Harald Hanche-Olsen ------------------------------ Date: Thu 21 Jul 88 07:17:46-PDT From: BELL%KUPHSX.SPAN@STAR.STANFORD.EDU (Did someone need a Subject: TeX and METAFONT on SPAN I've been very busy the last few months since I've been able to FTP. We've been able to upgrade to just about the most recent versions of all TeX- and METAFONT-related software. The following versions are what we currently (21 July 1988) have on our system (KUPHSX, 7.220): Program Version Comments --------- ------- -------- BibTeX 0.99c No one uses it here (yet), but it is functional. LaTeX 2.09 Dated 25 Jan 1988 SliTeX 2.09 Released 10 November 1986. Again, no one here uses it, but it is functional, although lacking some of the font sizes. DVIIMP 0.92 No VMS change file. GFread 1.0 No VMS change file. GFtoDVI 1.7 GFtoPK 1.4 GFtoPXL 2.1 GFtype 2.2 METAFONT(MF) 1.4 MFT 0.3 PKtoPX 2.3 VMS change file in progress. PKtype 2.2 PXtoPK 2.3 VMS change file in progress. DVItype 2.8 No one uses this. PLtoTF 2.3 No one uses this. POOLtype ?? No version number available. Not used. TANGLE 2.8 TeX 2.92 TFtoPL 2.5 No one uses this. WEAVE 2.9 DVItoVDU 2.0 Includes locally written driver for ENVISION 220/230 terminals (a.k.a. Lear-Siegler 7105/7107) DVI2LN3 13.0 Locally modified version of Flavio Rose's DVI2LN3 V12. Improved DCL interface, modified PXL directory structure, PXL and font directory specifications, PK-reading capability, and much more. Although I have obtained many of these things from other sources, most of the software which we are currently running is essentially the distribution from Stanford for VMS systems. We have not, however, gotten a legitimate distribution tape from Stanford for somewhere around two years. Recent upgrades are all due to FTP's from Stanford. We obviously have some omissions (mostly METAFONTware). We have an older version of TeX in C, as well as much of the Rochester LaTeX style files, although I must admit they are from >6 months ago and as such are also out of date. We also run our own brand of TeX (called KUTeX) which is an enhancement of "plain" TeX. VMS Difference files are available for people who are running lower versions of TeX and METAFONT. These are on TeX_DISK:[TeX82] in the SOURCES and MF subdirectories, respectively. They have the extensions DIF. For TeX, there is a difference file for V2.0 -> V2.7, one for V2.7 -> V2.9, and on for V2.9 -> 2.92. For METAFONT there is one for V1.0 -> V1.3 and one for V1.3 -> V1.4. These files are considerably smaller than the WEB source for either program, so these are the preferred files to copy. Ed Bell ------------------------------ %%% %%% Concerning subscriptions, address changes, unsubscribing: %%% BITNET: send a one-line mail message to LISTSERV@TAMVM1.BITNET: %%% SUBSCRIBE TEX-L % to subscribe %%% %%% All others: send mail to %%% texhax-request@score.stanford.edu %%% please send a valid arpanet address!! %%% %%% %%% All submissions to: texhax@score.stanford.edu %%% %%% Back issues available for FTPing as: %%% machine: directory: filename: %%% [SCORE.STANFORD.EDU]TEXHAXnn.yy %%% nn = issue number %%% yy = last two digits of current year %%%\bye %%% ------------------------------ End of TeXhax Digest ************************** -------