TeXhax Digest Friday, January 29, 1988 Volume 88 : Issue 09 [SCORE.STANFORD.EDU]TEXHAX09.88 Editor: Malcolm Brown Today's Topics: Beware of AST Turbolaser/PS Wrong characters printed \itemitemitem reversing indentation Unix distribution and Pascal LaTeX causing TeX save space error need help with metafont proof font TeX and Dvi2ps on a CONVEX C1-XP Table of Content Macro in TeX Mysterious LaTeX problem with \marginpar Large CMR fonts undump.c needed for NCR Tower 32 LaTeX Notes (Re: TeXhax Digest V88 #07) Need help with hanging title macros ---------------------------------------------------------------------- Date: Fri 22 Jan 88 14:11:58-PST From: Ted Shapin Subject: Beware of AST Turbolaser/PS A new AST Turbolaser/PS that we bought prints a faint double image of its built-in fonts. It is especially noticeable as a second faint image of horizontal arcs, for example in the descenders of lower case "g". At first, I thought the printer might be depositing too much toner. T called AST technical support several times and was given several different responses. I was told that there is no density adjustment on the Ricoh LP4081 engine. I was told that there is a screw that clamps a toner brush adjustment on the left side of the toner drawer. I was told that the shadow effect was common and it would disappear after running "a few thousand" copies. I called Ricoh service and was told about the toner brush adjustment. I visited AST product support in Irvine with a disk of output and tried printing it on two of their printers to see if something was different about mine. Their printer showed the same faint double image effect. The last I heard, they would talk to their engineering people about this. I conclude it is a defect in their present product. This short postscript file will show up the problem. I can't believe that it is a problem with all Ricoh engines, or I would have heard about it before now. At any rate, I wouldn't advise purchase of this product until it is fixed. Ted Shapin, Beckman Instruments, 92634. /vpos 750 def /text (eggs eggs eggs eggs eggs) def /choosefont {findfont tsize scalefont setfont} def /nl { /vpos vpos 2 tsize add sub def 72 vpos moveto} def /prtlin {exch choosefont text show show nl} def 72 vpos moveto 12 4 36 {/tsize exch def /Times-Bold ( Times) prtlin /Palatino-Bold ( Palatino) prtlin /NewCenturySchlbk-Bold ( New Century Schoolbook) prtlin } for showpage ------------------------------ Date: Fri, 22 Jan 88 15:16:53 PST From: John Lee Subject: Wrong characters printed In the below short TeX file, in order to get a math italics characters printed, I found it necessary to temporarily exit math mode (via \mbox), then re-enter math mode while in the \mbox (via $) in order to get the correct character printed. The first equation prints \sqsubsetsq for v, \parallel for k, and \rceil for e. The way to get around the problem is with mathmode within a mbox. Why is this occuring? \documentstyle{article} %%%%%Modify equation numbering to include prefix A \makeatletter \def\@eqnnum{\rm (A\theequation)} \makeatother %%%%% %%%%% define shorter begin equation commands \newcommand{\sequ}{\begin{equation}} \newcommand{\eequ}{\end{equation}} %%%%% \begin{document} \sequ \nu^k = \cal F\{ v^k \cdot e^{i\phi}\}; \eequ \sequ \nu^k=\cal F\{{\mbox{$v$}}^{\mbox{$k$}}\cdot{\mbox{$e$}}^{\mbox{$i\phi$}}\}; \eequ \end{document} ------------------------------ Date: Thu, 21 Jan 88 21:15 CDT From: Subject: \itemitemitem Brad Finney (TeXhax Digest V88 #06) asks for an \itemitemitem macro. I use \def\itemcubed{\par\indent\indent \hangindent3\parindent \textindent} \def\itemfourth{\par\indent\indent\indent \hangindent4\parindent \textindent} (following the lead of the TeXbook, p. 355). It's clear how to continue this sequence indefinitely. An interesting variation on \itemsixth, for use in tests, is \def\truefalse#1{\par\smallskip\indent\indent\indent\indent\indent \hangindent6\parindent \textindent{True\quad False\quad #1}} with instructions to the student to circle the correct answer for statement #1. Steve Fulling Texas A&M Math. ------------------------------ Subject: reversing indentation Date: Sun, 24 Jan 88 22:22:28 -0800 From: Alastair Milne Before I resort to TeX itself for this, I'd like to know if there's a way of handling it with LaTex. In the documentation for our project, we very typically write paragraphs with the first line extended to the left, and the remaining lines indented -- I've heard it called "hanging" indentation, but since I'm not sure the word is always used the same way, I want to be clear about what I mean: This paragraph uses a form of indentation with the top line extending to the left of the body, so that its subject becomes more prominent to the eye scanning the page. I know that using a negative \parindent is wrong: it merely pushes the first line out into the left margin (when it's used at all), rather than indenting the rest of the paragraph. I've tried using \hangindent and \hangafter from TeX, but they showed no result at all, even when defined directly contiguously with the paragraph text: apparently they were overridden. So: does LaTex provide a way of having the paragraph body indented beyond the first line? Thanks for any assistance, Alastair Milne ------------------------------ Date: Sun, 24 Jan 88 20:10:04 GMT From: Ian Moor Subject: Unix distribution and Pascal I am attempting to install a 4.2BSD TeX release tape on a 4.3BSD system. In the makefile there are comments indicating that the -O (optimize) flag will cause bugs when passed to the pascal compiler pc. We have a later version of the compiler than the one available when the tape was written - 3.1 instead of 3.0; obviously we would like to run the optimizer as TeX is a large program, does anybody know if the optimizer has been fixed? Ian Moor. ------------------------------ Date: Thu, 21 Jan 88 15:26 EST From: Subject: LaTeX causing TeX save space error Hi: We're we at the TeX/LaTeX game, and have had a few problems. If anyone knows how to solve these problems, could you send your answer to us at: "QUSNO@QUCDNAST.BITNET", and annote the file "attention Rob Heaton". While using VM/VMS LaTeX 2.09 (TeX 2.0.0) on a Microvax II, we occasionally run out of save space using the tabular, tabbing and verbatim environments. The TeXbook says that most well written macros shouldn't need more than 100 or so elements in the "save stack", so we were wondering if this is a known bug in our software. This error most recently occured using the tabbing environment to document a computer program. Only 7 tab stops were set, and no \pushtabs or \poptabs commands were used. After 1 1/2 pages of output the error occured. I would be most grateful to a reply, as I need this output for an appendix to my thesis. We've also had some problems with the figure environment, which I'll detail later. Rob Heaton ------------------------------ Subject: need help with metafont proof font Date: Mon, 25 Jan 88 10:45:06 -0800 From: kelem@aerospace.aero.org How do you set up the fonts for making proof copies of characters defined in metafont? What's the font name, what magnifications, etc. do I use for an Apple Laserwriter Plus? Thanks ------------------------------ Date: Mon, 25 Jan 88 13:52:55 PST From: martyg@Csa3.LBL.Gov (Martin Gelbaum) Subject: TeX and Dvi2ps on a CONVEX C1-XP Here at LBL, we have TeX running on a variety of machines - DEC 8650's running VAX/VMS, a DEC 750 running 4.2BSD Unix, and SUN 3/50's running Sun UNIX 4.2 Release 3.4. We translate the TeX output into Postscript using the dvi2ps program from the University of Washington TeX distribution; we run dvi2ps on Integrated Solutions machines running 4.2BSD Unix. We use the Transcript software from Adobe to send the output of dvi2ps to the printer. We generated the PXL font files using gftopxl; the GF files are from score.stanford.edu. This all works very well. Recently, one of the divisions here acquired a Convex C1-XP running 4.2 BSD Unix. Although we can build the dvi2ps program without problems on the Convex, it does NOT produce good-looking output on the Apple Laserwriter. The characters are broken apart: for examples, the tiny circle of an Angstrom sign appears three or four inches BELOW the A of the sign and other disasters. It should be noted that we are NOT running TeX itself on the Convex; the DVI files are produced on the VAX/VMS systems using the Kellerman and Smith distribution and on the Unix systems using the version of TeX on the University of Washington distribution. We do need to run the dvi2ps program or its equivalent on the Convex. Could anyone who is successfully running dvi2ps (or its equivalent) on a Convex C1-XP respond with information on what to do. Please reply to texhax-digest. Thanks for your time. Martin Gelbaum ------------------------------ Date: Sun, 24 Jan 88 23:52 CDT From: Subject: Table of Content Macro in TeX Dear Readers: I have been struggling with the following macro which is supposed to take three arguments (Chapter No., Title, and Page No.) and print it out in the Table of Contents of reports. This macro works but the problem is that it is not quite clean. The macro sort of works for a single line title and not so well for a two line title. When a title wraps around to the next line the leaderfill ends before the text on the first line. The spacing between the last dot on the leaderfill and the page number seems to come out improperly. If anyone on the list could help me with this, I sure will appreciate it very much. Macros: \def\leaderfill{\leaders\hbox to 1em{\hss.\hss}\hfill} \def\tochapter#1#2#3{\parfillskip=0pt \hsize=6.0truein \bigskip \hbox{\hbox to 0.25truein{#1\hfil} \vtop{\hsize=5.25truein{#2\leaderfill} \rlap{\hbox to 0.5truein{\hfil#3}} }} \hsize=6.0truein \parfillskip=0pt plus 1fil} Usage: \tochapter{1}{SYSTEM DESIGN}{1} \tochapter{2}{THE DESIGN AND IMPLEMENTATION OF A LANGUAGE BASED DISTRIBUTED SIMULATION SYSTEM}{10} Sample of Current Output: 1 SYSTEM DESIGN ................................. 1 2 THE DESIGN AND IMPLEMENTATION OF A DEEP REASONING BASED MACHINE FAULT DIAGNOSIS SHELL ........... 10 Thank you very much. Murali Krishnamurthi KDM2520@TAMSIGMA or MURALI@TAMLSR on Bitnet %% Barbara Beeton has a response: Date: Mon 25 Jan 88 18:30:17-PST From: Barbara Beeton Subject: Re: Table of Content Macro in TeX i've always found that letting tex handle whatever it can in paragraph mode yields the most satisfactory results. i think the following should give you what you want. (the def for \leaderfill looks just fine as is.) \def\starttoc{\hsize=5.5truein \leftskip=0.25truein \parfillskip=0pt } \def\tochapter#1#2#3{\bigskip \noindent \llap{\hbox to 0.25truein{#1\hfil}}% #2\leaderfill \rlap{\hbox to 0.5truein{\hfil#3}}\endgraf } note that \starttoc must precede your first \tochapter entry. the \noindent keeps the \llap'ed box with the chapter number from being put on a line by itself (in vmode, an hbox will not exit vmode by itself). the \leftskip keeps the left edge of the chapter title text nicely aligned. the \rlap'ed box keeps the leader stretch from being gobbled at the end of the paragraph, and since the \hsize is always the same width, the text on the first line of a multi-line chapter title won't stick out farther than the leader dots. if you really want to polish it up and make the interword spaces uniform, you can also make the right boundary just a bit ragged by adding \rightskip=0pt plus .5\hsize to \starttoc . -- barbara beeton ------------------------------ From: kpierce@cs-gw.D.UMN.EDU (Keith Pierce) Date: Tue, 26 Jan 88 9:40:06 CST Subject: Mysterious LaTeX problem with \marginpar I've stumbled upon a mysterious phenomenon in LaTeX. I have been developing a style option to generate examinations. Each question is assigned a point value, which is to be printed as a marginal note beside the question. In addition, the total points for all questions on a given page is to be printed in the head of that page. I implemented the page totalling by invoking \mark{\thescore} in each question, where score is a counter which accumulates the total score for all questions scanned so far. The \@oddhead and \@evenhead macros then print the difference between \botmark and \topmark (obviously, page 1 is a special case). So far, this all works just fine, as long as I don't add the marginal note feature. But when the marginal note instruction is added, the value of \topmark gets trashed. You can observe this strange occurrence in the following example, which includes a style file for printing marks and the page score value in the head. You will notice that different values are given for \topmark when the `%' preceding the \marginpar command is deleted. I'm stumped. By the way, I am using TeX version 1.5 for Unix, and LaTeX version 2.09 released 19 April 1986. Could that be the problem? %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Style file 'testhead.sty'. % Prints a header containing \topmark, \botmark, \firstmark, and % the difference between \botmark and \topmark \newcounter{xscore} \def\ps@testmark{\def\@oddfoot{} \def\evenfoot{} \def\@evenhead{% \thepage \hfil topmark = \topmark \hfil firstmark = \firstmark \hfil botmark = \botmark \hfil score = \ifnum\thepage=1 \botmark \else \setcounter{xscore}{\botmark} \addtocounter{xscore}{-\topmark} \thexscore \fi} \let\@oddhead\@evenhead} \ps@testmark %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % The LaTeX test file \documentstyle[testhead]{article} \newcounter{score} \setcounter{score}{0} \newcommand{\points}[1]{\addtocounter{score}{#1}\mark{\thescore} #1 points % \marginpar{hi} } \begin{document} % Header should print 'score = 25' for this page. \points{15} \points{10} \pagebreak % Header should print 'score = 25' for this page. \points{5} \points{20} \pagebreak % Header should print 'score = 30' for this page. \points{10} \points{10} \points{10} \end{document} ------------------------------ Date: Tue, 26 Jan 88 11:45 CDT From: Subject: Large CMR fonts I am interested in using METAFONT to build some of the CMR fonts in larger sizes, specifically 32, 40, and 72 point sizes. Are the .mf files for these readily available? I could estimate each of the 60 or so values needed to construct these files, but I feel sure that these are avalable already somewhere. Thanks. ------------------------------ Date: Tue, 26 Jan 88 13:13:35 PST From: darrell@sdcsvax.ucsd.edu (Darrell Long) Subject: undump.c needed for NCR Tower 32 Hello. I have just gotten TeX up and running on our NCR Tower 32 and now I would like to create a pre-loaded version. I tried the undump.c from the AT&T 3Bx distribution, but unfortunately NCR's V.2 is different (very) from AT&T's. Any help will be appreciated. Darrell Long Department of Computer Science and Engineering, C-014 University of California, San Diego La Jolla, California 92093 ARPA: Darrell@Beowulf.UCSD.EDU UUCP: sdcsvax!beowulf!darrell ------------------------------ Date: Tue, 26 Jan 88 13:25:03 pst From: lamport@src.dec.com (Leslie Lamport) Subject: LaTeX Notes (Re: TeXhax Digest V88 #07) Stephen Page writes: It seems that when I have a reference to a \include file, my \addtocontents and \addcontentsline commands are no-ops. Has anyone found a solution to this? The bug appears to be that an \addtocontents or \addcontentsline command has no effect if it appears at the end of the document "on a page by itself"--that is, following a \newpage or \clearpage command that is not followed by any output text. This is a rather minor anomaly and does not seem worth fixing. Paul Karger writes: I am having trouble getting a label to contain the number of a \part in LaTeX... This is a bug and has been corrected. Craig Riecke writes I have an old version of LaTeX sitting in the UNIX directory /usr/local/tex. Now, I have a new copy of the LaTeX macros which is sitting in my account. I run initex on these, and it dumps lplain.fmt into my account, as it should. Then I run virtex, which is sitting in /usr/local/tex as well, on lplain.fmt, and I coerce it to dump core by pressing the QUIT key at the appropriate moment. Now, when I try to undump by: undump latex /usr/local/tex/virtex core it gives me: core was not produced by this a.out I am running ULTRIX on a VAX 8200 which was upgraded from ULTRIX 1.2 (which is equivalent to 4.2BSD) when virtex was made, to ULTRIX 2.0 (which is equivalent to 4.3BSD). Could it be that this upgrade has caused the problem? Or is it something else? We had a similar problem here when we upgraded to Ultrix 2.0. The following was John DeTreville's analysis: On Ultrix 1.1, certain fields from the a.out file are copied verbatim into the user area. Undump compares the a.out-copied values in its user area with those of a particular a.out file to see whether they are the same, as a sanity check. These fields no longer exist on Ultrix 2.0. You could either remove the test altogether, or replace it with another test that you construct. Leslie Lamport ------------------------------ Date: Tue, 26 Jan 88 17:47:38 EST From: agw@convent.columbia.edu (Art Werschulz) Subject: Need help with hanging title macros Hi. The file "hang.tex" (appended to this article) is supposed to implement a "hanging title" style. Basically, the input \input hang \beginhangtitling \sectionbeg \sectionbeg{I.}{First \par section} Twas brillig and the slithy toves, beware the Jabberwock my son. And the mome raths uffishly outgrabe. Twas brillig and the slithy toves, beware the Jabberwock my son. And the mome raths uffishly outgrabe. Twas brillig and the slithy toves, beware the Jabberwock my son. And the mome raths uffishly outgrabe. should produce something like I. First Twas brillig and the slithy toves, beware the Jabberwock section my son. And the mome raths uffishly outgrabe. Twas brillig and the slithy toves, beware the Jabberwock my son. And the mome raths uffishly outgrabe. Twas brillig and the slithy toves, beware the Jabberwock my son. And the mome raths uffishly outgrabe. Well, this works *fairly* well. The problem is that the first few letters of the first sentence in the section are outdented: I. First Twas brillig and the slithy toves, beware the Jabberwock my section son. And the mome raths uffishly outgrabe. Twas brillig and the slithy toves, beware the Jabberwock my son. And the mome raths uffishly outgrabe. Twas brillig and the slithy toves, beware the Jabberwock my son. And the mome raths uffishly outgrabe. Any thoughts on this one? The file hang.tex is as follows: ------%<--%<--%<---cut here---%<--%<--%<--------------------------------------- %hang.tex \def\beginhangtitling{ \begingroup\hsize=5.0truein \output={\hangoutput} \def\currentsection{} \long\def\sectionbeg##1##2{ \mark{\currentsection \noexpand\else ##1\enskip ##2} \bigskip\goodbreak\leavevmode\hskip -2.0truein \vtop to 0pt{\leftskip=0pt\hsize=1.50truein \noindent \item{\bf ##1\enskip}{\bf ##2} \par} \noindent % \hskip 0.25truein\noindent\hskip-4truept \mark{##1\enskip ##2\noexpand\else ##1\enskip ##2} \def\currentsection{##1\enskip ##2}} \def\strutdepth{\dp\strutbox} \def\margin##1{\strut\vadjust{\kern-\strutdepth\specialtext{##1}}} \def\specialtext##1{\vtop to \strutdepth{ \baselineskip\strutdepth \vss \llap{\hbox to 1.5truein{\it ##1\hfil}}\null}} } \def\endhangtitling{\vfill\eject\endgroup} \def\hangoutput{ \shipout\hbox to 6.5truein{ \hfil \vbox{\makeheadline\pagebody\makefootline}} \advancepageno \gdef\secname{\newsecname} \ifnum\outputpenalty>-20000 \else\do\supereject\fi} %%%%%%%%%%%%%%%%%%%%% end of hang.tex ------%<--%<--%<---cut here---%<--%<--%<--------------------------------------- Any help would be appreciated. Art Werschulz ARPAnet: agw@columbia.edu USEnet: ... seismo!columbia!agw BITnet: agw@columbia.edu CCNET: agw@garfield ATTnet: Columbia University (212) 280-3610 280-2736 Fordham University (212) 841-5323 841-5396 ------------------------------ %%% %%% subscriptions, address changes to: texhax-request@score.stanford.edu %%% please send a valid arpanet address!! %%% %%% BITNET distribution: subscribe by sending the following %%% line to LISTSERV@TAMVM1.BITNET: %%% SUBSCRIBE TEX-L %%% %%% submissions to: texhax@score.stanford.edu %%% %%%\bye %%% ------------------------------ End of TeXhax Digest ************************** -------