TeXhax Digest Friday, August 12, 1988 Volume 88 : Issue 71 Moderator: Malcolm Brown Today's Topics: How high is this box (\ht\boxno seems to be wrong) TeX inputs and formats paths Re: Problems with Problems (solution) Boxed tables dirty tricks wanted vertical sentences in the margin? commontex 2.9 patches (non-official) Standardizing (naming) tfms derived from Adobe afms RE: Problems combining \tt, \obeyspaces, and \halign DosTeX Glue problem Printer drivers that supports tpic specials DVI previewer for VMS DosTeX limitations LATEX style for IEEE CS book? DVI Previewer for IBM-PC's ---------------------------------------------------------------------- Date: 29 Jul 88 10:47:00 MST From: Subject: How high is this box (\ht\boxno seems to be wrong) I am trying to build a strut to force TeX to build a large delimiter to match the height of the corresponding delimiter that closes an equation split over two lines. I build a vbox with the what seems to be stuff of the appropriate height, then try to use its dimensions. These dimensions don't seem to be right. Here's a code fragment (plain TeX) \newbox\eqnbox \setbox\eqnbox=\hbox{\hsize=100pt \vbox{ {$${ M\over F} $$}}} \showbox\eqnbox \newdimen\eqnht \newdimen\eqndp \dimen\eqnht=\ht\eqnbox \dimen\eqndp=\dp\eqndp \showthe\dimen\eqnht \showthe\dimen\eqndp \end If you execute this, you get height and depth of 6.0006 pts. This is, I believe, the height of the F and M, without any allowance for the line in the fraction, or the space around the line, both of which I would think should be included. What I am I doing wrong? How do I get the proper height and depth. David Strip drstrip@sandia-2.arpa ------------------------------ Date: Fri, 29 Jul 88 14:49:19 EDT From: Charles R. Martin Subject: TeX inputs and formats paths When I compile TeX in C on our Sun4, it doesn't seem to handle the preset paths.h paths for inputs and formats, ie, I have to define TEXINPUTS and TEXFORMATS in my environment to make virtex &plain work. Is this a known problem and if so, it there a known fix? I have TeX in C from a tape issued within the last month. Charlie Martin (...!mcnc!duke!crm, crm@summanulla.mc.duke.edu) ------------------------------ Date: Fri, 29 Jul 88 12:44 PDT From: MCGLK%MAX.ACS.WASHINGTON.EDU@Forsythe.Stanford.EDU Subject: Re: Problems with Problems (solution) Regarding LaTeX items I wanted to put a star in front of, like so: ... 12. problem problem problem problem problem ... *13. problem problem problem problem problem ... 14. problem problem problem problem problem ... ... I found a solution, thanks to the generous help of "grunwald@m.cs.uiuc.edu", who first pointed out the niceties of \csname...\endcsname to me; Donald Arseneau (ASND@TRIUMFCL), who pointed out that I shouldn't be using \edef with the \csname...\endcsname; and George Greenwade (BED_GDG@SHSU), who enclosed a very useful (and educational) macro package that could put anything you wanted before the enumeration at any level with ease. I recommend Mr Greenwade's package to anyone who needs to use lots of enumeration with special symbols. I had a smaller solution (and smaller lists) in mind, however. I started with the following: \catcode`@=11 \edef\itemstar#1{\item[{\bf *}\theenum\romannumeral\@enumdepth] \advance\enum\romannumeral\@enumdepth by 1} \catcode`@=12 and, after implementing the suggestions, finally wound up with % \itemstar is the same as \item, but puts a * in front of the number. \catcode`@=11 \def\itemstar{\advance \csname c@enum\romannumeral\@enumdepth\endcsname \@ne \item [{\bf *}\csname labelenum\romannumeral\@enumdepth\endcsname] } \catcode`@=12 First off, the \advance has to take place before the \item. The counter itself is not in \enumi..\enumiv, it's in \c@enumi..\c@enumiv. \theenum... translates to "1", "b" and so on; \labelenum... translates to "1.", "(b)" and so on. Thanks so much. --Ken McGlothlen mcglk@max.acs.washington.edu mcglk@max.bitnet ------------------------------ Date: Fri, 29 Jul 88 17:10:33 PDT From: darrell%cs@ucsd.edu (Darrell Long) Subject: Boxed tables I'm having some trouble with boxed tables. Using the TeXbook as an example I create a table with 5 columns. SOME of the time, the right side has tiny bumps caused by the \hrule's going through the \vrule's. As I said, this only happens SOME of the time. The bumps are only a few pixels in size, but they are visible. My guess is that either Common TeX 2.9, or dvi2ps doesn't do its arithmentic very carefully. Has anyone else had this problem? DL ------------------------------ From: oravax!calypso.UUCP!norman@cu-arpa.cs.cornell.edu Date: Sat, 30 Jul 88 14:51:11 EDT Subject: dirty tricks wanted Appendix D talks about list macros, and shows how to remove the rightmost element of a list provided that list items contain no expandable tokens. Does anyone have a macro that will remove the rightmost item, even if expandable tokens are present? I've thought of doing this by reversing the list, removing the leftmost element, and reversing again, but maybe someone else has come up with something better? Norman Ramsey norman%oravax.uucp@cu-arpa.cs.cornell.edu ------------------------------ Date: Mon, 1 Aug 88 15:48:26 EDT From: Luigi PERROTTA Subject: vertical sentences in the margin? Help! .... A Question to all Texperts: Is it possible to get TeX to write a sentence in reverse veritcal fashion in a margin? What I mean is, after Tex has finished formating a page, I want (...need..) to be able to get Tex to start writing a sentence from the bottom of the page up with the base of the characters touching the first colum of text. Preferable in left margin. Is there some way to trick TeX into flipping the page around(90 degrees clockwise) and get it to start writing again thinking that it is a the start of a new page??????? Browsing though back issues of TeXhax, I noticed a partial solution in vol51.88 (text rotation) but alas, it would take some time before finding a postscript laser. Our installation only has imagen laser printers.... I have been trying to understand The Chapters on horizontal & vertical mode in The Tex book by Knuth but it is going slowly. I figure that if it was possible , Knuth would of demonstrated it in his book. If anybody knows of such a macro or style file in existence, or any clues on how to go about it, I would be very much interested in knowing about it. Please email back to me for we have been temporarily cut off from receiving news. Thanks ........ -luigi perrotta hellion@opus.cs.mcgill.ca ------------------------------ Date: Mon, 1 Aug 88 14:45:08 PDT From: kwok@iris.ucdavis.edu (Conrad Kwok) Subject: commontex 2.9 patches (non-official) There are a number of minor problems in commontex 2.9 but none of them affects the DVI output. Some of the patches have been posted before but all of them are included here for completeness. The first change is to fix the banner message in preloaded version. The fix is posted by Mark Davies a few weeks ago. The second one is remove "b" (binary mode) in fopen. I think this is first posted by Dirk Grunwald but I am sure all people trying to compile commontex 2.9 on Ultrix will find this out. In char.c, a non-standard escape sequence is used. FORM_FEED character in C should be specified as \f but \l (^L?) is used in original file. The next one is actually not a bug. I did that to get around a SUN CC compiler bug. The change is in eval.c The last one is related to the exit code. In original TeX, it will not exit with a non-zero exit code if only warning occured (e.g. underfull box, ... ). In commontex 2.9, it exits with an error code 1. I changed commontex to exit with non-zero error code only if more serious errors occured. Here are the patches --Conrad internet: kwok@iris.ucdavis.edu csnet: kwok@ucd.csnet csnet: kwok%iris.ucdavis.edu@csnet.relay uucp: {ucbvax, uunet, ... }!ucdavis!iris!kwok -------------------------------- diff -b -c orig/char.c ./char.c *** orig/char.c Sun Mar 13 17:53:22 1988 --- ./char.c Sun Jul 31 10:10:41 1988 *************** *** 119,125 xchr[i] = ' '; for (i = 0200; i <= 0377; incr(i)) xchr[i] = i; ! xchr[FORM_FEED] = '\l'; xchr[TAB] = '\t'; xchr[NUL] = '\0'; for (i = FIRST_TEXT_CHAR; i <= LAST_TEXT_CHAR; incr(i)) --- 119,125 ----- xchr[i] = ' '; for (i = 0200; i <= 0377; incr(i)) xchr[i] = i; ! xchr[FORM_FEED] = '\f'; xchr[TAB] = '\t'; xchr[NUL] = '\0'; for (i = FIRST_TEXT_CHAR; i <= LAST_TEXT_CHAR; incr(i)) diff -b -c orig/eval.c ./eval.c *** orig/eval.c Sun Mar 13 17:53:40 1988 --- ./eval.c Mon Jul 4 10:17:08 1988 *************** *** 50,55 main_control () { byte c; fnt f; qqqq i; qqqq j; --- 50,56 ----- main_control () { byte c; + int intofc; fnt f; qqqq i; qqqq j; *************** *** 543,549 l = qi(c); main_loop_3: ! if (c < 256) { s = sf_code(c); if (s == 1000) space_factor = 1000; --- 544,550 ----- l = qi(c); main_loop_3: ! intofc = c; if ( intofc < 256) { s = sf_code(c); if (s == 1000) space_factor = 1000; diff -b -c orig/io.c ./io.c *** orig/io.c Sun Mar 13 17:53:54 1988 --- ./io.c Thu Jun 30 17:09:18 1988 *************** *** 39,45 b_open_in () { if (test_access(READ_ACCESS, FONT_FILE_PATH)) ! return (fopen(name_of_file, "rb")); return NULL; } --- 39,45 ----- b_open_in () { if (test_access(READ_ACCESS, FONT_FILE_PATH)) ! return (fopen(name_of_file, "r")); return NULL; } *************** *** 47,53 b_open_out () { if (test_access(WRITE_ACCESS, NO_FILE_PATH)) ! return (fopen(name_of_file, "wb")); return NULL; } --- 47,53 ----- b_open_out () { if (test_access(WRITE_ACCESS, NO_FILE_PATH)) ! return (fopen(name_of_file, "w")); return NULL; } *************** *** 55,61 w_open_in () { if (test_access(READ_ACCESS, FORMAT_FILE_PATH)) ! return (fopen(name_of_file, "rb")); return NULL; } --- 55,61 ----- w_open_in () { if (test_access(READ_ACCESS, FORMAT_FILE_PATH)) ! return (fopen(name_of_file, "r")); return NULL; } *************** *** 63,69 w_open_out () { if (test_access(WRITE_ACCESS, NO_FILE_PATH)) ! return (fopen(name_of_file, "wb")); return NULL; } --- 63,69 ----- w_open_out () { if (test_access(WRITE_ACCESS, NO_FILE_PATH)) ! return (fopen(name_of_file, "w")); return NULL; } diff -c orig/tex.c ./tex.c *** orig/tex.c Sun Mar 13 17:54:14 1988 --- ./tex.c Sun Jul 31 11:50:49 1988 *************** *** 53,59 if (ready_already != 314159) initialize(); ready_already = 314159; - print(banner); selector = TERM_ONLY; if (format_ident == 0) print(" (no format preloaded)"); --- 53,58 ----- if (ready_already != 314159) initialize(); ready_already = 314159; selector = TERM_ONLY; tally = 0; term_offset = 0; file_offset = 0; print(banner); *************** *** 55,60 ready_already = 314159; print(banner); selector = TERM_ONLY; if (format_ident == 0) print(" (no format preloaded)"); else print_str(format_ident); --- 54,61 ----- initialize(); ready_already = 314159; selector = TERM_ONLY; + tally = 0; term_offset = 0; file_offset = 0; + print(banner); if (format_ident == 0) print(" (no format preloaded)"); else print_str(format_ident); *************** *** 287,293 } print_ln(); if (edit) call_edit(); ! exit(history); } initialize () --- 288,298 ----- } print_ln(); if (edit) call_edit(); ! if (history == SPOTLESS || history == WARNING_ISSUED) { ! exit(SPOTLESS); ! } else { ! exit(history); ! } } initialize () ------------------------------ Date: Mon, 1 Aug 88 23:32:11 PDT From: mackay@june.cs.washington.edu (Pierre MacKay) Subject: Standardizing (naming) tfms derived from Adobe afms Font names for fonts in MF ought to show their origin. Moreover, there are many names thatwe really should not use because they are owned by Stempel-Haas or Monotype, or some other commercial group. ATypI issues a registry, and it is probably a good idea to look through that before appropriating a name. On the other hand, even a trivial change can apparently make it ok to grab a name that is registered with a font supplier. I am not sure how I feel about this. On the one hand, the restrictions imposed by the typesetting industry are often paranoid and self-defeating, but on the other, fonts are harder to protect than just about any commercially valuable product, so maybe the paranoia is justified. Personal names from the classic past are beyond restriction. Baskerville, Caslon, Garamond, etc., are protected only by the courtesy of the people who use these names. But I can't remember what the status of a name like Bembo would be. Bembo was real enough, but he wasn't a type designer (He was passionately, but cautiously in love with Lucrezia Borgia, among other things) I suspect that Bembo as a typeface name is actually the property of someone. Anyway, the way to distinguish a MF font is to name it as Computer Modern is named. "Computer Times" would do, or "Metafont TImes" or even "MF Times". The information conveyed by such a naming convention is actually important, since METAFONT implies not a single face, but a family of related faces in any style. That is really rather a novelty, and ought to be advertised. Email: mackay@june.cs.washington.edu Pierre A. MacKay Smail: Northwest Computing Support Group TUG Site Coordinator for Lewis Hall, Mail Stop DW10 Unix-flavored TeX University of Washington Seattle, WA 98195 (206) 543-6259 ------------------------------ Date: Tue, 2 Aug 88 14:06 N From: (Gavin Burnage) Subject: RE: Problems combining \tt, \obeyspaces, and \halign \obeyspaces, as you might expect, means that spaces typed become spaces printed -- even if they were inserted for the noblest of reasons (program readability, for example). The starkness of this simple truth makes me wonder whether I ought not to be in Hawaii selling pencils for a living. First correct answer down the line came from one Don Knuth. Thanks also to the other de-goofers who got in touch: Ken Brown, Julian Bradfield and David Lau. > Received: From STANFORD(MAILER) by HNYMPI52 with RSCS id 5665 > for GAVIN@HNYMPI52; Mon, 25 Jul 88 19:26 N > Received: by Forsythe.Stanford.EDU; Mon, 25 Jul 88 10:32:25 PDT > Message-ID: > Date: 25 Jul 88 1025 PDT > From: Don Knuth > Subject: re: Problems combining \tt, \obeyspaces, and \halign > To: GAVIN@HNYMPI52.BITNET > > TeX is obeying the spaces you inserted before the \strut in the > preamble to your \halign. If you move that \strut to the previous > line, everything should work fine (unless the text contains the > character combinations !` or ?`, which give Spanish-style characters!). > > (I don't usually have time to answer TeX questions, but I had an > extra few seconds this morning. I hope there are lots of other > people out there able to answer your query easily.) Gavin Burnage Reply to: Centre for Lexical Information GAVIN@HNYMPI52.BITNET University of Nijmegen Wundtlaan 1 Tel: 6525 XD NIJMEGEN 31-(0)80-515972 (work) The Netherlands ------------------------------ Date: Tuesday, 2 Aug 1988 15:27:47 NZT From: CCC032U@aucc1 Subject: DosTeX I have just received a copy of DosTeX ($US75) for MS/PC Dos machines. We are evaluating it for possible use around campus. I will now give some first impressions: Installation was easy ( you need 4.5MB of disk). You just create a directory and load first floppy and type A:install. It comes with preloaded versions of both LaTeX and AmsTeX. I have tried LaTeX and it processed a 14 page document in under 2 mins on an 8Mhz AT. The preloaded versions need 599300 bytes of free memory. I had room for Dosedit and buffer=10 and thats it! It would be painful to use if you are regularly using PC for other jobs and impossible if you have network software or any thing else that must be resident . My other complaint is that the set of PK fonts is incomplete. I tried to use their dvi2herc to preview may LaTeX doucment but it died because it could not find cmr9.120pk ( the standard size for footnotes in a 10pt article). As it happens I have access to a full set of PK fonts on our vax and will try kermiting them down to the PC soon. I also had problems with dvi2herc becase it ran out of file buffers, so if you have a reasonable number of fonts then you will need to set the config.sys parameters buffers and file up. This of course uses up more memory. There is also a dvieps which I have not yet tried (it was labeled experimental) I think I would rather use Nelson Beebes one. There were no drivers for Laser Printers. I also have TurboTeX and hope to be evaluating that shortly. Russell Fulton Internet: RJ.Fulton@aukuni.ac.nz Postal: Computer Centre University of Auckland Private Bag Auckland, New Zealand 'Phone: +64 9 737-999 x 8955 ( GMT -12 ) ------------------------------ Date: Tue, 2 Aug 88 15:17:45 PST From: Peter Scott Subject: Glue problem I had no reply to this when I submitted it a couple of months ago, so here goes again: I'm having a problem with glue that's just got me beat. Consider the following fragment of TeX code: \catcode`\@=11 \def\rcases#1{\left.\,\vcenter{\normalbaselines\m@th% \ialign{$##\hfil$&\quad##\hfil\crcr#1\crcr}}\right\}} \def\scases#1{\left.\vcenter{\normalbaselines\m@th% \ialign{$##\hfil$&\quad##\hfil\crcr#1\crcr}}\right\}} \catcode`\@=12 \setbox4=\hbox to2in{\vbox{$\rcases{\hbox{Send 3 blocks}\cr \hbox{Pause}\cr}\hbox{Repeat 8 times}$}\hss} \setbox5=\hbox to2in{\vbox{$\rcases{\hbox{Send 3 blocks}\cr \hbox{Pause}\cr}\hbox{Repeat 8 times}$}\hss} \setbox6=\hbox to2in{\vbox{$\scases{\box5\cr}\hbox{Repeat 59 times}$}\hss} $$\vtop{\hbox{Repeat}\hbox{10 times}}\cases{ \box4\cr \noalign{\smallskip} \box6\cr }$$ \rcases is like \cases, except the brace is on the right. \scases is like \rcases, except it omits the \, (thinmuskip), for reasons which will become apparent. The result I wanted was: / Send 3 blocks \ Repeat 8 times | Pause / Repeat < 10 times | Send 3 blocks \ Repeat 8 times \ Repeat 59 times \ Pause / / ^^^^^^^^^^^^^ Actually the text of these two blocks was slightly different in the memo I wanted to create, but things are complicated enough as it is. The problem is that the lower block ("Send 3 blocks/Pause") comes out shifted ever so slightly to the right of the one above. I thought I had fixed it by using \scases instead of \rcases, but no, it still sticks in a bit. I used \tracingall, and tried to figure out where the thinmuskip glue that's still in there is getting stretched by the wrong amount, but I either got lost in the nest of boxes or it looked fine. HELP!!!! Peter Scott (pjs%grouch@jpl-mil.jpl.nasa.gov) ------------------------------ Date: Tue, 2 Aug 88 16:31:34 PDT From: kwok@iris.ucdavis.edu (Conrad Kwok) Subject: Printer drivers that supports tpic specials Recently I wrote a LaTeX macro packages that may produce tpic specials. Many people asked me where they can find a printer driver that can handle the tpic specials. The only three programs I know are iptex, texx and texsun. But I am sure there are many more printer drivers out there that can handle them. So I decided to perform a survey on all printer drivers and previewers that can handle the tpic specials. If anyone knows any public domain programs, shareware programs or commerical products that do that, please send me a e-mail. Please also include information about where the programs can be found. I shall summarized them and report the result later. Thanks in advance. --Conrad internet: kwok@iris.ucdavis.edu csnet: kwok@ucd.csnet csnet: kwok%iris.ucdavis.edu@csnet.relay uucp: {ucbvax, uunet, ... }!ucdavis!iris!kwok ------------------------------ Date: Wed, 3 Aug 88 09:03:33 edt From: rcb@rti.rti.org (Randy Buckland) Subject: DVI previewer for VMS In a recent message listing DVI previewers for VMS, the version I wrote was not mentioned. So here are the details. This is a previewer for DVI files that runs on a VMS vaxstation. It uses the PK format font files and also has support for the TPIC specials for graphics. It is written in Ada, but the compiled object is available for those that don't have Ada. It can be gotten by anonymous FTP from argon.rti.org [128.109.139.64]. If any of the major archive sites would like to make a copy available for ftp also, feel free. Oh, I almost forgot. It's free. No begging. No shareware. No threats of dire consequences if used without permission. It is *NOT* public domain. It is copyrighted, but the copyright states that it may be redistributed freely. Randy Buckland Research Triangle Institute rcb@rti.rti.org ------------------------------ Date: Wed, 3 Aug 88 11:25:03 CDT From: beihl%cadillac.cad.mcc.com@mcc.com (Gary Beihl) Subject: DosTeX limitations The preloaded versions are indeed memory hogs. The next release will allow users to create preloaded versions with control over the size of mem[] and font_info[] arrays. A cmr9 (magstep0) .pk file for use with dvi2herc is part of the DosTeX distribution. Due to DOS name restrictions, it is named cmr9.pk and located in a directory called FONTS\PK\120\ under the installation directory. Dvi2herc (like any other program using DOS file i/o) requires an adequate FILES setting in config.sys. I believe incrementing FILES only consumes on the order of 50 bytes. BUFFERS is a different story (~500 bytes). Dvi2herc now does subsampling of the Epson .pk files by default (similiar to the texsun previewer for SUNs) and the screen resolution fonts will disappear from the distribution shortly. DosTeX's dvieps is almost completely derived from the corresponding Beebe driver. The only modification is swapping code for the output bitmap. At 11 x 216 x 240 = 570K, it's not tiny. Laser drivers are best obtained directly from the Beebe distribution. Gary Beihl (Arpa address: beihl@mcc.com) ------------------------------ Date: Wed, 3 Aug 88 16:40:04 EDT From: Allan H. Anderson Subject: LATEX style for IEEE CS book? Does anyone have a LATEX style file for the IEEE Computer Society 6" x 9" book style? It is single column, headings at the left margin, etc. Thanks, Allan Anderson anderson@vlsi.ll.mit.edu 617-981-2615 ------------------------------ Date: Wed, 3 Aug 88 11:41:07 CDT From: mcdonald%uxe.cso.uiuc.edu@uxc.cso.uiuc.edu (J.D. McDonald ) Subject: DVI Previewer for IBM-PC's I have written a public domain DVI file previewer for the IBM-PC based on the series of drivers by Nelson Beebe at Utah. This program is basically designed for the VGA or MCGA 480x640 monochrome mode. However, it does work on EGA's, both color and monochrome, but the output is stretched vertically a small amount. It uses either pk, gf or pxl files. The output really looks quite nice. Given enough fonts you can get output any size you wish - it is actually readable even if you put a whole page on the screen (on a VGA or MCGA). Eventually I will send this to Utah, but Beebe is out of town so I can't do it just yet. I have put the files in a directory for anonymous ftp on our VAX. The address is b.scs.uiuc.edu, or, as many name servers choke on this name (which IS correct), 128.174.90.2 . Included are the executable (arc'ed), a documentation file (which you MUST read!), a font substitution file, and the part of the source files that I have written or modified. Also included are some fonts. You will need to get most of the fonts from science.utah.edu. I suggest getting all the fonts up through size 208 d.p.i., but you really don't need all fonts for sizes bigger than 145 d.p.i. The way the program is presently constituted, it uses ONLY fonts in the 300 d.p.i. magstep series - using only one series makes it run a lot faster. This can be changed very easily by recompiling. Doug McDonald mcdonald@uiucuxe or mcdonald@uxe.cso.uiuc.edu ------------------------------ %%% %%% 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 ************************** -------