TeXhax Digest Friday, March 29, 1991 Volume 91 : Issue 015 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: No LaTeX bug \topskip = 0pt produces bug in LaTeX Re: Reversing authors' names with tib (TeXhax Digest V91 #010) dvi2dvi itemize labels Atari ST/MEGA/TT (TOS): searching for dvi-driver with landscape option French hyphenation and the \language command help: modifying \tt TeXhax Digest V91 #011 \input in LATEX Re: lpr -d Metafont 2.7/ plain.mf problems Genealogical computing and TeX ------------------------------------------------------------------------ Date: Tue, 12 Mar 1991 12:06:40 PST From: asnd@erich.triumf.ca (Donald Arseneau) Subject: No LaTeX bug Keywords: LaTeX, bug In TeXhax V91 #012 Peter King asks > Have I discovered a bug in LaTeX?? > ... _ characters are NOT protected by the \verb, [in \put(15,10){\makebox(0,0){\verb+INFO_XFER_DCE_ERR+}} ] > ... Why is a \verb not a valid argument for \makebox ?? Which answers the question before asking it ... It's not valid because it doesn't work. Moreover, the LaTeX manual says so at the top of p. 169: "A \verb or \verb* command may not appear in the argument of any other command." Does it have to be this way? Almost definately. As \verb is written, it treats characters as letters by calling them letters as they are input (by setting all "catcodes"). If another command has already read them in, though, they are stuck with their usual special meanings. It is possible to rewrite some commands so they don't read in their parameters before absolutely necessary (\mbox is better defined as \leavevmode\hbox rather than \leavevmode\hbox{#1}), but this can't be done for everything. It is possible to rewrite \verb so it doesn't rely on \catcodes (at the expense of a lot more computation -- not a problem for short \verb's) but there is another, insurmountable problem with that: What about Man with moustache: \verb":{)" \makebox(0,0){Man with moustache: \verb":{)"} which gives unbalanced braces when scanning the parameter of \makebox! Or \verb"100%" chance of failure \makebox(0,0){\verb"100%" chance of failure} where the % must still be read as a comment character when \makebox is reading its parameter So where does all this lead? If all you need is underscores in \tt text, then check the answers Steve Kelem gets for his question [ one method: \catcode`\_=\active \def_{\ifmmode\sb\else\_\fi} ] Then use \tt font instead of \verb. If you have lots of nasty characters, then I can provide a verbatim macro that doesn't need catcodes...but you still have to watch out for nested braces and percent signs (etc.?). Good luck! Donald Arseneau asnd@reg.triumf.ca asnd@triumfcl (.bitnet) ------------------------------------------------------------------------ Date: Tue, 12 Mar 91 11:57:17 -0800 From: "Arthur Ogawa" Subject: \topskip = 0pt produces bug in LaTeX Keywords: LaTeX, \topskip, bug In LaTeX, the \clearpage command, when used twice in succession, should not eject extra blank pages, thus, after the first \clearpage has been processed, the second \clearpage should act as a no-op. However, if you have naively set the \topskip to 0pt, this will not work correctly: you have effectively prevented LaTeX's clever output routine from functioning as designed. There are numerous other places where you will get extraneous pages for similar reasons. The lesson is: Don't set \topskip = 0pt, rather set it to, say, 0.01pt. Nobody will be the wiser but LaTeX. Don't ask me how long I worked to figure this out, or on how many separate occasions. I know that there is a note in Leslie Lamport's bug list to the effect that he is aware that something goes wrong when the value of \topskip is zero: | 111. Setting \topskip to 0pt does weird things. I haven't figured out | why, but there's no reason to set \topskip to 0pt, so this is not | considered a bug. (Discovered by Mabry Tyson.) Considering that this is the case, LaTeX itself should probably check that \topskip has not been set to zero, and issue an error message. But until that day, please, if you are rewriting LaTeX .sty files, puh-lease, don't set \topskip to 0pt. PS Leslie may have figured this out by now, but I do know the reason "weird things" happen: in the code for \@doclearpage, LaTeX does the following: \setbox\@tempboxa\vsplit\@cclv to\z@ \unvbox\@tempboxa \setbox\@tempboxa\box\@cclv The effect of this is to throw away all of what is in \box255, except for a bit of (zero-height) material at the beginning. At this juncture the stuff that is being discarded is oftentimes a \vbox that LaTeX put there automatically (preceded by \topskip glue), and the stuff that is being reinserted into the vertical list is oftentimes a \mark and a \write-{}. The purpose of sticking these objects into the vertical list is so that LaTeX can force TeX into the output routine at will. When the \topskip is set to 0, all the material is reinserted into the vertical list. Then LaTeX thinks it has a non-trivial page, and you get a blank page. Hoping that this makes a difference, Art --------------------------------------------------------------------------- Date: Tue, 12 Mar 91 12:05:54 EST From: "J. C. Alexander" Subject: Re: Reversing authors' names with tib (TeXhax Digest V91 #010) Keywords: Tib As set up, Tib assumes "Starnes, Jr., J. H." is correct. To coerce it into doing it your way: 1. Cheap way: if names are always going to be reversed, put the "Jr." after the initials in the database. 2. More robust way: use one of the unused database fields for an "author suffix," put the "Jr." there and make the necessary minor modifications to the appropriate .ttx file. --------------------------------------------------------------------------- Date: Tue, 12 Mar 91 08:45:44 PST From: Rex Shudde <0024P%NAVPGS@UWAVM.U.WASHINGTON.EDU> Subject: dvi2dvi Keywords: dvi2dvi, dviware Is anybody familiar with Peter Sawatzki's dvi2dvi routine? I have the following observations and questions about its use and would appreciate any available help: I have recently obtained a copy of dvi2dvi from Jon Radel's catalog of TeX related MSDOS programs. My primary problem is to make 5.5 x 8.5 inch booklets on the U.S. standard 8.5 x 11 inch paper stock. I have set \hsize=4.5truein, \vsize=7.0truein, \hoffset=-0.5truein and \voffset=-0.5truein so that the margins will be 0.5 inches (the strange \vsize was obtained by experimentation so that my \footline would be reasonably placed on the page---but a little fine tuning is still in order). I compile booklet.tex with the \magnification set to \magstep0 to make the booklet.dvi file. Then I run a .bat file containing the two lines: dvi2dvi 4:-1,2(5.5in,0in) booklet zzz1 dvi2dvi 4:-3,0(5.5in,0in) booklet zzz2 When I print zzz1.dvi and zzz2.dvi in landscape mode, everything is just as it should be---beautiful. The problem arises when the *only* change I make is to replace \magstep0 by \magstep1. The new booklet.dvi file has margins which are identical to the original .dvi file, so there is no problem there. But when I run dvi2dvi (same .bat file as above), the left hand side of the page is exactly as it should be, but the right hand side has been shifted slightly more than one inch to the right and thus some information falls off of the sheet. I don't understand why dvi2dvi should be \magstep# sensitive when the booklet.dvi file was not. Unfortunately I don't read German and so there maybe something in the original instructions that I'm not using. The two lines from the .bat file were found in Tom Rockiki's instructions for dvidvi and I just took a chance that they would also be compatible with dvi2dvi and, at least at \magstep0, they seem to be. Is there and English translation of the original instructions? And perhaps someone could tell me what the proper setup would be that works with both \magstep0 and \magstep1. Many thanks, Rex Bitnet: 0024P@NAVPGS Internet: 0024P@CC.NPS.NAVY.MIL ----------------------------------------------------------------------- Date: Tue, 12 Mar 91 09:12:10 MST From: Alan R. Rogers Subject: itemize labels Keywords: itemize labels Neil Bhattacharyya asks: >I would like to know if anyone out there is familiar with the method for >changing the characters in the \itemize environment. For example, at the >first level, the bullet character is used to mark each \item in the >\itemize environment. I would like to change that to \rightarrow. How >can I do this? Thanks a million. You want to redefine the following, which I grabbed from article.doc: % ITEMIZE % Itemization is controlled by four commands: \labelitemi, \labelitemii, % \labelitemiii, and \labelitemiv, which define the labels of the various % itemization levels. \def\labelitemi{$\bullet$} \def\labelitemii{\bf --} \def\labelitemiii{$\ast$} \def\labelitemiv{$\cdot$} --------------------------------------------------------------------------- Date: Tue, 12 Mar 91 16:02:58 N From: pressler@namu06 Subject: Atari ST/MEGA/TT (TOS): searching for dvi-driver with landscape option Keywords: Atari, dviware, landscape Hallo, Does anyone know where to get a dvi-driver for the Atari with the following characteristics: - output on a NEC P6 plus Pinwriter (24-dot-matrix, 360x360 dpi) - the requested feature: the driver should be able to print in landscape mode as well as portrait mode, and it should be possible to switch between these modes with specials, so that one can use the portland.sty (LaTeX). It would be even better if for example two DIN A5 pages could be printed on a DIN A4 sheet of paper. Is anything like this around on a ftp site somewhere or available in another way (preferable as a binary (too) and for free)? It's quite important for me. Thanks a lot, Lutz Pressler (Goettingen, Germany) ----------------------------------------------------------------------- Date: Tue, 12 Mar 91 10:30 GMT From: Peter Flynn UCC Subject: French hyphenation and the \language command Keywords: TeX, French hyphenation, \language Where can I get a French HYPHEN.TEX, and how do we now go about using \language? ///Peter ---------------------------------------------------------------------------- Date: Tue, 12 Mar 91 08:00:36 -0500 From: amgreene@ATHENA.MIT.EDU Subject: help: modifying \tt Keywords: TeX, \tt Your problems with _ and catcodes come from the fact that when TeX reads in the arguments to a \section macro, the catcodes are frozen before anyone has a chance to change them. The solution that we have come up with here (which I think is useful enough to send to TeXhax) is the following, at the beginning of the file. (If I used LaTeX, it would be a .sty file, I guess :-) \catcode`\_=13 \def_{\ifmmode\sb\else\_\fi} What this does is make the underscore always active. When an underscore is encountered, if we're in math mode we make it a subscript (which it would normally be), but if we're setting text (or code) it places an underscore in the text. This solution is impervious to the frozen catcode problem, since we're never changing the catcode of the underscore in the middle of a document. I hope this helps! - Andrew Marc Greene Student Information Processing Board (SIPB) MIT Project Athena Watchmaker ------------------------------------------------------------------------- Date: Mon, 11 Mar 91 12:13:27 -0800 From: "Arthur Ogawa" Subject: TeXhax Digest V91 #011 Keywords: fonts, bold typewriter, bold Italic | Has anyone modified cmtt10.mf to get a bold typewriter and a bold italic | typewriter fonts? What changes did you make? I have created cmttssc10, cmttsslc10, and cmttssbc10 fonts. These are Computer Modern-derived typewriter sansserif condensed fonts in three weights, light, regular and bold. The source is not considered proprietary, and is dreived from cmtt10. If there is sufficient interest, I will be glad to post to some sort of server. I made the changes by going in steps. I first generated a condensed cmtt by changing only the horizontal scale. I then generated a cmttss font by noting the differences between cmr and cmss fonts, and making similar sorts of changes to cmttc: cmttssc :: cmttc = cmss :: cmr I then noted the difference between cmr and cmb to change the weight of the font: cmttssbc :: cmttssc = cmb :: cmr. The light font was simlarly made, but "in the opposite direction". I have not generated any sort of italic typewriter fonts. ------------------------------------------------------------------------ Date: Mon, 11 Mar 91 10:54:34 MST From: Joy Kelly Subject: \input in LATEX Keywords: LaTeX, \input I am using TEX version 2.9 and LATEX version 2.09. I have tried to set up subdirectories containing eps files and and block diagram files (created using the picture environment), to reduce the number of files in my directory. To include the eps files into my LATEX document, I used a tex file which sets up the appropriate header, along with the command: \special{ps: plotfile #1.eps}. LATEX cannot find the file if #1 has a path along with the filename. For the block diagrams, I used the \input command, with the path (subdirectory) specified: \input{diagrams/diag} for diag.tex file. Neither of these worked. Is there a way to do this? I sure hope so. Thanks for any insights you have for me. :) Joy Kelly (7-4925) Kelly@harrier.den.mmc.com ------------------------------------------------------------------------ Date: Mon, 11 Mar 91 09:42 CDT From: U2591AA@VMS.UCC.OKSTATE.EDU Subject: Re: lpr -d Keywords: lpr -d, printers I was a little confused by your message. Are you saying lpr -d works, but you can't find the filter? In BSD unix systems the -d flag on lpr will NOT work unless the /etc/printcap file is set up correctly. One of the options in /etc/printcap tells lpd (line printer daemon) where the dvi filter is located. If this filter exists on your system, and if it works with lpr -d, then a full pathname will be present in the /etc/printcap file. If lpr -d doesn't work, then 1) /etc/printcap isn't set up correctly or 2) you don't have the filter (or both). I assume from your return address that you have a SUN computer. SUN started with BSD unix, but they may set up the line printer system differently than does pure BSD unix. If so, my remarks don't apply to your system. Consult your system manuals on the proper setup for printers. Good luck. Scott McCullough u2591aa@vms.ucc.okstate.edu Dept. of Physics u2591aa@osuvms.bitnet Oklahoma State University Stillwater, OK 74078-0444 405-744-5813 ------------------------------------------------------------------------ Date: Mon, 11 Mar 91 14:46:41 MET From: Bo Thide' Subject: Metafont 2.7/ plain.mf problems Keywords: METAFONT, plain.mf Operating System: HP-UX 7.03 A Organization: Swedish Institute of Space Physics, S-755 91 Uppsala, Sweden X-Mailer: ELM [version 2.3 PL11] I am having trouble building the plain base file in mf2.7. Here's what I get: ============================================================================= This is METAFONT, C Version 2.7 (INIMF) **plain (/usr/local/lib/mf/macros/plain.mf Preloading the plain base, version 2.0: preliminaries, basic constants and mathematical macros, macros for converting from device-independent units to pixels, >> extra_setup >> "grayfont black" ! Not implemented: (unknown numeric)&(string). ; l.301 ...ra_setup:=extra_setup & "grayfont black"; % with solid black pixels ============================================================================= What's happening here? BTW, I have mf compiled with the HP-UX 7.40 "cc -O -W g,-All" on an HP9000/400 running HP-UX 7.03, if that matters. TeX3.1 and friends compiled the same way seem to work OK. Bo ^ Bo Thide'-------------------------------------------------------------- |I| Swedish Institute of Space Physics, S-755 91 Uppsala, Sweden |R| Phone: (+46) 18-303671. Telex: 76036 (IRFUPP S). Fax: (+46) 18-403100 /|F|\ INTERNET: bt@irfu.se UUCP: ...!mcvax!sunic!irfu!bt ~~U~~ -----------------------------------------------------------------sm5dfw ---------------------------------------------------------------------------- Date: Mon, 11 Mar 91 15:33:38 GMT From: Paddy Waldron Subject: Genealogical computing and TeX Keywords: TeX, genealogical computing Some months ago in TeXhax, Dean Guenther put out a request for TeX macros for genealogists. The response was minimal. However, as an avid computer genealogist and TeXer, I had long intended to write an interface to produce LaTeX source files from my genealogical database. There are a number of such products on the market, and most now have the capability to write out data in a standardised format called GEDCOM (GEnealogical Data COMmunications) which can be read by the others. The package which I use is the MSDOS version of Personal Ancestral File (PAF) which is produced by the Mormon Church in Salt Lake City on a non-commercial basis (i.e. they charge $35, a fraction of the cost of similar products from the private sector). I am now willing to make available my program, written in turbo Pascal, and the associated TeX and documentation files, to anyone out there who uses both PAF and TeX. The program produces descendants charts, giving all the descendants within a specified number of generations of a specified individual. It can also produce cascading descendants charts, i.e. one chart for every ancestor within a specified number of generations of a specified root individual. Cross-referencing means that no family appears more than once in the output. I would like volunteers to act as beta-testers, report bugs, and suggest improvements. Having already offered this program on the ROOTS-L list, I have been spending too much time sending out copies, and wonder would any FTP site be willing to store it? At the moment, I am only circulating source code, but if anyone without access to a pascal compiler wants a .COM file, I will try to send out a uuencoded version. For further information, please e-mail me directly. Paddy Waldron, Institute of Finance and Accounting, London Business School paddyw@lbs.lon.ac.uk waldron08@wharton.upenn.edu Organisation: London Business School Telephone: +44 71 262 5050 X419 (work) or +44 71 723 3963 (home) Snail-Mail: 109 Gloucester Terrace, Flat 2, London W2 3HB, England. ----------------------------------------------------------------------- %%% 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.nnn %%% yy = last two digits of current year %%% nnn = issue number %%% %%%\bye %%% End of TeXhax Digest ************************** -------