TeXhax Digest Sunday, December 9, 1990 Volume 90 : Issue 074 Moderators: Tiina Modisett and Pierre MacKay %%% 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: Bug in TeX? Strange things happening with entirely blank character manpage.sty Using auxiliary files with TeX In re latest TeX-hax (cropmarks, topglue) Re: \topglue ---------------------------------------------------------------------------- Date: Wed, 5 DEC 90 16:56:46 GMT From: TEX@rmcs.cranfield.ac.uk Subject: RE: Bug in TeX? Strange things happening with entirely blank character Keywords: TeX, bug, blank character In TeXhax Digest V90 #63 of Thu, 6 Sep 90 20:58 N, KNAPPEN%VKPMZD.Physik.Uni-Mainz.de@UWAVM.ACS.WASHINGTON.EDU wrote: > a strange thing happened to me while I used Leslie Lamport's testfont to > test the font eusm10 and eusb10. In position oct060 occured a {\tt x} and > a {\H} respectively during the \table test. These characters have nothing > to do with the tested fonts and look quite arbitrary to me. Did you try looking at TeX's output using a previewer as well as a hard-copy driver? > A closer look using gftype proved that \char48 (=oct060) is an empty character. > > The same thing happened to me while testing homemade fonts in which I left > positions free with an entirely blank character. > > The character TeX choose to fill the place seems to be unpredictable, but > several runs gave the same ersatz character. > > So what happens? > > I'm working on a VAX under VMS5.3-1 and having > METAFONT 1.0, TeX 2.93, testfont has no version number or date specified. I don't think this last bit of information is actually relevant to your problem: from the symptoms you describe, I think it more probable that the fault is actually in your device driver(s) --- after all, there's no way that TeX's output could have told you that you'd got an \H character. I'm 99.9999\% certain that the problem does not lie in TeX. So the question is: which device driver are you using? I *know* that this sort of thing can happen with drivers, because I ran into the difficulty myself when developing my DVItoLN03 program for VAX/VMS. The scenario there was that DVItoLN03 came to down-loading an empty glyph, and constructed an appropriate character definition in the font download command: this did not cause any device error when sent to the LN03 (I think that, if the device can't correctly handle something sent in a font download, that it should say so at the time). However, when the glyph was later imaged onto the page, the device seemed to take an arbitrary character from other downloaded fonts. The problem was fixed by always downloading an empty glyph as having at least one row of all white pixels. A further bug-fix was required for certain characters (such as the / produced by \not) which are non-empty but have zero, or sometimes negative, widths. At a later date, I had to make further changes to DVItoLN03: it was reported that Geogia Tobin's Copperplate font caused problems --- this was traced to the font containing an undefined (not an empty) character which nevertheless featured in some ligature sequences. This led to an error message when the driver attempted to download the non-existent character, if it was specified alone (e.g. by testfont). I suggest that you try looking at the output with a number of different DVI processors, and then get in touch with the supplier of the offending one(s). (And if you're using DVItoLN03, pick up the latest version from one of the servers: I fixed the first of these bugs over two years ago.) Brian {Hamilton Kelly} + JANET: tex@uk.ac.cranfield.rmcs + + BITNET: tex%uk.ac.cranfield.rmcs@ac.uk + + INTERNET: tex%uk.ac.cranfield.rmcs@nsfnet-relay.ac.uk + + UUCP: ...!mcvax!rmcs.cranfield.ac.uk!tex + + OR ...!ukc!rmcs.cranfield.ac.uk!tex + + Smail: School of Electrical Engineering & Science, Royal Military + + College of Science, Shrivenham, SWINDON SN6 8LA, U.K. + + Phone: Swindon (0793) 785252 (UK), +44-793-785252 (International) + ----------------------------------------------------------------------------- Date: Wed, 28 Nov 90 12:16:31 -0600 From: Rong Chen Subject: manpage.sty Keywords: manpage.sty %%Moderator`s note: The file described below is too lond to be included %%in the Digest. It is available upon request from TeXhax-request@june. washington.edu. This is the latest version of manpage.sty. It is basically the same as the one I put on the net last week, but the code is much cleaner and I added the parameter auto indentation feature (see the comments bellow). The \dq macro is removed (use \" instead). I hope I won't update manpage.sty as frequent again. Enjoy. A copy of this file and cprog.sty will be at clarkson archives soon. -Rong Chen ------------------------------------------------------------------------------- Date: Wed, 5 DEC 90 16:16:29 GMT From: TEX@rmcs.cranfield.ac.uk Subject: Using auxiliary files with TeX Keywords: TeX, auxilliary files Brian In TeXhax Digest V90 #68 of Wed, 24 Oct 90 09:04:25 +0200, Malki Cymbalista wrote: > I am trying to get TeX to create an external file for table of > contents, > references etc. I am running on a VAX/VMS and even though the file > gets created, when TeX tries to read in the file, I get an error > message saying that it can't find the file. Does anybody running > on a VAX under VMS have experience creating external files? > Any help will be appreciated. This may be a stupid question, but did you close the file before attempting to read from it? If TeX under VMS has still got a file open for write, it can't be opened for read. Of course, by the time TeX has failed on you, and you've aborted it (or whatever), then the file *is* there (and readable). If you haven't considered this, try an \immediate\closeout for the file before you try to re-open it for reading. Brian {Hamilton Kelly} ------------------------------------------------------------------------------- Date: Wed, 5 DEC 90 10:56:45 BST From: CHAA006@vax.rhbnc.ac.uk Subject: In re latest TeX-hax (cropmarks, topglue) Keywords: TeX, cropmarks, topglue Topglue: There appear to be only two references in the eighteenth edition: Page~340: \topglue 1in % This makes an inch of blank space (1in=2.54cm) Page~352: \def \topglue {\nointerlineskip \vglue-\topskip \vglue} % for top of page Cropmarks: The following `CropMarks' file was written for plain TeX, but after a simple modification (replacement of \pageno by \count 0 ) appears to work OK under L@TeX. I would be interested to learn of any problems. [Start of included file: TeX_Inputs:CropMarks.TeX;2] %%% Usage: %%% \input cropmarks %%% \topcropmark = [plus ] [minus ] %%% \bottomcropmark = [plus ] [minus ] %%% \leftcropmark = [plus ] [minus ] %%% \rightcropmark = [plus ] [minus ] %%% \rvcropmarkstrue ;;; iff you want alternating cropmarks only %%% Square brackets indicate optional items, and the s are %%% respectively (and all measured w.r.t. the origin, which is the %%% top left corner of the notional, rather than physical page; the %%% exact origin will need to be determined by inspection) %%% The distance to the centre of the cross; %%% The distance which the cross extends beyond the page limits; %%% The distance which the cross extends within the page limits. %%% Any or all can be zero s. For conventional (exo-) cropmarks, the %%% `plus' component indicates the length of the mark, and the `minus' component %%% should be omitted or zero. For inverted (endo-) cropmarks, the `plus' %%% component should be omitted or zero, and the `minus' component indicates the %%% length of the mark. `Plus' and `minus' components will never be negative; %%% the first and only mandatory component may be negative to cope with %%% pathological origins. % \message {CROPMARKS.TEX V1.2 Copyright (C) 3-SEP-1990 19:11:20 Philip Taylor} % % %%% A test which will allow us to be read regardless of the \catcode of `@' % \newif \ifatletter \ifcat @A\atlettertrue \else \catcode `\@ = 11 \atletterfalse \fi % %%% Miscellaneous variables % \newif \ifrvcropmarks \rvcropmarksfalse \newdimen \cropmarkwidth \cropmarkwidth = 0.4 pt \newdimen \t@pshift \newdimen \b@ttomshift \newdimen \l@ftshift \newskip \topcropmark \newskip \leftcropmark \newskip \rightcropmark \newskip \bottomcropmark \newskip \m@rkskip \newskip \m@rkplus \newskip \m@rkminus \newbox \p@gebox \newbox \cr@pmarkbox \newbox \topcr@pmarkbox \newbox \bottomcr@pmarkbox % %%% Extraordinary arcanery, to parse s into s; any better ways ? % \begingroup \catcode `\P = 12 \catcode `\L = 12 \catcode `\U = 12 \catcode `\S = 12 \catcode `\M = 12 \catcode `\I = 12 \catcode `\N = 12 \catcode `\T = 12 \globaldefs = 1 \lowercase {% \def \p@rseskip #1% {\expandafter \p@rs@skip \the #1 PLUS 0.0PT MINUS 0.0PT \@ndparse #1 } \def \p@rs@skip #1 PLUS #2 MINUS #3\@ndparse #4 {% \m@rkskip = #1% \m@rkplus = #2% \m@rkminus = #3% \ifdim \m@rkminus = 0.0 pt \expandafter \p@rs@sk@p \the \m@rkskip MINUS 0.0PT \@ndparse \fi %%% \message {#4 = \the \m@rkskip+\the \m@rkplus-\the \m@rkminus}% }% \def \p@rs@sk@p #1MINUS #2\@ndparse {\m@rkskip = #1 \m@rkminus = #2 } } \endgroup % %%% Take control of \shipout, to force it to add cropmarks % \let \ship@ut = \shipout \def \shipout {\futurelet \b@x \whichb@x} \def \whichb@x {% \ifx \b@x \vbox \def \n@xt {\setbox \p@gebox = }% \afterassignment \Shipout \else \ifx \b@x \hbox \def \n@xt {\setbox \p@gebox = }% \afterassignment \Shipout \else \ifx \b@x \box \def \n@xt {\setbox \p@gebox = }% \afterassignment \Ship@ut \else \ifx \b@x \copy \def \n@xt {\setbox \p@gebox = }% \afterassignment \Ship@ut \else \def \n@xt {\ship@ut}% \message {Sorry, can't understand what follows \shipout}% \fi \fi \fi \fi \n@xt } \def \Shipout {\aftergroup \Ship@ut} \def \Ship@ut {% \setbox \topcr@pmarkbox = \hbox \bgroup \p@rseskip \leftcropmark \ifrvcropmarks \ifodd \count 0 \let \next = \phantom \else \let \next = \relax \fi \else \let \next = \relax \fi \next {% \vrule height \cropmarkwidth depth 0 pt width \m@rkplus \bgroup \p@rseskip \topcropmark \vrule height \m@rkplus depth \m@rkminus width \cropmarkwidth \egroup \rlap {\vrule height \cropmarkwidth depth 0 pt width \m@rkminus}% }% \hskip \m@rkskip \p@rseskip \rightcropmark \hskip \m@rkskip \ifrvcropmarks \ifodd \count 0 \let \next = \relax \else \let \next = \phantom \fi \else \let \next = \relax \fi \next {% \llap {\vrule height \cropmarkwidth depth 0 pt width \m@rkminus}% \bgroup \p@rseskip \topcropmark \vrule height \m@rkplus depth \m@rkminus width \cropmarkwidth \egroup \vrule height \cropmarkwidth depth 0 pt width \m@rkplus }% \egroup \ht \topcr@pmarkbox = 0 pt \dp \topcr@pmarkbox = 0 pt \wd \topcr@pmarkbox = \wd \p@gebox \setbox \bottomcr@pmarkbox = \hbox \bgroup \p@rseskip \leftcropmark \ifrvcropmarks \ifodd \count 0 \let \next = \phantom \else \let \next = \relax \fi \else \let \next = \relax \fi \next {% \vrule depth \cropmarkwidth height 0 pt width \m@rkplus \bgroup \p@rseskip \bottomcropmark \vrule depth \m@rkplus height \m@rkminus width \cropmarkwidth \egroup \rlap {\vrule depth \cropmarkwidth height 0 pt width \m@rkminus}% }% \hskip \m@rkskip \p@rseskip \rightcropmark \hskip \m@rkskip \ifrvcropmarks \ifodd \count 0 \let \next = \relax \else \let \next = \phantom \fi \else \let \next = \relax \fi \next {% \llap {\vrule depth \cropmarkwidth height 0 pt width \m@rkminus}% \bgroup \p@rseskip \bottomcropmark \vrule depth \m@rkplus height \m@rkminus width \cropmarkwidth \egroup \vrule depth \cropmarkwidth height 0 pt width \m@rkplus }% \egroup \ht \bottomcr@pmarkbox = 0 pt \dp \bottomcr@pmarkbox = 0 pt \wd \bottomcr@pmarkbox = \wd \p@gebox \setbox \cr@pmarkbox = \vbox \bgroup \offinterlineskip \p@rseskip \leftcropmark \l@ftshift = \m@rkskip \p@rseskip \topcropmark \t@pshift = \m@rkskip \p@rseskip \bottomcropmark \b@ttomshift = \m@rkskip \advance \l@ftshift by \m@rkplus \advance \l@ftshift by \cropmarkwidth \vskip -\t@pshift \moveleft \l@ftshift \box \topcr@pmarkbox \vskip +\t@pshift \vskip +\b@ttomshift \moveleft \l@ftshift \box \bottomcr@pmarkbox \vskip -\b@ttomshift \egroup \setbox \p@gebox = \vbox {\offinterlineskip \box \cr@pmarkbox \box \p@gebox}% \ship@ut \box \p@gebox } % %%% Restore \catcode of `@' % \ifatletter \else \catcode `\@ = 12 \fi % %%% All done % ---------------------------------------------------------------------------- Date: Wed, 5 Dec 90 16:04:33 +0100 From: maavl@cwi.nl Subject: Re: \topglue Keywords: \topglue, TeX 3.0 As the inspirator of the \topglue macro I feel obliged to post this reply to Dominik Wujastyk's question in TeXhax Digest V90 #073 concerning that macro. It is probably one of the very few macros introduced in plain.tex for TeX 3.0 that is not related to its increased functionality. The ``raison d'\^etre'' of \topglue is the fact that the old \vglue does not have the desired effect when used for its probably most frequent purpose, namely to create white space at the top of a page. The stated goal of \vglue is to ``get vertical space that never disappears'' (The TeXbook p. 352), and indeed, the glue never disappears, in particular at the top of a page where it normally would. When you say \vglue you get the following items on the current vertical list \hrule height 0pt % an invisible rule that protects the following \penalty 10000 % to prevent a break AFTER the rule \vskip and the parameter \prevdepth is reset to the value it had before the \vglue. When this appears in mid-page, there is no visible difference with \vskip, but when a page break occurs before the \vglue, you will get white space at the top of the next page that you otherwise wouldn't. How much? Too much! The top of the page will look as follows: \vskip\topskip % that's 10pt, normally \hrule height 0pt % the three \penalty 10000 % items produced \vskip % by \vglue \vskip % or possibly nothing, see below box L % the first line (or box) following \vglue ... The is the amount that would ordinarily be computed between the last box before the \vglue (which is now on the previous page) and the box L displayed as last item of the above list, or if there is no previous box, the \vskip isn't there at all. In absence of \vglue there would also have been \topskip glue, but it would have been diminished by the height of \box L, so indeed \vglue always produces a positive amount of additional space not asked for. To make things worse, the exact amount of extra space depends on the previous page, so it may occur (as once happened to me) that a document starting with \vglue, that will fit on one page when processed in isolation, will refuse to fit when included into a larger whole and preceded by \vfil\eject to force it onto a fresh page! For the indicated reasons, \vglue is NOT the right thing to use when you are certain to be at the beginning of a page. Therefore plain.tex now has a macro \topglue to use in such circumstances. It is defined by \def\topglue{\nointerlineskip\vglue-\topskip\vglue} % for top of page and as you can see, the mentioned problems are solved (the \nointerlineskip discards the \prevdepth, and thereby the dependency on the previous page) and I believe this would even have been so if the second \vglue were \vskip. In case you are using an old plain.tex format, you can simply include the line above into your macros, and files assuming the new format will run happily (in this respect). Let me summarise when to use \vglue and when \topglue: always use \topglue when you are sure to be at the top of a page (at the very beginning or after \eject), and use \vglue on other occasions where you want white space that aught not disappear, should it happen to come at the top of a page. The latter is probably quite rare (maybe to reserve space for an illustration), but if you do use \vglue, be sure to precede it by a valid breakpoint (e.g., by \vskip0pt) because \vglue all by itself allows no break, and there is no point using \vglue if you are sure there is NO page break preceding it (in such cases \par\nobreak\vskip more clearly shows your intentions). Marc van Leeuwen, maavl@cwi.nl ----------------------------------------------------------------------- %%% 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 %%% JANET users may choose to use %%% texhax-request@uk.ac.nsf %%% All submissions to: TeXhax@cs.washington.edu %%% %%% Back issues available for FTPing as: %%% machine: directory: filename: %%% JUNE.CS.WASHINGTON.EDU TeXhax/TeXhaxyy.nnn %%% yy = last two digits of current year %%% nnn = issue number %%% %%%\bye %%% End of TeXhax Digest ************************** -------