TeXhax Digest Friday, June 10, 1988 Volume 88 : Issue 55 This weeks Editor: Malcolm Brown Today's Topics: dvi to postscript driver Re: Putting a QED at the end of a proof Fig Code to LaTeX Picture Environment Translator Special characters and MF in CMS Re: TeXhax Digest V88 #53 (LaTeX notes) pstex needed Getting TeX up and running on sun-3 Underlined and centred text in LaTeX (revisited) Latest DVITOVDU for VMS ? Indentation after a section heading Problem creating suitable TeX fonts for LN03 on Ultrix Page Imposition for DVI Files tabular problem? Titlepage and footnotetext aren't unnumbered LaTeX raggedright and textheight ---------------------------------------------------------------------- Date: Mon, 6 Jun 88 10:32:03 +0200 (Central European Summertime) From: XGRUMAHR%DDATHD21.BITNET@Forsythe.Stanford.EDU (Christian Mahr) Subject: dvi to postscript driver Hi TeX-Friends, I am looking for a dvi to postskript converter program. We have a VAX-11/730 and a microvax 2000 under VMS 4.7 . Until now we used a NEC-P6 (in graphics mode) with .PK-files (!), so the new driver should use the .pk files. The new printer for which the driver is needed is a LN03, converted for postscript. We are on bitnet, but, as to my knowledge, are not able to 'ftp .. Any help (or pointers)? thanks a lot, Christian Mahr XGRUMAHR @ DDATHD21 . BITNET ------------------------------ Date: Mon Jun 6 13:34:10 MET 1988 From: XITIJSCH%DDATHD21.BITNET@Forsythe.Stanford.EDU Subject: Re: Putting a QED at the end of a proof In TeXhax 1988 #53, Harald Hanche-Olsen answers the question of Adam Lewenberg about the placing of a QED sign. His solution can create a overfull hbox message since he doesn't allow a line break. Furthermore, a minimum of space is often needed between the end of the proof and the QED sign. The QED sign must then be placed on a new line and no page break should occur between the last text line of the proof and the line with the QED sign. The following macro illustrates this: \def\qed{% {% \unskip \nobreak \hfil \penalty 50 % TeX should break here if necessary \hskip 3em % mimium amount of distance \null \nobreak \hfil \qedbox \parfillskip=\z@skip \finalhyphendemerits=\z@ % no line break at last line of paragraph \endgraf % don't know what \par is in this moment... }} The head of this macro was already explained by Harald. The \unskip discards any glue preceding the macro. \nobreak prevents a line break at the \hfil. Afterwards we allow a line break and skip the minimum amount of space (here three quad). This space is discarded if a line break happens -- but this will be acceptable (especially if \hsize happens to be less than 3em...). A null hbox follows to prevent the discarding of the next \hfil. The \qedsign is set, \parfillskip is locally redefined to flush it to the right margin and \finalhyphendemerits is set to prevent a line break. At last the paragraph is ended. This macro must not be called in math mode. It works with LaTeX and PLAIN TeX. I don't work with AmSTeX, so I can't say anything about its behaviour -- but I expect it does the right thing. Joachim TH Darmstadt Institut f\"ur Theoretische Informatik Joachim Schrod Alexanderstr. 24 Bitnet: XITIJSCH@DDATHD21 (Please try again if I don't answer --- D-6100 Darmstadt our Bitnet connection is very instable...) West Germany ------------------------------ Date: Mon, 6 Jun 88 10:21:12 EDT From: beck@cs.cornell.edu (Micah Beck) Subject: Fig Code to LaTeX Picture Environment Translator A colleague of mine at Cornell, Frank Schmuck, has developed Fig2latex, a tool which translates Fig code into LaTeX picture environment commands. This means that (some) figures drawn using the Fig graphics editor can be translated into the LaTeX pictures environment. Since the LaTeX picture environment is quite restrictive, not all figures can be accurately drawn. The translator does the best it can. Drawing lines only at the slopes which LaTeX can handle is quite painful, so Frank enhanced the Fig editor with new modes to make things easier. Two new line drawing modes have been added to Fig. These are used to restrict lines to the slopes at which LaTeX can draw lines and vectors. Even using these enhancements, the user must still be a little careful. A Beta release of Fig2latex is available for anonymous FTP from svax.cs.cornell.edu as fig2latex.tar.Z. It includes the Fig source files which were changed to implement the new line drawing modes. These files were derived from Fig 1.4 Release 2. The release also includes a version of TransFig which takes "latex" as a graphics language option as well as pictex and postscript. Fig2latex is part of the TransFig package, which is available for anonymous FTP from svax as transfig.tar.Z. Micah Beck beck@svax.cs.cornell.edu Dept of Computer Science Cornell University ------------------------------ Date: Mon, 06 Jun 88 10:39:53 CDT From: Don Hosek Subject: Special characters and MF in CMS CMS MF, as it currently stands will not allow special characters permitted in CMS file names (a similar situation may exist with TeX, I haven't checked). The fix is simple: in the CMS-CHAN files for MF and INIMF, in the changes for the routine more_name, remove the comments surrounding the check for special characters and recompile MF and INIMF The restriction on this change is that a MF file name must begin with an alphanumeric character and the revised code doesn't check this. In the future, I may attempt to fix this. -dh ------------------------------ Date: Mon, 6 Jun 88 09:41:08 PDT From: lamport@decwrl.dec.com (Leslie Lamport) Subject: Re: TeXhax Digest V88 #53 (LaTeX notes) Johannes Braams writes I received the following file from one of our users. He was foolish enough not to read the manual well enough and used **illegal** arguments to the \line function. He now wants to know wether or not LaTeX should give him a warning about these illegal arguments, because LaTeX didn't complain, but the result was that he ended up with arrowheads instead of straight lines. What about it? Error checking in LaTeX is haphazard, based upon how much of my or TeX's memory or time it would require, and upon the weather when I was coding it. In LaTeX, as in most TeX macros, you should regard any useful error message as an unexpected boon. Richard H. Fisher writes I am writing a LaTeX style for our graduate school for use in formatting theses and dissertations. Their requirements state that a section heading is to be preceded by a triple space, unless it follows a chapter heading. In this case it is to be spaced normally (a double space). Does anyone have any suggestions as to how I should go about doing this? Thios is about all that I have left to do, and I really have no idea as to how to do this. The suppressed paragraph indentation that follows a section heading, which offends so many users, is done as follows. At the beginning of each paragraph, TeX executes the command \everypar. The sectioning command sets a switch (whose name I forget) and defines \everypar to suppress the paragraph indentation if the switch is set, turn off the switch, and reset \everypar to a no-op. (The reason for having the switch is somewhat obscure... the document-style designer needn't worry about it.) A sectioning command can tell if it immediately follows another sectioning command by testing this switch. The only way that a \section command should follow another sectioning command without any intervening text is if it immediately follows a \chapter command. So, the \section command can test the switch to find out how much space to insert above the heading. Look at the definition of the sectioning commands in the standard document styles (and the command--I think it's called \@startsection--in latex.tex in terms of which they're defined) to find out the name of that switch and to see how it's used. Leslie Lamport ------------------------------ Date: Mon, 6 Jun 88 14:04:23 EDT From: Richard Langston Subject: pstex needed Here in the EE department, we are running a version of Tex that uses compressed (pk) fonts. We have only one problem with this, however: the only version of "pstex" we can locate works only with "gf" fonts. We haven't been able to locate a version that will use pk fonts. "Pstex" is a program that converts dvi files to postscript format for laserwriter output. Can anyone help? We are running assorted Sun 3's under SUN UNIX 3.2 (3.5 soon). Richard Langston Commumications Lab System Manager langston@eneevax.umd.edu (ARPA) ------------------------------ Date: Mon, 6 Jun 88 16:44:11 +0200 From: John Gregor Subject: Getting TeX up and running on sun-3 Typical TeX-neophyte message follows: HELP! I'm trying to get TeX up and running on Sun-3's running SUNOS 3.4. Things went fine for a while, everything compiled, etc. But undump failed miserably. I realize that sun has changed core formats. I've rewritten undump.c to handle the sun format. The resulting tex runs fine until exiting, then it dumps core. The resulting .dvi files are fine. It's just a bit unsightly to leave large coredumps wherever tex goes. So, does anybody have an undump that works. If so, please only tell me that you have one, don't mail it to me. No sense in clogging up the net with 20 copies of the same thing. If not, is there a user transparent workaround using initex or virtex? Here are the version numbers of what we have: TeX 2.0 LaTeX 2.09 tangle 2.8 weave 2.8 dvitype 2.8 pltotf 2.3 tftopl 2.5 pxtoch 1 chtopx 1 metafont 1.0 gftodvi 1.7 gftopk 1.1 gftopxl 2.1 gftype 2.2 pktopx 2.2 pktype 2.1 pxtopk 2.2 Are we seriously out of date? Any help will be appreciated. Thanks John John Gregor johng%ecrcvax.UUCP@pyramid.COM ------------------------------ Date: 6 Jun 88 10:25 -0600 From: Jim Walker Subject: Underlined and centred text in LaTeX (revisited) I managed to solve my problem (borrowing an idea from wsulivan@irlearn.bitnet). The following unsophisticated macro will produce centred and underlined lines, with the inter-word spaces also underlined: % Underlined and centred paragraph macro % Jim Walker, Whiteshell Research, Pinawa, Manitoba % % Usage: \undercentrepar{The text} % \def\undercentrepar#1{\undercentre #1 &} \def\undercentre#1 {\vskip \parskip\newbox\temboxa\setbox\temboxa=\hbox{#1} \newbox\temboxb\undercen} \def\undercen#1 { \ifx\let\next=\relax \hbox to\hsize{\hfil\underline{\box\temboxa}\hfil} \else\let\next=\undercen \setbox\temboxb=\hbox{\copy\temboxa~#1} \ifdim \wd\temboxb >\hsize \hbox to\hsize{\hfil\underline{\box\temboxa}\hfil} \setbox\temboxa=\hbox{#1} \setbox\temboxb=\hbox{#1} \else \setbox\temboxa=\hbox{\box\temboxb} \fi \fi\next} % % End of Underlined and centred paragraph macro Also, if any texhaxer wants a raggedright paragraph where the text is all underlined then the following macro will do it: % Underlined paragraph macro % Jim Walker, Whiteshell Research, Pinawa, Manitoba % % Usage: \underraggedpar{The text} % \def\underraggedpar#1{\def\lindent{\hskip\parindent}\newdimen\lwidth \lwidth=\hsize\advance\lwidth by -\parindent\underpar #1 &} \def\underpar#1 {\vskip \parskip\newbox\temboxa\setbox\temboxa=\hbox{#1} \newbox\temboxb\underp} \def\underp#1 { \ifx\let\next=\relax \hbox to\hsize{\lindent\underline{\box\temboxa}} \else\let\next=\underp \setbox\temboxb=\hbox{\copy\temboxa~#1} \ifdim \wd\temboxb >\lwidth \hbox to\hsize{\lindent\underline{\box\temboxa}} \def\lindent{\hskip 0pt} \lwidth=\hsize \setbox\temboxa=\hbox{#1} \setbox\temboxb=\hbox{#1} \else \setbox\temboxa=\hbox{\box\temboxb} \fi \fi\next} % % End of Underlined paragraph macro ------------------------------ Date: Mon, 6 Jun 88 15:57:59 ADT From: Dave Dermott Subject: Latest DVITOVDU for VMS ? Is the latest VMS version (1.7 or higher) of DVITOVDU (the Tex DVI previewer) available from any FTP site. The version we have is July 1985 which doesn't include VT240 (REGIS) VDU output. I FTP'd the sources from Un. of Washington but that doesn't help since we don't have a MODULA-2 compiler. Thanks David Dermott DERMOTT@DREA-XX.ARPA DREA Dartmouth NS ------------------------------ Date: Mon, 06 Jun 88 13:50:18 CST From: Dale Anderson Subject: Indentation after a section heading Could someone please tell me if it is possible in LaTeX to have the first paragraph after a section, subsection, subsubsection headings in the article style to be indented. I have tried the \indent command but it seems to have no affect! Can anybody help? Dale Anderson ANDERSON@UREGINA1.bitnet ------------------------------ Date: Mon, 6 Jun 88 22:39:45+0900 From: KINOSHITA Yoshiki Subject: Problem creating suitable TeX fonts for LN03 on Ultrix We have VAX stations running under Ultrix 2.0/2.1 and a DEC LN03 PLUS laser printer. Because LN03 is a so-called "write-white(WW)" machine, one has to regenerate fonts anew using METAFONT. I would appreciate if someone kindly shows how to write a "mode_def" specification for this printer and some other important issues. I read in the issue #47 that Bill Jack (JACK@NRCHEP.BITNET) had asked the similar information, but there seems to be no answer yet, probably because he asked to send the answer directly to him.... Thank you in advance, KINOSHITA Yoshiki a37247@tansei.cc.u-tokyo.junet ------------------------------ Date: Mon, 6 Jun 1988 15:03:27 CDT From: "Thomas J. Reid" Subject: Page Imposition for DVI Files In TeXhax 51, Mario Wolczko asks about page imposition. Peter Flynn responded in TeXhax 53 and gave a general outline for how it could be done. I have a driver for centralized Xerox printers which implements page imposition. The procedures which I use are as follows: (1) Make a pass through the DVI file(s) building a doubly-linked list of "PAGE_ENTRY" structures. Each PAGE_ENTRY contains the page number as well as a pointer to the BOP for that page within the DVI file. I use a doubly-linked list because the pages are sorted as they are being added to the list. If sorting is not required, a singly-linked list could be used. (2) After the PAGE_ENTRY list is built, I allocate an array of pointers to PAGE_ENTRYs which contains one pointer for each page to be imposed. I allow the user to specify the number of pages in each signature. If no value is given, the entire document is imposed as one signature. The value is rounded up to a multiple of four. (3) A pass is made through the PAGE_ENTRY list starting from the beginning to fill up the "SIGNATURE" array. This array is filled one pair of entries at a time using the page pairing logic which I documented in "DVI driver considerations for high-volume printing systems" which appeared in TUGboat Volume 8 Number 3. This logic is summarized below: A) Test the next PAGE_ENTRY in the list. 1. If the page number is even: a. Set the first SIGNATURE pointer of the pair to NULL (which causes a blank page to be printed); b. Store the pointer to that PAGE_ENTRY in the second SIGNATURE pointer of the pair; c. Advance the PAGE_ENTRY list pointer to the next entry; and d. Return to step A for the next "front/back." (Here, "front/ back" refers to the front and back of the booklet *after* it is folded.) 2. If the page number if odd: a. Save the PAGE_ENTRY pointer as the first SIGNATURE pointer; b. Test the next PAGE_ENTRY in the list. 1) If it is even and has a page number which is one greater than that of the page on the front, save the PAGE_ENTRY pointer as the second entry of the SIGNATURE pointer list. Then, advance the PAGE_ENTRY list pointer to the next entry and return to step A for the next front/ back. 2) Otherwise, set the second SIGNATURE pointer entry to NULL and return to step A for the next front/back. Note that if the entire DVI file is being imposed as one signature, the signature size should actually be rounded up to a multiple of four from TWICE the number of pages in the DVI file. This would correctly handle the worst-case scenario of every page in the DVI file being odd and, thus, having extra blank pages inserted in the SIGNATURE array. When building the SIGNATURE array for the last signature of a document, the PAGE_ENTRY list may terminate before all entries of the SIGNATURE array are set. When this happens, the actual number of pages in the signature is rounded up to the next highter multiple of four (setting the extra SIGNATURE pointers to NULL), and that number is then used for the actual signature size. (4) The SIGNATURE array is then processed to determine which four DVI pages belong on the same sheet. This code, written in C, follows: /* num_pages_in_signature is assumed to be the actual number of */ /* pages in the signature rounded up to multiple of four. */ num_sheets_in_signature = num_pages_in_signature / 4; middle_page = num_pages_in_signature / 2; for (sheet = 0; sheet < num_sheets_in_signature; sheet++) { /* Define four indexes into the SIGNATURE array for the four */ /* pages to be printed. Note that it is assumed that array */ /* indexes begin with zero. Adjustments will be necessary */ /* if another language is used for which this is not true. */ front_left_index = middle_page - sheet*2 - 1; front_right_index = middle_page + sheet*2; back_left_index = front_right_index + 1; back_right_index = front_left_index - 1; page_offset = (num_sheets_in_signature - sheet) * 2; /* This gives an amount (in 1/300ths of an inch) by which */ /* the text must be shifted inward to account for the */ /* thickness of the booklet after it is folded. Note */ /* that the pages on the inside of the signature are */ /* shifted inwards while the outermost four pages are not */ /* shifted at all. The shift amount of 2/300ths of an */ /* inch is a number which we arrived at experimentally. */ /* The value is, of course, subject to the thickness of */ /* paper that is used. This value is not optional (yet). */ initialize_output_page (); /* Do whatever your driver needs. */ output_DVI_page (SIGNATURE[front_left_index], page_offset); /* Note: The "h" positions within the DVI file should be */ /* shifted to the right by "page_offset" pixels. */ output_DVI_page (SIGNATURE[front_right_index], half_page_width - page_offset); /* Note: Shift "h" positions by "half_page_width - */ /* page_offset" pixels. */ terminate_output_page (); /* Do whatever needs doing. */ initialize_output_page (); output_DVI_page (SIGNATURE[back_left_index], page_offset); output_DVI_page (SIGNATURE[back_right_index], half_page_width - page_offset); terminate_output_page (); } /* End of loop for each sheet in signature */ (5) If more pages exist in the PAGE_ENTRY list which have not been placed in the SIGNATURE array and output, then repeat steps (3), (4), and (5) for the next signature. Otherwise, terminate. This algorithm could be applied to a printer which outputs simplex pages face up by making appropriate changes to the formulas for the four indexes. ---Thomas Reid ------------------------------ Date: Tue, 7 Jun 88 08:47:27 EDT From: mroth@afit-ab.arpa (Mark A. Roth) Subject: tabular problem? The example below points out what seems to be two bugs in Latex or the documentation in the reference manual. First, in the p{0.9} column, the only way to get a ragged right paragraph is to invoke the \raggedright declaration WITHOUT enclosing the declaration inside braces. This seems to be in contradiction with the instructions given on page 183 of the LATEX USER'S GUIDE AND REFERENCE MANUAL. Second, in the p{1.1in} column, if the \raggedright declaration is not enclosed in braces, Latex generates an error when it encounters the \\. If the declaration is enclosed in braces (as shown above), no error is generated but the text is not set ragged right. \documentstyle{article} \begin{document} \bibliographystyle{plain} \begin{figure} % refs that use only Fn \begin{tabular}{|p{0.9in}||l|l|l|l|l|c|c|p{1.1in}|} \hline REFERENCE & \rule[-3mm]{0mm}{8mm} $T_e$ & $T_a$ & $T_s$ & $T_o$ & $F_n$ & $F_s={T_s\over T_o}$ & $F_o={T_o\over T_a}F_s$ & COMMENTS \\ \hline \hline \rule[-2mm]{0mm}{7mm} This Article & $T_e$ & $T_a$ & $T_s$ & $T_o$ & $F_n$ & $F_s$ & $F_o$ & \\ \hline \hline \raggedright Davenport \& Root \cite{daveroot;58} \rule[-2mm]{0mm}{7mm} & & $T_{es}$ & & $T_o$ & $\overline{F}$ & & $\overline{F}_o$ & {\raggedright $\overline{F}$ is called the ``average standard noise figure.'' and $\overline{F}_o$ is called the ``average operating noise figure''} \\ \hline \end{tabular} \end{figure} \bibliography{david} \end{document} Mark Roth mroth@afit.af.mil ------------------------------ Date: Tue, 7 Jun 88 11:41:32 EDT From: Ashwin Ram Subject: Titlepage and footnotetext aren't unnumbered I am trying to use \begin{titlepage}...\end{titlepage} to get an unnumbered titlepage, and \footnotetext to get an unnumbered footnote. According to the LaTeX book, \begin{titlepage}...\end{titlepage} "produces a title page with the empty page style" (page 164), and \footnotetext "produces a footnote, just like the corresponding \footnote command, except that no footnote mark is generated" (page 156). However, I am getting a titlepage numbered 0 and a footnote numbered 0 using the following LaTeX file: ----------------------------------------------------------------------------- \documentstyle{article} \begin{document} \begin{titlepage} \title{This is a test} \author{Mr. Tester} \maketitle \end{titlepage} This is page two\footnotetext{This is a footnote.}. This is still page two\footnote{This is another footnote.}. This concludes the test. \end{document} ----------------------------------------------------------------------------- This happens when I use the following LaTeX's: TeX 2.1, ArborText Apollo version 2.1.0.6, LaTeX Version 2.09 <9 Mar 1987>, Document Style `article'. Released 4 September 1986. and Common TeX, Version 2.1 (INITEX), LaTeX Version 2.09 - Released 27 October 1986, Document Style `article'. Released 4 September 1986. However, I don't get this behavior (i.e., I get the behavior that I think is correct) when I use: TeX, Apollo Version 2.0, LaTeX Version 2.09 - Released 7 January 1986, Document Style 'article'. Released 23 September 1985 I also tried running the first two LaTeX's with the style files from the third one, with the same results. So the error isn't in the style files. Indeed, the style files contain the same code for titlepage, including setting thispagestyle to empty. Any suggestions? Is this a LaTeX bug, a LaTeX manual bug, or a LaTeX user bug :-)? Thanks in advance for your help. -- Ashwin. ARPA: Ram-Ashwin@cs.yale.edu UUCP: {decvax,ucbvax,harvard,cmcl2,...}!yale!Ram-Ashwin BITNET: Ram@yalecs ------------------------------ Date: Tue, 7 Jun 88 06:54 EDT From: Dr Michael Soul Subject: LaTeX raggedright and textheight My problem with \raggedright was actually "caused" by setting \textheight too large, at 9.5ins. Dr. Lamport's comment about bad use of \\ was true but not relevant, since removing the terminating \\ makes no difference ( I had tried that already ). As to \textheight, we use A4 paper in a DEC LN03 laser printer, so 9.5 ins should fit nicely into 11.66. However what happens is that we get .85 ins blanked out at the bottom of the page - if text or footer should appear in that area it vanishes. The reason \raggedright makes a difference is a marginal change in vertical spacing means that the text will fit. I changed \textheight to 9.4 ins and the last line appeared. I changed it to 9.0 ins, and the page number in the footer appeared which I had never seen before - surprise ! When something is printed what positions the text on the paper ? Have we messed up some parameter of dvi ? Is it set up for american quarto (11 ins) by default ? Any suggestions ? Michael Soul, Schlumberger Instruments; soul%smcvx1.sdr.slb.com@relay.cs.net ------------------------------ %%% %%% 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 ************************** -------