TeXhax Digest Wednesday, June 17, 1987 Volume 87 : Issue 47 [SCORE.STANFORD.EDU]TEXHAX47.87 Editor: Malcolm Brown Today's Topics: Observations on two column mode Puzzle for TeXhackers 3 Columns in LaTeX ? Multipage tables How to space between letters Dubious WEAVE behavior under VM/CMS Standardization of DVI specials Chapter 4, anyone? (Patgen query) GFtoPK on VM/CMS Font File Types Font tapes for IBM 4250 LaTeX Notes (Re: TeXhax Digest V87 #43) ---------------------------------------------------------------------- Date: Wed, 10 Jun 87 14:52:28 pdt From: darrell%beowulf@sdcsvax.ucsd.edu (Darrell Long) To: texhax-request@score.stanford.edu Subject: Observations on two column mode I've spent the last day-or-so working on a two column format for plain TeX. My goal has been to construct a few macros that will let me typeset a conference paper. I want to continue to use plain TeX, since most of my papers are written in it, and because it is nice and concise. I've had some luck with it, but I'm still baffled by a few things. Advice is welcome, even solicited! I'd like to get this to work as soon as possible, but I'm afraid this paper will be cut and paste. *sigh* Again, my goal is to modify plain TeX as little as possible, so that old papers will continue to work. Thanks, DL Observations 1. \smallskip, \medskip and \bigskip are too stretchy. When I try to use them, the \partialpage grows to fill the entire physical page so the two column part runs off the bottow. I found the the modified TUGBOT.STY also suffers from this problem. 2. \topinsert, \midinsert aren't applied correctly. This is an artifact from my use of \plainoutput. \onepageout doesn't do it either, I think that they should be put in for each column, but then balancing is messed up because the columns are too long. 3. Pagenumbers appear at random. I have no explanation for this. The Macros \catcode`@=11 % borrow the private macros of PLAIN (with care) \hsize=7.0 true in \vsize=8.75 true in \hoffset=-0.25in \newdimen\pagewidth \pagewidth=\hsize \newdimen\pageheight \pageheight=\vsize \newbox\partialpage \def\begindoublecolumns{\begingroup %+ % Note the \bigskip is gone, it caused problems. %- \output={\global\setbox\partialpage=\vbox{\unvbox255}}\eject %+ % \vsize=2\pageheight to generate that long column. %- \output={\doublecolumnout} \hsize=3.25in \vsize=2\pageheight} \def\enddoublecolumns{\output={\balancecolumns}\eject \endgroup \pagegoal=\vsize} \def\doublecolumnout{\splittopskip=\topskip \splitmaxdepth=\maxdepth \dimen@=\pageheight \advance\dimen@ by-\ht\partialpage \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ %+ % Here's the hack to make it use \plainoutput %- \unvbox255 \setbox255=\vbox{\pagesofar} \plainoutput \penalty\outputpenalty} \def\pagesofar{\unvbox\partialpage \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\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@{\unvbox3} \pagesofar} ------------------------------ Date: Fri, 5 Jun 87 14:09:09 -0100 From: "Wolfgang Appelt" To: TeXhax@score.stanford.edu Subject: Puzzle for TeXhackers Develop a TeX macro \printhyphens{#1} which does the following: If your input is The word hyphenation is hyphenated as \printhyphens{hyphenation} your output on paper should be The word hyphenation is hyphenated as hy-phen-ation Wolfgang Appelt ------------------------------ Date: Sun, 7 Jun 87 20:47 EST From: (ANIL KHULLAR) Subject: 3 Columns in LaTeX ? To: texhax@score.stanford.edu There is a quick ref card at the end of the LaTeX book, I was wondering if Leslie wrote a macro for doing that ? I just completed writing a error-prone three column macro in TeX, to be used in making Quick Ref Cards at our Computer Center and I am not satisfied I would be glad if I do not have to re-invent the wheel and get a LaTeX macro for three column landscape mode ?? Has anyone got one that I could use ? Please do not ask me to FTP it, I'm on the BITNET. If I get no assistance by mid-july I will post my version of the 3 column in TeX {I hope I remove the kinks....}. Please send me mail if you have it, and/or post the address of where I could get it. Thanks Anil Khullar {Ph.D. Prog in Psychology C.U.N.Y. Grad. Center. 33 W 42 St. Box 295, New York NY 10036 } BITNET:ank@cunyvms1 INTERNET:ank%cunyvms1.BITNET@wiscvm.edu ON THE SEVENTH DAY GOD RESTED AND WATCHED CELTICS PLAY AT THE GARDEN [DISCLAIMER: They say after Boston there is heaven, I agree; I say after LispM there is nirvana, they don't. This and other such opinion are held dearly by me, my employers and the institution I represent do not necessarily hold that view. I am sole culprit of such fantasies. No living being is responsible, however unsolicited support is welcome] ------------------------------ Date: Mon, 8 Jun 87 08:37:56 EDT From: scott@gateway.mitre.org (John A. Scott) To: texhax@score.stanford.edu Subject: Multipage tables Does anyone have a sceme for formatting multipage tables in TeX or LaTeX. What I'm looking for is something with the functionality of tbl (troff table prepocessor). It must be able to accept a table heading and break a table across pages using the heading at the top of each piece. Any help (pointers, preprocessors, macros, etc) is welcome and appreciated. John Scott Being crazy helps but its not for everyone. Some people can't hack it. ------------------------------ Date: Mon, 8 Jun 87 11:59:25 CDT From: anita@astro.as.utexas.edu (Anita Cochran) To: texhax@score.stanford.edu Subject: How to space between letters One of our users has an unusual request. He would like to have TeX format a word and put space between the letters. It is easy to specify interword spacing but we don't know how to specify interletter spacing. Also, he doesn't want to hardwire the space size in but let TeX choose it. The application is to specify that a particular word must fit within a box of width X and have the word spaced out so that the first letter is at the left edge of the box and the last letter is at the right edge and the in between letters are evenly spaced. e.g. ___________________ |e x a m p l e| ------------------- Any suggestions? (Please don't tell me this is a stupid thing to do -- I have a user who thinks he wants to do it!) Anita Cochran uucp: {noao, ut-sally, ut-ngp}!utastro!anita arpa: anita@astro.as.utexas.edu snail: Astronomy Dept., The Univ. of Texas, Austin, TX, 78712 at&t: (512) 471-1471 ------------------------------ Date: Mon, 08 Jun 87 13:20:06 CDT From: "Don Hosek, Editor, TeXMaG" Subject: Dubious WEAVE behavior under VM/CMS To: TEXHAX@score.stanford.edu I have noticed some behaviour by WEAVE that is a bit dubious... the character sequence || (Pascal/VS string concatenation operator) ``disappears'' when it appears in Pascal text (I would expect to lose it in TeX text). Apparently, WEAVE becomes befuddled and translates the || into nothing seeing it as the Pascal/TeX ``switch''. Has anybody dealt with this or am I the first to notice? Should the change be made in the CMS change file or is || common enough that the WEB should be updated? -DH ------------------------------ Date: Mon, 08 Jun 87 13:19:14 CDT From: "Don Hosek, Editor, TeXMaG" Subject: Standardization of DVI specials To: TEXHAX@score.stanford.edu As TeX develops into its maturity, the need for standardization in other aspects of TeXware is becoming apparent. Perhaps the most important goal for standardization lies in DVI-driver \special's. I have discussed this matter with Thomas Reid (TeXrox), and a few preliminary ideas were given. However, to propose a standard to be submitted to the TeX community at large implies that input from the TeX community was solicited. It is to this end that I am writing this article. There are many aspects of the grammar of \special's that need to be solidified. Some of these are: o Device Dependancy. ArborText has apparently done some work on this to date (my conjecture on this is based on information from the DVIXER User Manual); their suggestion is to begin a device dependant \special with a three letter tag concluded with a colon to indicate that the \special command is for that particular output device only. For example, a \special that is Xerox 9700-specific would begin with XER:. If this convention is to be adopted, then codes will need to be designated for each TeX output device. However, care should be taken to make \special's device-dependant only when necessary. DVI-drivers should be written to ignore unknown \special commands. o \special Naming. This is perhaps the central problem of \special standardization. What should the command to print sideways on the page be called? DVIQMS from Texas A&M uses the command landscape(); Thomas Reid suggests ROTATE=90; I, personally, prefer landscape (without the ()'s). Is it better to have \special's that are easily interpretted by the driver or by the user? There are numerous other commands that also need to be specified: printing on both sides of the output sheet (duplex printing); print color selection; graphics inclusion, &c. This is not an exhaustive list, of course, and I would appreciate receiving suggestions for standard \special commands that do not appear above. o Graphics. The primary use of \special's in current device drivers is graphics file inclusion. Graphics files included should be processed intelligently (for example, extraneous PostScript material in a MacDraw document should be removed), and perhaps, following on the model of DVIQMS, options should be permitted on the graphics include facility to add or remove commands from the graphics file. DVIIMP (which is present in most TeX distributions in WEB source format contains another idea for graphics inclusion: it provides graphics ``primitives'' to draw points, lines, circles, and ellipses. Standardized graphics \special's such as these could be used to enhance LaTeX's picture mode, or be used in new macros to provide convenient device-independant graphics. o \special Scope. It was pointed out in TUGboat v. 7, no. 3. that the random paging of a DVI file implicitly prohibits \special's that are global in nature. DVIXER deals with this problem by permiting a sequentialreading command line option to insure that global \special's are read, DVIQMS makes no such provision, but does contain global \special's. Since it is fairly easy to modify output routines to emit a \special command on each page, it should not be too difficult to make \special's local to the page on which they appear. The suggestions listed here are by no means intended to be all- inclusive there are many aspects of the problem that were not covered in this article. I would like to have a preliminary document outlining the proposed standard for DVI files available for publication in TUGboat for issue 3 of this year, and a final draft for the beginning of 1988. I encourage contributions from the TeX community at large for this project. My E-mail address is: BITNET: DHOSEK@HMCVAX, or ARPA: DHOSEK%HMCVAX.BITNET@WISCVM.WISC.EDU; my postal address is: Don Hosek Platt Campus Center Harvey Mudd College Claremont, CA 91711 This article will also be printed in TUGboat and in TeXMaG (BITNET electronic ``magazine''). ------------------------------ Date: Tue, 9 Jun 87 15:46:27 +0200 From: Bj|rn Larsen To: Subject: Chapter 4, anyone? (Patgen query) I am trying to generate a hyphenation table for TeX with the PATGEN program found on the Unix distribution tape. In section 3 in PATGEN.WEB it says: 'The proper choice of the parameters to achieve a desired degree of hyphenation is discussed in Chapter 4.' Chapter 4 is nowhere to be found. I have looked at the code somewhat, and have realised that trying to 'dream up' a set of parameters will fail utterly. Can some kind soul tell me what document the missing 'Chapter 4' is located in, or could somebody mail it to me? If anybody has hands-on experience with PATGEN, _please_ send me some hints on how to use it. Desperately, Bjorn Larsen x_larsen_b%use.uio.uninett@tor.nta.no Computing Centre x_larsen_b@inger.arpa University of Oslo blarsen@ifi.uio.no Norway blarsen@norunit.bitnet ------------------------------ Date: Tue, 09 Jun 87 10:02:23 CDT From: "Don Hosek, Editor, TeXMaG" Subject: GFtoPK on VM/CMS To: TEXHAX@score.stanford.edu Does anybody have a working copy of GFtoPK under CMS? I have been having problems getting ours to work; high-bound checking errors are generated on the routine pk_byte because negative integers are being sent to it from pack_and_send_character. How should negative numbers be encoded in the eight_bits data type? Should pack_and_send_character be sending negative values in the first place? The errors occur on CMR10 300GF--- I haven't tried any other fonts yet. If anybody has a CMS-CHAN file that deals with this problem, or can tell me how to fix it, I would deeply apprecitate their help. Thanks, -DH ------------------------------ Date: Tue, 09 Jun 87 12:18:36 CDT From: "Don Hosek, Editor, TeXMaG" Subject: Font File Types To: TEXHAX@score.stanford.edu While I'm thinking about standards, people should remember the following about the numerical prefix appended to the file type of GF, PK, and PXL files: For GF and PK files, the number is equal to res*mag/1000 where res is the device resolution and mag is the TeX magnification (1000 = 1X). For PXL files, the number is equal to res*mag*5/1000 where res and mag are as above. Leading zeroes are NOT included in the filetype (e.g. 667PXL is correct, 0667PXL is not). My source for these rules is information presented in the final paragraph of section 16 of the PKtype program, which is as close to official as I've seen. -DH ------------------------------ Date: 09 Jun 87 15:11:35 ADT To: texhax@score.stanford.edu Subject: Font tapes for IBM 4250 From: MIKEMAC%UNBMVS1.BITNET@forsythe.stanford.edu My order for the IBM 4250 font tapes just came back with "I no longer have a font tape for the 4250 printer. The person who supplied it to me originally has not made another one for version 2 of TeX." Where can I get one of these tapes? What's the difference between V1.01(the one she doesn't have) and 2? Will they still work? Michael MacDonald Software Specialist, School of Computer Science University of New Brunswick Po. Box 4400 Fredericton, New Brunswick CANADA E3B 5A3 (506) 453-4566 Netnorth/BITNET: MIKEMAC @ UNBMVS1 ------------------------------ Date: Tue, 9 Jun 87 17:57:13 PDT From: lamport@src.DEC.COM (Leslie Lamport) To: TeXhax@Score.Stanford.edu Subject: LaTeX Notes (Re: TeXhax Digest V87 #43) Here's a simple example of LaTeX document-style modification that may be helpful. A user sent me the following: I had to apply a dreadful hack to LaTeX. I did a routine hack to cause the Part pages of the book to come out without page numbers; standard stuff. But the part pages should be in the table of contents but without page numbers. It was faster to hack the .toc file (automatically with sed) than to find a way to change the sty files. Is there an elegant solution? Here was my response: The solution strategy is to search the appropraite .doc file for `part'. So, let's search report.doc for all occurrences of `part'. After a couple of occurrences that are pretty clearly involved in defining the `part' counter, we encounter `\def\l@part' right under `\def\tableofcontents'. This looks promising, so we want to find out what the `\l@...' commands do. Searching backwards for `\l@' leads to a comment line. Paging upwards through the comments, we find % **************************************** % * TABLE OF CONTENTS, ETC. * % **************************************** % % A \subsection command writes a % \contentsline{subsection}{TITLE}{PAGE} % command on the .toc file, where TITLE contains the contents of the % entry and PAGE is the page number. If subsections are being numbered, % then TITLE will be of the form % \numberline{NUM}{HEADING} % where NUM is the number produced by \thesubsection. Other sectioning % commands work similarly. % % A \caption command in a 'figure' environment writes ... [Here is a paragraph about figures and tables, which is clearly irrelevant, so we skip to the next paragraph] % The command \contentsline{NAME} expands to \l@NAME. So, to specify % the table of contents, we must define \l@chapter, \l@section, % \l@subsection, ... ; to specify the list of figures, we must define % \l@figure; and so on. Most of these can be defined with the % \@dottedtocline command, which works as follows... Looking back at the definition of \l@part we found, we see that it doesn't use \@dottedtocline, so we needn't read any further. We've discovered that \l@part generates the table of contents entry, and its second argument is the page number. So, by simply removing the use of `#2' in the body of the definition of \l@part (perhaps replacing it by \mbox{} in case TeX isn't happy with nothing in its place), we easily construct a new definition for \l@part. We put this definition in a file foo.sty and add the `foo' option to the \documentstyle command, and {\em voil\'{a}}. Leslie Lamport ------------------------------ %%% %%% subscriptions, address changes to: texhax-request@score.stanford.edu %%% %%% submissions to: texhax@score.stanford.edu %%% %%% BITNET redistribution: TEX-L@TAMVM1.BITNET (list server) %%% %%%\bye %%% ------------------------------ End of TeXhax Digest **************************