TeXhax Digest Monday, April 18, 1988 Volume 88 : Issue 37 [SCORE.STANFORD.EDU]TEXHAX37.88 Editor: Malcolm Brown Today's Topics: Common TeX 2.9 and SUN OS 3.5 Plain vs. LaTeX (Was: Plain TeX and VMS TeX Installation Problems) Re: DosTeX Bug Re: help: need "proof" environment PCTeX and MicroTeX Vaxinated DVIDIS section-page page numbering Re: PCTeX and MicroTeX Problems with Figure and Table Labels using LaTeX Re: Metafont & 3812 LaTeX nastiness \begindoublecolumns Preventing bibitem from printing [ ] in LaTeX A suggestion to font designers present and future. Re: \begindoublecolumns Problem with table lookup algorithm in TeX ---------------------------------------------------------------------- Date: Wed, 6 Apr 88 22:43:42 +0200 From: mcvax!diku.dk!seindal@uunet.UU.NET (Rene' Seindal) Subject: Common TeX 2.9 and SUN OS 3.5 Common TeX does not compile properly on SUN OS 3.5. Monardo's support for 8 bit input handling breaks the compiler, which says constant 256 is out of range of unsigned char comparison value coerced to 0 for bug compatibility do not expect this coercion in release 4.0 The compilers action just makes things worse. The patch below simply reverts to what is listed in TeX: The program, that is, back to 7 bit input handling (and compability). I am, however, by no means certain that this fix is adequate, but it appears to work. If not, a proper fix should come from Pat Monardo (eliminating this 8 bit stuff, since using incompatible changes is asking for trouble, so why have them). Now that I've bothered, there is another little detail. Compiling Common TeX on a VAX (4.3BSD+NFS) and a SUN 3/280 (SUNOS 3.5) in the "BIG" configuration produces undump'ed programs of about 1.5Mb. Changing the definition of hword in tex.h from "unsigned long" (32~bits) to "unsigned short" (16 bit, which is enough if MAX_HALFWORD < 65536) reduces the size to well below 1Mb, since it effectively halves the storage needed for the mem-array. The sizes below is for a configuration close to Pascal TeX's default. The first is with a 16 bit hword, and the second with a 32 bit hword. text data bss dec hex 162816 743424 0 906240 dd400 /usr/new/tex 157696 1364992 0 1522688 173c00 /usr/new/otex The difference is about 2 month TeXhax. Rene' Seindal, DIKU, U. of Copenhagen. (seindal@diku.dk) ------------------------------ CUT HERE ------------------------------ *** /tmp/,RCSt1013898 Wed Apr 6 21:54:14 1988 --- eval.c Wed Apr 6 21:26:23 1988 *************** *** 543,549 **** l = qi(c); main_loop_3: ! if (c < 256) { s = sf_code(c); if (s == 1000) space_factor = 1000; --- 543,549 ---- l = qi(c); main_loop_3: ! if (c < 128) { /* was if (c < 256), but it broke SUNOS 3.5 */ s = sf_code(c); if (s == 1000) space_factor = 1000; ------------------------------ Date: Thu, 7 Apr 88 16:12:16 PDT From: unido!ubrinf!mond!bengt@uunet.UU.NET (Bengt Martensson) Subject: Plain vs. LaTeX (Was: Plain TeX and VMS TeX Installation Problems) REAL PROGRAMMERS DON'T USE LaTeX ================================ This is kind of a reply on zar@XHMEIA.Caltech.Edu (Daniel M. Zirin) "Plain TeX and VMS TeX Installation Problems". After having used "Plain" TeX for a few years, produced some hundreds of sides (including my PhD-thesis) and truckloads of macros, I switched to use LaTeX. Here is a collection of arguments, in particular geared towards the Plain-LaTeX question for qualified users. Basically, Donald Knuth put his effort on TeX, not the macro package "plain". He did great stuff on "low level things" such as fonts, kerning, ligatures, boxes, glue, math, etc. Knuth then (essentially) left the development there. The macro package plain is less at the heart of Knuth's effort, essentially just "sufficiently good". Even more, the "manmac" he used to produce The TeXbook is absolutely not anything more than something that takes care of the task it was designed to do, namely The TeXbook, with non-general solutions etc. (Later, several bugs have been found.) The way I read The TeXbook it seems fairly obvious to me that TeX, as reported in the book, is a natural ending of Knuth's RESEARCH PROJECT, rather than a user-friendly product. I see LaTeX as a higher level "language". I think it is appropriate to make the comparision Plain-LaTeX with Assembler-High level languages. To produce a more elaborate document you will need some kind of macro package, either you write it yourself or use someone elses (this is really what the phrase "using Plain TeX" means, except possibly for VERY simple documents), or you use a more complete and consistent package. After having written and modified some truckloads of macros, I decide that it was better to use LaTeX for the following reasons: - "Constant" maintenance. What is developped locally always tend to use less general solutions, while LaTeX is general purpose. There is no reason to beleive that a local macro package will ever be as "bugfree" as Latex, not because Lamport is smarter that all local wizards, but because of the time spent and the effort to make a consistent, general purpose product. And, of course, because of the feedback from all of us... - Cooperation with others, documentation. If I am writing something together with another person, possibly at a very distant place, it is a great advantadge to have the used macros documented as in the LaTeX book. LaTeX is more or less developing into a university standard, and I see a lot of good things in this. - Comparing the TeXbook and the LaTeX book: I find the TeXbook a mess. It is written more to finish the project from Knuth's side, than to be a usable software manual. As the latter, I dare to call it BAD. It is written for EVERYBODY in the bad sense of the word. As a manual, and to some extent introduction to typesetting, Lamport's book is superior. A local product will never come close. - LaTeX contains "everything", so you don't have to think about whether to use that or that in every document you produce. To customize LaTeX and Plain is--in principle--hard, and requires knowledge. However, opposed to the general meaning (?), I would argue that the "straightjacket" LaTeX is no harder to customize than plain. (The code is beautifully commented.) It seems to me like all Zirin's arguments all are variations on the theme "Real programmers don't write but assembler". Just let me comment on 4) Portability. LaTeX users may have to carry around style files to make sure it will work the same on another system (this may have changed recently, but I started with pre-TeX80). Plain TeX users have *nothing* to worry about with this regard. This is--at least in principle--wrong. The standard style files, article.sty etc, are a part of LaTeX, and should not be locally changed (but of course brought up to date). Cf. the standard subroutines in C. You can count on--at least in theory--that article.sty etc are available everywhere, and identical. The major problem is "smart" local people who "improve" these... There are certainly several other points I havn't touched upon (in particular "user-friendlyness"). That's for the rest of you. Bengt Martensson +49 421 218-2948 Institut fur Dynamische Systeme, Universitat Bremen +49 421 171713 (home) Postfach 330 440, D-2800 Bremen 33 F.R.G. UUCP: ...unido!ubrinf!mond!bengt ------------------------------ From: Gary Beihl Subject: Re: DosTeX Bug \showbox does indeed break in v. 2.7a. The specific problem (as is so often the case in these PC related things) is an indavertant declaration of the show_node_list() argument as type integer (4 bytes) instead of pointer (2 bytes). The fix is to declare it properly. I will fix it pronto and release v. 2.7b when regression testing is complete. -- Gary Beihl ------------------------------ Date: Fri, 8 Apr 88 18:47:08 PDT From: vojta%steero.Berkeley.EDU@berkeley.edu (paul vojta) Subject: Re: help: need "proof" environment In TeXhax digest 88#30, Martin Peim asks for a way to put the empty box at the end of a proof. I use amstex, so I can only partially answer the question. If the proof ends with text, I adapt the macro from page 106 of the TeXbook: \redefine\qed{{\unskip\nobreak\hfil\penalty50\hskip2em\vadjust{}\nobreak\hfil \qedsymbol\parfillskip\z@\finalhyphendemerits0\par}} If the proof ends with a displayed equation, I use \eqno\qedsymbol. If it ends in a displayed equation with aligned equal signs or which already has an equation number, then I have to resort to more amstex-specific tactics. In any case, I hope this provides you with at least a start. ------------------------------ Date: Sat, 9 Apr 88 01:32 PDT From: Don Hosek Subject: PCTeX and MicroTeX I have noticed that TUG has several PC drivers available; PCTeX and MicroTeX drivers are listed separately. Does this mean that PCTeX and MicroTeX DVI files are somehow (???) different? Or does TUG do this just to distinguish the manufacturers of the programs? -dh ------------------------------ Date: Sat, 9 Apr 88 13:50 N From: Subject: Vaxinated DVIDIS The program DVIDIS by Jerry Leichter was Vaxinated by Nigel Arnot. It is available in our decnet/span depository of Tex goodies. Max Calvani Decnet: 39003::fisica ------------------------------ Date: Thu, 7 Apr 88 15:20:13 pdt From: Mathieu Federspiel Subject: section-page page numbering In case you have not yet figured out how to get: section_# - page_# (e.g. 5-3 , the 3rd page of section 5) The following is what I did in my .sty file to get: chapter_# - page_# (e.g. 5-3 , the 3rd page of chapter 5) Note that you will need to specify \setcounter{page}{1} immediately after each \chapter command for document style book. \countdef\c@page=0 \c@page=1 \def\cl@page{} \def\pagenumbering#1{\global\c@page \@ne \gdef\thepage{\thechapter-\csname @#1\endcsname \c@page}} To get the section, use \thesection rather than \thechapter in the definition of \thepage. --- Matt --- E-mail: mcf%statware.uucp@CS.ORST.EDU Phone: 503-753-5382 Post: Statware, 260 SW Madison Ave., Corvallis OR 97333 USA ------------------------------ Date: Fri, 8 Apr 88 11:51:46 pdt From: Mathieu Federspiel Well, really, the easiest way is: \renewcommand{\thepage}{\thechapter-\arabic{page}} Or \thesection if that is what you want. --- Matt --- E-mail: mcf%statware.uucp@CS.ORST.EDU Phone: 503-753-5382 Post: Statware, 260 SW Madison Ave., Corvallis OR 97333 USA ------------------------------ Date: Sat 9 Apr 88 08:19:04-PDT From: Barbara Beeton Subject: Re: PCTeX and MicroTeX to the best of my knowledge (and according to the rules), the .dvi files from pctex and microtex are not different. however, tug is not itself in the software business, but is redistributing products created by others. the hypothesis that tug is just distinguishing between the source of the programs is exactly what i would conclude without checking explicitly. -- barbara beeton ------------------------------ Date: Sat, 9 Apr 88 13:39 CDT From: Subject: Problems with Figure and Table Labels using LaTeX There is a problem with labeling and referencing of figures and tables. My Vax installation uses LaTeX version 2.9. Here is a short example: * * * \documentstyle{report} \begin{document} This is a test. Here is a standard equation: \begin{equation} y = x~3 \label{eq:standard} \end{equation} This is a Test. Test. Test. Test . \begin{figure} \vspace{1.0in} \label{fig:test1} \caption{Test \#1} \end{figure} Equation \ref{eq:standard} is referenced and figure number \ref{fig:test1} is also referenced. \end{document} * * * This example will produce a number such as "Equation 0.1 is referenced..." according an equation counter. In theory, it should produce: Equation 0.1 is referenced and figure number 1 is also referenced. However, there is a problem in labeling and referencing figures and tables so that the observed results will be: Equation 0.1 is referenced and figure number is also referenced. There is no spelling error in the above line; LaTex did not find a counter label assigned with "\ref{fig:test1}". The auxillary file produced by the LaTeX word processor reads as follows: \relax \newlabel{fig:test1}{{}{1}} \@writefile{lof}{\string\contentsline\space {figure}{\string\numberline\space {0.1}{\ignorespaces Test \#1}}{1}} \newlabel{eq:standard}{{0.1}{1}} Evidently, LaTeX did not write the current figure counter out to the auxillary file. The same problem also exits with Tables. How show I modify the style files so that the "\ref{fig:*}" command can be used for figures and tables? -- Tom Moriarty Department of Geophysics Texas A&M University College Station, Texas WORK@TAMGEOP ------------------------------ Date: Sat, 9 Apr 88 18:07 CST From: Subject: Re: Metafont & 3812 I am providing this summary of the responses on my metafont question (TeXHAX v88 n30). I am having `bad pos' problems with greek letters when generating gf files for the IBM3812 at \magstep3. * Dean Guenther (guenther@wsuvm1) says the TUGboat recommendations v8n2 should be ok. * Doug Henderson (dlatex@ucbcmsa) reports of a similar problem when generating Silvio Levy's greek fonts for the TUGboat. He reports that these fonts are not tuned for low resolution, and `pos' errors will occur. As a test, D. Henderson suggests using high-resolution settings. * Both Malka Cymbalista (vumalki@weizmann) and Gustaf Neumann (neumann@awiwuw11) indicate difficulty in getting any settings to look acceptable on the 3812, but both indicate success with Metafont. M. C. uses write_white:=1; blacker:=.7; fillin:=.4; o_correction:=0; G. N. uses blacker=.78; fillin:=.25; o_correction:=.5; I do not completly understand how to use write_white. Perhaps someone could give me a reference. I am hoping that our staff gets a TeX driver for a better printer ready real soon now so that I can forget about this project (I have a set of terrible-looking pixel files that we can use for drafts on the 3812). Any additional information would be appreciated. Also, I wish to thank the folks mentioned in the above list for the help. --darrel hankerson (hank@auducvax) ------------------------------ Date: Sat, 9 Apr 88 23:24 PDT From: Don Hosek Subject: LaTeX nastiness A user here recently ran into the following difficulty: in the figure environment, using the article document style, he had a \caption command with a very long text. The first time LaTeX went past it, no problem. The second time, however, he got the !TeX capacity exceeded message: buffer size (or some such) message. As it turns out, LaTeX wrote the entire caption to the .AUX file on a single record and then when it tried to read it in again, got messed up. Replacing \caption{...} with \caption[]{...} fixed the problem. I think that the CMS TeX implementation has modified the \write code to avoid these problems (is that true Dean?), but I wonder how many people have been zapped by this particular nastiness. Also, does anybody have a better way of dealing with this problem? It isn't a bug, but on the other hand, I don't think one should need to worry about arguments to a list-of-figures if one won't be printing one. Comments? -dh ------------------------------ Date: Sun, 10 Apr 88 16:09:13 EDT From: Seth Robertson Subject: \begindoublecolumns I am having some trouble getting TeX to print two columns per page. When I used the example of \lr in the TeXbook (Ch. 23 p.257), it worked fine, but I needed the \partialpage-type abilities of \begindoublepage. I typed it in exactly as it appears in Appendix E (p. 417) {yes, I know \onepageout is not defined in plain tes} but it crashed long before it got that far: Source listing: \newbox\partialpage \def\begindoublecolumns{\begingroup \output={\global\setbox\partialpage=\vbox{\unvbox255\bigskip}}\eject \output={\doublecolumnout} \hsize=14pc \vsize=89pc} \def\enddoublecolumns{\output={\balancecolumns}\eject \endgroup \pagegoal=\vsize} \def\doublecolumnout{\splittopskip=\topskip \splitmaxdepth=\maxdepth \dimen@=44pc \advance\dimen@ by-\ht\partialpage \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to \dimen@ \shipout\vbox{\makeheadline \pagesofar \makefootline} \advancepageno \unvbox255 \penalty\outputpenalty} \def\pagesofar{\unvbox\partialpage \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}} \def\balancecolumns{\setbox0=\vbox{\unvbox255} \dimen@=\ht0 \advance\dimen@ by\topskip \advance\dimen@ by-\baselineskip \divide\dimen@ by2 \splittopskip=\topskip {\vbadness=10000 \loop \global\setbox3=\copy0 \global\setbox1=\vsplit3 to\dimen@ \ifdim\ht3>\dimen@ \global\advance\dimen@ by1pt \repeat} \setbox0=\vbox to\dimen@{\unvbox1} \setbox2=\vbox to\dimen@{ \dimen2=\dp3 \unvbox3 \kern-\dimen2 \vfil} \pagesofar} Error-Listing: \tenrm of both the packet- and circuit-switched| ! Missing number, treated as zero. @ \doublecolumnout ...itmaxdepth =\maxdepth \dimen @ =44pc \advance \dimen @ by... {\doublecolumnout } l.87 \par ? - which I took to mean that it didn't know what dimen@ was, which is (hopefully) silly. I would like a fix, or a better solution to my problem. -Thanx Seth Robertson seth@ctr.columbia.edu sjr@cunixc.columbia.edu P.S.: I am running This is TeX, C Version 2.9 (preloaded format=plain 88.1.22) on a Sun 3/50. ------------------------------ Date: Mon, 11 Apr 88 01:04 CDT From: Subject: Preventing bibitem from printing [ ] in LaTeX Someone had probably asked this question already but I ran into this problem only recently. Could anyone on texhax please give me some hints on how I can prevent the square brackets from being printed around the reference numbers in LaTeX? In the text, I am using \cite{abcd} to indicate a reference and in the bibliography file I am listing the references as follows: \bibitem{abcd} authors names, title, etc. Everything works well, but when the references are printed LaTeX puts square brackets around the numbers as [1] author, title, etc. I am having a hard time trying to figure out how to prevent the square brackets being printed so that I could have the references listed in the Artificial Intelligence Journal format as: 1. authors, title, etc. I browsed through the code for \bibitem, \cite and \list and could not figure out where the square brackets are being inserted. If you could also indicate where they are being inserted, it would help me to understand this better. Will appreciate your help. Thank you very much. MURALI@TAMLSR.BITNET ------------------------------ Date: Sun, 10 Apr 88 23:11 PDT From: Don Hosek Subject: A suggestion to font designers present and future. When creating text fonts such as cmr, I would like to suggest that in the kern tables, you include an entry to add extra space between consecutive periods. Thus, with the price of a few extra bytes in the TFM, an ellipsis might be typed as ... rather than $\ldots$. If you feel particularly adventurous, you could add the kern to existing cm fonts using TFTOPL and PLTOTF to edit the TFMs, but then you wouldn't have cm anymore (*sigh*). Does anybody know why Don Knuth didn't do this in the design of cm? It seems to me that there is nothing to be lost and much to be gained by adding kerning as above. -dh ------------------------------ Date: Mon 11 Apr 88 08:48:03-PDT From: Barbara Beeton Subject: Re: \begindoublecolumns in plain.tex, the @ sign is catcode'd to be a letter, which is clearly what you haven't done. (while it's a letter, it can be part of the name of a control sequence.) see the texbook, page 344, about the middle of the page, for knuth's explanation. -- barbara beeton ------------------------------ Subject: Problem with table lookup algorithm in TeX Date: Mon, 11 Apr 88 10:33:02 -0700 From: kelem@aerospace.aero.org I'm having trouble implementing a table lookup algorithm in TeX/LaTeX. I've got the following code: %%%%%%%%%%%%%%%%%%%% \newcount\indexcount % counters for the indexing (table lookup) operation \newcount\indexspot \def\measurements#1{\ifcase#1 0 mm \or 1 mm\or 2 mm\or 3 mm\or 4 mm\or 5 mm\or 6 mm\or 7 mm\or 8 mm\or 9 mm\or 10 mm\fi} \def\indices{\\{1a}\\{1b}\\{2a}\\{2b}\\{3}\\{4}\\{5}} \def\indexnumber#1\of#2\from#3{%find the index of #1 in list #2 \indexcount=0\indexspot=0 \def\given{#1}% \def\\##1{\def\next{##1}\advance\indexcount by 1 % \ifx\next\given\global\indexspot=\indexcount\fi}#2\relax#3\indexspot} \indexnumber{1b}\of\indices\from\measurements~ \indexnumber{2a}\of\indices\from\measurements~ \indexnumber{2b}\of\indices\from\measurements~ \indexnumber{3}\of\indices\from\measurements~ \indexnumber{4}\of\indices\from\measurements~ \indexnumber{5}\of\indices\from\measurements~ \vrule width 3pt height \expandafter{\indexnumber{1a}\of\indices\from\measurements}\ \vfill\eject\end %%%%%%%%%%%%%%%%%%%% This defines two counters for use in the macros. Macros: measurements: a macro that returns the nth measurement in its list of measurments. indices: Text indices (labels) corresponding to each entry in the measurements list. indexnumber: a macro that searches for the 1st parameter in the list that is the 2nd parameter, then returns the corresponding element from the list that is the 3rd parameter. The next 6 lines generate the text "2 mm 3mm 4 mm 5 mm 6 mm 7 mm". The seventh line (the one I'm really trying to get to work) is supposed to create a black box whose height is specified by the entry corresponding to "1a" in the measurement list (i.e. 1mm). Instead, I get the complaint: \indexnumber #1\of #2\from #3->\indexcount =0\indexspot =0 \def \given {#1}\def \\##1{\def \next {##1}\advance \indexcount by 1 \ifx \next \given \global \ind exspot =\indexcount \fi }#2\relax #3\indexspot #1<-1a #2<-\indices #3<-\numbernames ! Missing number, treated as zero. { \indexnumber #1\of #2\from #3-> \indexcount =0\indexspot =0 \def \given {#1}\... l.11 ...ndexnumber{1a}\of\indices\from\numbernames }\ How do I get this to work the way I want? I thought \expandafter would do the trick, but it looks like "height" is trying to get its dimen. I get the same problem if I try to set a dimen register to this indexed value. Thanks for any assistance, Steve Kelem arpa: kelem@aerospace.aero.org uucp: ...trwrb!aero!kelem ...sdcrdcf!aero!kelem ------------------------------ %%% %%% 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 %%% %%%\bye %%% ------------------------------ End of TeXhax Digest ************************** -------