TeXhax Digest Thursday, February 12, 1987 Volume 87 : Issue 10 TEXHAX10.87 Editor: Malcolm Brown Today's Topics: % notez: another mailer problem LaTeX page numbering question Re: layout.sty TeX/LaTeX mailing lists? Selective Input \hrule in double-column format drafthd.sty - and some comments on \pagestyle{myheadings} LaTeX style repository for UK users Mixing \input and \verbatim in LaTeX? TeXhax on Bitnet Re: TeX/LaTeX mailing lists? The lfonts.tex query ---------------------------------------------------------------------- Date: now From: Malcolm Brown Subject: possible duplication of this issue of TeXhax % There appears to be a bug in the MMAILR program at Score, such that % it rejects all or a large portion of a mail queue when a single % host name is considered invalid. This is the second attempt for % this issue. The first attempt resulted in a reject mail queue, and, % judging from the length, I assume that issue 10 was not received % by most of you. Apologies to anyone who is receiving this issue % for the second time! ------------------------------ Date: Fri, 6 Feb 87 15:31:49 PST From: Jonathan Ross To: texhax@score.stanford.edu Subject: LaTeX page numbering question I would like to be able to generate LaTeX documents which have a page numbering scheme that is like 1 of N, 2 of N ... etc where N is the last page number of the document. My first attempt was to use \renewcommand{\thepage}{\arabic{page} of \pageref{endpage}} and then on the last page put \label{endpage} This attempt had two problems. 1) When it comes time to put out the first page number, LaTeX generates it's warning message that 'endpage' is undefined on page \thepage... and in expanding \thepage one ends up with obvious recursion and 'out of memory' error. 2) The \label command puts a label reference in the .AUX file which is a 2 element list, the first (\@car) of which is the \ref portion and the second (\@cdr) is the \pageref portion. This \pageref portion gets expanded to include the error message that 'endpage' has not yet been defined! and in that message is another reference to \thepage. Every time LaTeX is run on this file the same recursion as in (1) occurs, one nested level per run, and of course the \pageref does not return what one wants at all. The page reference for page 1 becomes something like... 1 of \edef \@warning reference 'endpage' on { 1 of \edef... I tried various forms of this, using a \newcounter and \ref instead of \pageref, but problems still exist. I considered changing \ref to use \arabic{page} and not \thepage, but I believe that one really does want \thepage to print out the warning message about undefined references so that the page will be displayed as "ix" in a preface, or maybe even "FH" if you're into wierd numbering. If there is a way that I can define my own bottom runner in LaTeX that seems to be what I need. Thanks for the help. - Jonathan ------------------------------ Date: Fri 6 Feb 87 20:12:38-PST From: TEX Guests Subject: Re: layout.sty To: rohlf%sbbiovm.bitnet@WISCVM.WISC.EDU if you are referring to the file layout.tex from latex-style@rochester, i have run it successfully, on a tops-20 system with output via decnet to a vax/vms, printing it on a talaris 2400. it sounds as if your copy has accumulated some garbage, and you should probably get another copy. -- barbara beeton editor, tugboat ------------------------------ Date: Sat, 7 Feb 1987 16:31 EST From: LEX.NASH@MIT-SPEECH To: texhax@su-score.arpa Subject: TeX/LaTeX mailing lists? 1. I would like to be added to your mailing list if appropriate. >> Someone mentioned a mailing list for TeX/LaTeX. Can someone who >> knows about a list or lists please post or mail me the contact >> addresses(es)? > >Send mail to texhax@score.arpa, asking. ``Back issues'' are available >from directory at su-score, to which you have access through >anonymous ftp. I found I was able to login ananymously at SU-SCORE, but was prompted for a password for CWD to , and "guest" failed so I gave up. % In this regard, see Barbara Beeton's note in the next-to-last item % in today's digest % Malcolm 2. I have a particular query: the best way, preferably in LaTeX, to get the ``hook'' under a letter, as used in Polish for nasal vowels? (It is roughly a mirror-image of a cedilla). Thanks in advance, -DN ------------------------------ Date: Sat, 7 Feb 87 18:12:16 PST From: Reply-To: M0W3361%TAMSTAR.BITNET@forsythe.stanford.edu To: texhax@score.stanford.edu Subject: Selective Input This one answers Ed Bell's question about printing only a selected part of a TeX file, preserving everything (page numbering and else) (Issue 14). % put \goodpart before any text you want to print % put \badpart before any text you don't want to print % Example: \goodpart \input CHAPTER1 \badpart \input CHAPTER2 % \goodpart \input CHAPTER3 \input CHAPTER4 \bye % DO NOT put consecutive \goodpart's or \badpart's % \newbox\junkbox \def\goodpart{ \output={\global\setbox\junkbox=\pagebody} % discard everything left from the bad part. {\vbadness=10000 \eject} % force TeX to \output the page % and suppress the vbadness message. \output={\plainoutput}} \def\badpart{ \output={\plainoutput} % flush everything left from the good part. {\vbadness=10000 \eject} \output={\global\setbox\junkbox=\pagebody %now make TeX forget that it has just \output something: \deadcycles=0 \advancepageno }} % preserve the page numbering. I assume that each chapter begins with a new page. Modifying the routines for a more general usage (i.e, selecting any part of a text) should not be very hard: just make TeX \vskip a dp255 amount before TeX uses the \plainoutput in \goodpart. --Medhi Widjaja :-) ------------------------------ Date: Sat, 7 Feb 87 18:15:54 PST From: Reply-To: M0W3361%TAMSTAR.BITNET@forsythe.stanford.edu To: texhax@score.stanford.edu Subject: \hrule in double-column format A question about \hrule in double-column format: I have trouble with \hrule (or at least that's what I think has given me problem). Here's the problem: I tried to produce two-column text using the macros Donald Knuth used to produce Appendix I (described in Appendix E) with a little modification of the values of 'sizes' to suit my needs and my paper. This is what it looks like after my modification. (It's *long*, but somebody out there probably needs it to answer my question or at least you can paste it on your documents to produce two-column text. \catcode`@=11 % from plain.tex \newdimen\pagewidth \newdimen\pageheight \newdimen\ruleht % These values were modified: \hsize=35pc \vsize=54pc \maxdepth=2.2pt \parindent=2pc \hoffset=.4in \pagewidth=\hsize \pageheight=\vsize \ruleht=.5pt % This routine is used by \output ; this is different from % the one found in App. E since some are not needed here. \def\onepageout#1{\shipout\vbox{\offinterlineskip \vbox to \pageheight {\makeheadline #1 % the content of page \makefootline \boxmaxdepth=\maxdepth}} \advancepageno} \output{\onepageout{\unvbox255}} \newbox\partialpage \def\begindoublecolumns{\begingroup \output={\global\setbox\partialpage=\vbox{\unvbox255\bigskip}}\eject \output={\doublecolumnout} \hsize=17pc \vsize=109pc} % Again the sizes have been changed !! \def\enddoublecolumns{\output={\balancecolumns}\eject \endgroup \pagegoal=\vsize} \def\doublecolumnout{\splittopskip=\topskip \splitmaxdepth=\maxdepth \dimen@=54pc \advance\dimen@ by-\ht\partialpage % Need to change the value of \dimen@ also... \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ \onepageout\pagesofar \unvbox255 \penalty\outputpenalty} \def\pagesofar{\unvbox\partialpage \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\vrule\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} The macros work great. You can juggle from one column text to two column text and vice versa anywhere in a page, anytime. Well, almost. I had a hard time when I put an \hrule in certain places in the text. For example, \hrule \bigskip \centerline{THE BEAUTY AND THE MOUSE} \bigskip Once upon a time, there lived a beautiful girl in a place far, far away... \begindoublecolumns Her only friend was a computer that came with a mouse as its input device. .... % here should come a long text. \enddoublecolumns The beauty and the mouse lived happily ever after. \end would produce (accompanied by error messages : Underful boxes while \output was active) a page with a rule, a long space, the title, another long vskip, and the text "Once upon ..." flushed bottom. All the text after \begindoublecolumns starts on the next page. Oh, am I confused. My initial reaction was to check the routines used in the document, not knowing that the problem was caused by the innocent-looking \hrule in the beginning of the text. Removing the \hrule solves the problem. After some experiments I found out that putting the \hrule in the macro \onepageout directly didn't cause any trouble; i.e., I put the \hrule just after \makeheadline. But putting the rule in the headline still causes the problem (i.e.: \headline={\hrule}) I tried to dig information from TeXbook, but in vain. Anybody like to comment? --Medhi Widjaja. ------------------------------ Date: Fri, 6 Feb 87 11:15:06 GMT From: Stephen Page To: ROHLF <@Cs.Ucl.AC.UK,@earn.rutherford.ac.uk:ROHLF@sbbiovm> In-Reply-To: "F. James Rohlf"'s message of Thu, 5 Feb 1987 13:22:52 EST Subject: drafthd.sty - and some comments on \pagestyle{myheadings} > your drafthd.sty file > It does not try to print "draft" on page 1. On > documents of more than one page it "bombs". TeX complains that a number > is missing. No, the file as distributed DOES try very hard... On all our machines it works fine except as noted below. Perhaps your host, which has gobbled up 2/9 of the file name, has also eaten something in the file? I'll send another copy directly to be sure. Or maybe \time is broken. WHICH number does it say is missing? This trivial style file uses \pagestyle{myheadings} and demonstrates a couple of slight nasties about this command in LaTeX which may be of general interest. In particular, it seems to be almost impossible to get myheadings on to page one. One known bug, documented in the little macro, is that LaTeX supplies a free page number IN A NONZERO-WIDTH BOX at the right-hand edge, making it rather hard to center the title. This is an undocumented feature of LaTeX which I hope someone will remove one day. (Comment to LL and others interested: I think this page number is a nuisance, and it should be easier for the beginning user to remove or replace the ENTIRE header with his/her own. But at the very least it should occupy no width.) While we're on the subject of page headings, note that with the version of LaTeX which we run the front matter tends to make sticky headings (one gets CONTENTS on every subsequent page) and we work around this by putting a second \pagestyle after the front matter. Should this be fixed also? - Stephen Page ------------------------------------------------------------------------------ Programming Research Group Advanced Information Technology Group University of Oxford Arthur Andersen & Co, Management Consultants 11 Keble Road 1 Surrey Street Oxford OX1 3QD London WC2R 2PS U.K. U.K. JANET sdpage@uk.ac.oxford.prg | Oxford (0865) 273856 ARPA (old) sdpage%prg.oxford@ucl-cs.arpa | +44-865-273856 ARPA (new) sdpage%prg.oxford.ac.uk@cs.ucl.ac.uk | UUCP ...!ukc!ox-prg!sdpage | London (01) 836 1200 BITNET sdpage%uk.ac.oxford.prg@AC.UK | +44-1-836 1200 ------------------------------ Date: Fri, 6 Feb 87 11:27:46 GMT From: Stephen Page To: texhax@score.stanford.edu Subject: LaTeX style repository for UK users The LaTeX style repository has now arrived on our site and users of JANET or UUCP within the UK should mail me if they would like copies. Total size is around 800 kbytes. *** PLEASE NOTE that this offer extends to users in the UK. I have been bombarded with requests from all over the world, even the U.S.! The files are too large for us to send back out through the international gates - this costs money... BITNET users in Europe could mail to Christoph Gatzka, who has the delightful address of zrgc002@dtuzdv5a.bitnet (aren't eight-character names wonderful?). He has copies of everything I received -- and people submitting future contributions may (or may not) like to note that some gateways to BITNET strip off everything beyond 80 columns. (Complete in 50 words or less: I like punched cards because...) ------------------------------ Date: Thu, 5 Feb 87 13:10:40 GMT From: Stephen Page To: texhax@score.stanford.edu Subject: Mixing \input and \verbatim in LaTeX? I'm sure someone has a solution for this, because I've seen it somewhere, but can't find it right now. I want to read in a file as though I were doing \begin{verbatim} \input{foo.lst} \end{verbatim} Does anyone have a little macro to do this? ------------------------------ Date: Sun, 8 Feb 87 11:56:48 PST From: Reply-To: X230GV%TAMVM1.BITNET@forsythe.stanford.edu To: TEXHAX@score.stanford.edu Subject: TeXhax on Bitnet From: "Glenn L. Vanderburg" Subject: TeXhax on Bitnet To: TeXhax digest This is for those of you on Bitnet . . . As Malcom has pointed out, TeXhax is now being distributed via TEX-L, a Bitnet mailing list. If possible, those on Bitnet should move their subscriptions; the more people who move, the less traffic around the gateways. To subscribe, send a message (either interactively or as the body of a mail file) to LISTSERV@TAMVM1 with the text: subscribe tex-l e.g.: tell listserv at tamvm1 subscribe tex-l Ben L. User (from a VM/CMS machine) or: send listserv@tamvm1 subscribe tex-l Ben L. User (from a VAX running jnet) Your request will be automatically forwarded to the TEX-L distribution closest to you, and you will receive TeXhax from that location. The list is shared between several peer servers to distribute the load around the net. Submissions to TeXhax should still be sent to TeXhax@Score.Stanford.edu, and you should inform Malcom that you're receiving from TEX-L by sending mail to TeXhax-request@Score.Stanford.edu. In addition, Malcolm is planning on sending us copies of the files that are too big to send out on the digest. If you're on Bitnet you can get them from listserv. Just do the following: tell listserv at tamvm1 get tex filelist and a list of all the TeX-related files will be sent to you. Then you can get any individual file with a similar command. Best regards, Glenn ------------------------------ Date: Sun 8 Feb 87 18:41:49-PST From: TEX Guests Subject: Re: TeX/LaTeX mailing lists? To: LEX.NASH@MIT-SPEECH In-Reply-To: 1. when logging in anonymously to score, which is a tops-20 system, you will not be permitted to connect to the directory or any of its subdirectories. however, you should be able to get a list of files there by typing dir at the ftp prompt, and also to "get" any file by including (or appropriate subdirectory name) in the file specification. 2. the polish hook accent does not exist in any of the tex fonts now in general distribution. the american math society has created a font of auxiliary accents which includes this accent; however, it was created with old metafont, and is not easily portable. we hope to be able to have it recreated in the current metafont in the reasonably near future, and will make the .mf description available when that is complete. until then, i unfortunately know of no good substitute. -- barbara beeton (bnb@xx.lcs.mit.edu) ------------------------------ Date: Tue 3 Feb 87 20:55:15-PST From: Pierre MacKay Subject: The lfonts.tex query To: TeX@SU-SCORE.ARPA The lcircle and lcirclew got into the distribution after a file disaster. They are, of course the same as circle and circlew. It has been a tremendous convenience to have all LaTeX fonts begin with the letter l, (Computer Modern all start with c, invisible fonts all start with i, local Washington adaptations all start with w, and Turkish fonts start with t. AMS fonts start with m, except for the euler fonts which start with e). The whole thing is so convenient that I think I will not apologize. Instead, I have corrected lfonts.tex on the Unix distribution. Incidentally, the sauter scripts for generating elegant truesize Computer Modern are now part of the distribution, and lfonts.truesize is the replacement for lfonts.tex if you really care about fonts. I will wait about six months, and then lfonts.truesize will become lfonts.tex. The old style of lfonts.tex will continue to be available, but it will be called scaled_lfonts.tex Pierre ------------------------------ % %\bye % End of TeXhax Digest ************************** -------