Subject: TeXhax Digest V90 #26 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 Sunday, March 4, 1990 Volume 90 : Issue 26 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: Designing fonts in Metafont Re: BibTeX and ieee[tr].bst Printing LaTeX on 14" paper on the HP Laser II + LaTeX: implementing designs that have \parindent zero A nestable verbatim environment, with escape character ---------------------------------------------------------------------------- Date: Mon, 26 Feb 90 10:29:23 +0200 From: Dov Peter Grobgeld Subject: Designing fonts in Metafont Keywords: METAFONT fonts I am working on the design of Hebrew fonts for metafont and in connection with that I have run into a couple of questions that I would like to ask the TeX and MetaFont communities. In Chapter 24 of the MetaFont book "Discreteness and Discretion" Donald E Knuth writes "...a person with a good bitmap program will be able to optimize an entire font in less than an hour." Where is this kind of bitmap program available? Preferable for PC, but a macintosh version or a IBM-VM/CMS version will do as well. My second question concerns pens. As an old calligrapher I am bothered by not being able to have an arbitrary pen shape (I would make it look like my ink nibs) and to rotate it during the penstroke at the same time with the PLAIN metafont macros. Has anybody written any macros for MetaFont which implements this? My last request is if anybody could send me, or tell me where is available an executable MetaFont program for the PC. It is my intention that if and when these Hebrew fonts are finished they will be donated to the public domain. --------------------------------------------------------------------------- Date: Mon, 26 Feb 1990 6:57:52 PST From: Oren Patashnik Subject: Re: BibTeX and ieee[tr].bst Keywords: BibTeX, ieee.bst > Date: Wed, 7 Feb 90 10:05:59 EST > From: smith%zeus@harvard.harvard.edu (Steven Smith) > > Does anyone have a version of ieee.bst that is compatible with BibTeX > v0.99c? The style file you refer to is actually called ieeetr.bst. The version for 0.99c is FTPable from sun.soe.clarkson.edu, the Clarkson style collection. > Our older version (Howard Trickey's original of 9/30/85) generates > errors when we use BibTeX (v0.99c). Strangely, BibTeX (v0.98i) works > just fine with the old (and only?) version of ieee.bst. The incompatibility you describe is explained on the very first page of "BibTeXing", which is the primary documentation for BibTeX (aside from what appears in the LaTeX manual). If your system doesn't have that document (it's in file btxdoc.tex), you should complain to your system's LaTeX/BibTeX installer or to your distribution source. --Oren Patashnik (opbibtex@neon.stanford.edu) -------------------------------------------------------------------------- Date: Fri, 23 Feb 90 15:07:22 AST From: "Marc E. Beland UPEI C.C." Subject: Printing LaTeX on 14" paper on the HP Laser II + Keywords: LaTeX, printing, hp Laser II + Greetings and hello! Thanks to all who replied. I have not yet seen the issue of the TeXhax digest that published my letter, but I have already had 4 replies. I contacted Mr. Beebe directly and his reply stated that: \begin{quote} The problem is that the 2.10 drivers have clipping limits hard-compiled into them that govern the page size. DVIJEP needs to be recompiled with a larger YPSIZE. \end{quote} We did just that, and the problem was solved! It did not affect the regular letter size (8.5" x 11") paper output. BTW, we are using \LaTeX on a VAX 8550 under VMS 5.something, and our PRINT program has all the necessary control sequences to specify such things as legal paper. ---------------------------------------------------------------------------- Date: Mon,26 Feb 90 14:43:18 GMT From: David_Rhead%vme.ccc.nottingham.ac.uk@NSFnet-Relay.AC.UK Subject: LaTeX: implementing designs that have \parindent zero Keywords: LaTeX, \parindent BACKGROUND Many manuals, etc., have designs in which paragraphs are distinguished by "blank lines", rather than by having the first line indented. A potential problem with such designs is that, if other features of the document also involve "blank lines", the document's paragraph structure may be unclear to the reader because of the "blank lines" associated with the other features. Therefore, with designs that have a "blank line" between paragraphs and don't indent the first line of a paragraph, it is desirable to have: - no additional vertical space around lists - no additional vertical space around verbatim. (For otherwise, if there's a blank line and new sentence after the list/verbatim, how is the reader to recognise the difference between "end of list/verbatim, followed by new paragraph" and "end of list/verbatim, followed by continuation of current paragraph"?) I have a couple of queries that arise from trying to close up the space around lists and verbatim in line with the above, in designs that have \parskip non-zero and \parindent set to zero. FIRST QUERY: END OF LIST If one starts hacking at (say) article.sty and art11.sty with a view to getting new .sty files that implement a design such as that envisaged above, most of what is required can be obtained by things like \parskip=0.5\baselineskip \parindent \z@ and \def\@listI{\leftmargin\leftmargini \parsep \z@ \topsep -\parskip \itemsep \z@} (with similar changes to the other \@list things), and \listparindent 1em in \def\enumerate, \def\itemize and \def\description. Here, the \topsep -\parskip is to get rid of the vertical space that latex.tex puts at the start/end of each list (see Figure 5.3 in Lamport's book), and the \listparindent is to distinguish between paragraphs within the list (because, paradoxically, having decided that the body of the text is to have un-indented paragraphs, with the consequence that vertical space needs eliminating within lists to clarify the paragraph divisions in the body of the text, one is left having to indent paragraphs within lists in order to clarify any paragraph divisions within a list item). The problem arises from the sentence on page 114 of Lamport's book: "The vertical space following the environment is the same as the one preceding it". So, if my .sty file eliminates vertical space before a list, it seems that I lose the vertical space after the list too, even if that space is needed to specify "new paragraph". Thus all my lists come out looking like "lists within paragraphs" and I have to resort to visual design (i.e. individual \vspace{\parskip} commands) to recover the distinction between the two logical cases: - "\end{itemize} followed by blank line" = "list at end of paragraph" - "\end{itemize} not followed by blank line" = "list within paragraph". I think that what I really want is "text following a displayed-paragraph environment begins a new paragraph if there is a blank line after the \end command" (as stated on page 165 of Lamport's book). Unfortunately, as far as I can see, "begins a new paragraph" is implemented as "does \hspace{\parindent}" rather than as "does \hspace{\parindent} and \vspace{\parskip}". Whereas latex.tex meticulously keeps track of whether or not a line after a list should be given the horizontal features that mark "new paragraph", it doesn't seem to do the same with the vertical features. The relevant section seems to be that which defines @endparenv. [ I have an old latex.tex and a new one. I find the older one easier to understand and I assume that the new one usually acts like the old one except (as the comment says) when a user has put a \noindent somewhere inconvenient. So I'll describe things in terms of the old one. \@endparenv is defined to \addvspace{\@topsepadd} ... everypar == BEGIN \hskip -\parindent ... END Shouldn't it actually be doing something like \addvspace{\@topsepadd+\parskip} ... everypar == BEGIN \hskip -\parindent \vskip -\parskip ... END i.e. do for vertical paragraph-distinguishing space what it does for horizontal pararaph-distinguishing space? In the "standard styles", \parskip is zero, so this would make no difference. But in styles (such as DEC's, the PostScript manuals, etc.) that have \parindent zero, I assume that it would make the difference between whether "the text following a displayed-paragraph environment appears to begin a new paragraph or not if there is a blank line after the \end command". ] If the place to do this is not latex.tex (or pending an official change to latex.tex), does anyone know of a neat way of redefining environments like enumerate in such a way that an extra \vspace{\parskip} is done "if there is a blank line after the \end command"? LaTeX seems to "know" if there is such a blank line, but the bit of LaTeX that "knows" (latex.tex) seems a long way from the bit of LaTeX that has to use the knowledge (a style-option file). SECOND QUERY: VERBATIM My objective for verbatim is similar to that for lists: to have no extra vertical space before the verbatim text, and to have a \vspace{\parskip} after the verbatim if-and-only-if the user has put a blank line (signifying "new paragraph") after \end{verbatim}. The \def\@listI{\leftmargin\leftmargini \parsep \z@ \topsep -\parskip \itemsep \z@} business mentioned above seems to have an effect on verbatim, which ties in with the way that the definition of verbatim in latex.tex uses trivlist. At 11pt, it gives pre- and post-verbatim space that looks about right (i.e. same as pre- and post- ordinary lines) but, if the verbatim is within a list, the post-verbatim space is insufficient, and the verbatim over-writes the line that should be below. At 10pt, verbatim-within-list looks about right, but verbatim within ordinary text has too much vertical space around it. Is there a neat way to say, in a .sty file, "don't put any extra vertical space before or after verbatim; just put the usual \baselineskip between the baseline of the first verbatim line and that of the preceding line and between the baseline of the last verbatim line and that of the following line (if its part of the same paragraph)"? ------------- David Rhead ------------- P.S. If you're still not clear about the effect required, consider the "design" of this message. I have paragraphs that have un-indented first lines and are separated by blank lines. I have lists with no extra vertical spacing, some of which are clearly at the end of a paragraph, some of which are clearly within a paragraph. Similarly I have some stuff which, if using LaTeX, would be in verbatim: again I have no extra space before/after it, and it is clear whether the verbatim is at the end of a paragraph or is part of a pargraph. I can achieve these effects with a text editor. I'm asking how I can get a .sty file to produce these effects. ---------------------------------------------------------------------------- Date: Mon, 26 FEB 90 15:57:00 GMT From: CHAA006%vaxa.rhbnc.ac.uk@NSFnet-Relay.AC.UK Subject: A nestable verbatim environment, with escape character. Keywords: verbatim environment, nestable In a recent mail message to UK-TeX, Sebastian Rahtz , referring to verbatim mode with an `escape' character, wrote >>> When The Guru Of RHBNC, Phil Taylor, has finished his rewrite of my >>> initial attempt, I'll pass it on..... I certainly wouldn't claim to be a guru (or `gourou', as the French say), but here at least is an apparently-working `nestable verbatim' environment; I would welcome any comments or criticism. If I have time, I will attempt to document it (read: `add comments' ...) and offer it to Barbara Beeton for consideration for TugBoat. -0-0-0-0-0- The idea is as follows: having said \input verbatim at the beginning of ones document, at the point at which verbatim mode is required one says \verbatim What follows can then contain any character, with the single exception of , and all such text will be copied verbatim, with leading spaces retained but invisible, and all embedded spaces retained and shewn. If is encountered, TeX enters a new inner group (the verbatim environment is itself a group), within which the preceding meaning (i.e. \catcode) of all characters is reinstated. This new inner group continues typesetting in the normal (non-verbatim) manner until a further is encountered, whereupon it reverts to verbatim mode; the inner `normal' mode can itself be interrupted by a further \verbatim where can be the same or a different escape character. There is no theoretical limit on the level of nesting, but TeX implementations will invariably run out of space (usually save-stack space) if too many levels are attempted. To end verbatim mode, one enters inner `normal' mode through the escape character and then says \mitabrev Note that this is NOT a reserved string, and is simply a macro which expands to {\endgroup \endgroup}; any other name can be chosen if ``\mitabrev'' is not liked. Finally, a mechanism is provided for listing arbitary files in verbatim mode. If, while in inner `normal' mode one says \AfterGroup {} % note the case of \AfterGroup the will be re-inserted WITH ITS ORIGINAL CATCODES immediately after the closing which terminates inner `normal' mode; thus it will not itself be listed verbatim, but will be elaborated according to TeX's normal conventions; thus if one says \AfterGroup {\input } the contents of the file will be listed in verbatim mode. What follows is the source of Verbatim.TeX, followed by a short extract shewing how it can be used to list itself ... Philip Taylor Royal Holloway and Bedford New College. -0-0-0-0-0- \catcode `\@ = 11 \chardef \l@tter = 11 \chardef \@ther = 12 \newcount \c@unt \newcount \ch@rcode \newif \ifd@bugging \ifd@bugging \let \m@ssage = \message \else \def \m@ssage #1{}\fi % \def \verbatim #1% {\begingroup \def \n@sted {\begingroup \let \n@sted = \endgroup \@nvironment \ignorespaces }% \tt \edef \@nvironment {\parindent = \the \parindent \parskip = \the \parskip \relax }% \parskip = 0 pt \parindent = 0 pt \c@unt = 0 \loop \ifnum \c@unt < `\A% \s@ve \catcode \c@unt = \@ther \else \ifnum \c@unt > `\z% \s@ve \catcode \c@unt = \@ther \else \ifnum \c@unt > `\Z% \ifnum \c@unt < `\a% \s@ve \catcode \c@unt = \@ther \else \s@ve \catcode \c@unt = \l@tter \fi \else \s@ve \catcode \c@unt = \l@tter \fi \fi \fi \advance \c@unt by 1 \ifnum \c@unt < 128 % or 256 for the V3 sites ... \repeat \ch@rcode = `#1% \edef \@nvironment {\@nvironment \catcode \the \ch@rcode = \active \space}% \catcode \ch@rcode = \active \uccode `\^^M = \ch@rcode \@x \uppercase \@x {\@x \def \r@turn {\n@sted}} \uccode `\^^M = 0 \@ctivecr \@ctivespace \v@id }% % \let \@x = \expandafter \def \v@id {\futurelet \n@xt \v@idifspace} \def \k@rn {\leavevmode \kern \fontdimen 2 \font \futurelet \n@xt \k@rnifspace} \def \pr@nt {\char 32\relax} \def \v@idifspace {\testn@xt {\afterassignment \v@id}} \def \k@rnifspace {\testn@xt {}} \def \AfterGroup #1{\global \def \@ftergroup {#1}\aftergroup \@ftergroup} % \def \s@ve #1#2=#3% {\ifnum #1#2 = #3% \else \edef \@nvironment{\@nvironment#1\the #2=\the #1#2 }#1#2 = #3% \fi } % \def \testn@xt #1% {\ifx \n@xt \sp@c@ \m@ssage {Next character is a space}% \let \n@xt = \relax \else \ifx \n@xt \r@t@rn \m@ssage {Next character is a return}% \def \n@xt {#1\let \n@xt = }% \else \m@ssage {Next character is \meaning \n@xt}% \let \n@xt = \relax \@x \let \sp@ce = \pr@nt \fi \fi \n@xt }% % \catcode `\ = \active% \def\sp@ce{ }% \def\@ctivespace{\catcode`\ =\active\def {\v@id}\let\sp@c@= }% \catcode`\ =10\relax % \catcode `\^^M = \active % \def \r@turn {^^M}% \let \r@t@rn = ^^M% \def \@ctivecr % {\catcode `\^^M = \active % \def ^^M% {\@x \def \sp@ce {\k@rn}% \@x \let \@x \sp@c@ \@x =\sp@ce % \endgraf % \futurelet \n@xt \k@rnifspace % }% \let \r@t@rn = ^^M% }% \catcode `\^^M = 5 % % \catcode `\@ = \@ther \def \mitabrev {\endgroup \endgroup} \verbatim | | \AfterGroup {\input verbatim.tex} | | \mitabrev \end ----------------------------------------------------------------------- %%% 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.nn %%% yy = last two digits of current year %%% nn = issue number %%% %%%\bye %%% End of TeXhax Digest ************************** -------