TeXhax Digest Wednesday, January 27, 1988 Volume 88 : Issue 08 [SCORE.STANFORD.EDU]TEXHAX08.88 Editor: Malcolm Brown Today's Topics: Umlauts eaten by qms printer Bug in K&S PKtoPX version 2.2.0 file extensions TeX on a Linotron 300 LaTeX Notes (Re: TeXhax Digest V88 #06) subject lines and latex letter style GFTOPK Is the a change file for VAX/VMS? tex on Pyramids GF specials for font parameters (TeXhax Digest V88 #06) getting at character codes. BibTeX in C bug shell scripts for .bib files Figures and tables with \twocolumn Search paths (font files) for drivers VMS TeX distribution? Contents of LaTeX style collection, 21st January 1988 .doc vs .sty ---------------------------------------------------------------------- Date: Tue, 19 Jan 88 19:33:30 gmt From: Stephen Page Subject: Umlauts eaten by qms printer We are running qmstex (Scott Simpson, Jan 85, in Unix TeX distribution) to send our .dvi files to our QMS Lasergrafix printer. It all works moderately well now except for one annoying feature: sometimes the umlauts don't print for one of the fonts loaded. It looks like a problem with the font loading/storage, since only one font will be affected at a time, and that font will behave consistently until it is reloaded. Not an easy error to spot in an otherwise clean copy! Can anyone suggest why this might be happening? ------------------------------ Subject: Bug in K&S PKtoPX version 2.2.0 From: adk%FSU.BITNET@CUNYVM.CUNY.EDU Date: Tue, 19-JAN-1988 20:02 I have fixed a bug in the Kellerman & Smith version 2.2.0 of PKtoPX which was causing it to produce corrupt PXL files. I do not know if this is the newest K&S version: it is based on PKtoPX version 2.2, but version 2.3 contains only documentation changes. Has anyone noticed this problem before? I am perplexed, as I cannot see how this version of PKtoPX could ever have been used successfully with this bug present. The problem is that all the glyph pointers and the directory pointer are extraneously multiplied by a factor of four -- in other words they are byte offsets in the PXL file rather than word offsets. The error is in the procedure pixel_integer: in PKtoPX.WEB there is the statement [incr(pxl_loc) ;] which is incorrectly changed to [pxl_loc:=pxl_loc+4;] in the K&S PKtoPX.CH file. The correct increment should be [pxl_loc:=pxl_loc+1;] as pxl_loc is measured in words and not bytes. Now, while the original WEB version of PKtoPX is correct in this regard, it contains the cause of this bug. It declares pxl_loc thus @!pxl_loc, @!pk_loc:integer; {how many bytes have we sent?} saying it is the number of bytes sent, but uses it thus print_ln((pxl_loc*4):1,' bytes written to pixel file.'); as the number of four-byte words. ------------------------------ From: ramsdell%linus@mitre-bedford.ARPA Date: Wed, 20 Jan 88 08:42:19 EST Subject: file extensions I would like to promote the idea that LaTeX and SliTeX source files be given a different extension besides ".tex". Since no one I know uses the same program to process TeX, LaTeX and SliTeX source, differing extensions make sense. For example, editors could switch to an appropriate mode based on the extension, rather than some analysis of the source. Under UNIX, you could have the following Generic TeX makefile. WEBish files are included in this makefile. John Makefile: ---------------------------------------------------- % Generic TeX makefile. .SUFFIXES: .dvi .tex .ltex .stex .cweb .web .cweb: make $*.c && make $* .cweb.o: make $*.c && make $*.o .cweb.c: ctangle $*.cweb .cweb.dvi: make $*.tex && make $*.dvi .cweb.tex: cweave $*.cweb #.web.tex: # weave $*.web # .... same as for cweb. .ltex.dvi: latex $*.ltex .stex.dvi: slitex $*.stex .tex.dvi: tex $* ------------------------------ Date: Wed, 20 Jan 88 10:44:59 EST From: elwell@tut.cis.ohio-state.edu (Clayton Elwell) Subject: TeX on a Linotron 300 I use TeX on a Linotron 300 (just ran off a 40-page magazine on one, in fact). I use the Adobe typefaces, since at 1270 DPI (for medium resolution), them character bitmaps get a bit large. I use a DVI driver that I wrote, which is written in C and runs in almost any Unixoid C environment (including the Macintosh), which produces nice, compact PostScript. The only people I know of so far that PostScript versions of the CMR fonts are FTL Systems (the folks that make MacTeX), who have cmex, cmsy, & cmmi outline fonts. They come out lumpy on a LaserWriter, but they look quite nice on a Linotron. I don't know if they'd sell them individually, though. Feel free to contact me directly for more information. Clayton M. Elwell UUCP: ...!cbosgd!tut.cis.ohio-state.edu!elwell ARPA: elwell@ohio-state.arpa (if you feel lucky...) ------------------------------ Date: Wed, 20 Jan 88 08:57:37 pst From: lamport@src.dec.com (Leslie Lamport) Subject: LaTeX Notes (Re: TeXhax Digest V88 #06) Dominik Wujastyk writes It appears to me that if you make a footnote from within the quote environment, LaTeX does not reset the \parskip value within the footnote. It is the same value (scaled to \footnotesize) as within the quote environment His observation is correct. \parskip is not initialized inside a footnote or inside a parbox. This will be corrected and \parskip will be set to zero pts in both cases. Until this correction is propagated, the work-around is to put an explicit \setlength{\parskip}{0pt} command at the beginning of the footnote or parbox argument. Document-style designers who prefer a different value of \parskip for footnotes can set it in the \@makefntxt macro. Leslie Lamport ------------------------------ Date: Tue, 19 Jan 88 16:29:51 EST Subject: subject lines and latex letter style From: S.A. Thurlow I am trying to get a subject line in letters prepared using latex's letter style. Unfortunately, there doesn't seem to be a way to do this in standard latex. How does one go about hacking latex to support a subject line? Any help you can give will be appreciated. Scott. ---- sat@Chi.Unicus.COM or uunet!mnetor!unicus!sat ------------------------------ Date: Wed, 20 Jan 88 16:12 EDT From: Ted Nieland - SRL <@WPAFB-AAMRL.ARPA:NIELAND@FALCON> Subject: GFTOPK Is the a change file for VAX/VMS? Where do you find the Change File for GFTOPK for VAX/VMS? I didn't find one on SCORE.STANDFORD.EDU. Is there some other way to create the PK fonts under VAX/VMS? I recently received a LN03 Driver that can use PK fonts, but the PK fonts I have are not designed for the LN03, but for an IMAGEN. I would like to create fonts for the LN03 from the MF files (I already have John Sauter's PXL fonts, but they take up a lot of space). Any information out there? | M. Edward (Ted) Nieland - Systems Analyst | | US Snail: | Arpa Internet: | | Systems Research Laboratories, Inc. | TNIELAND@WPAFB-AAMRL.ARPA | | 2800 Indian Ripple Road WP 196 | NIELAND%FALCON@WPAFB-AAMRL.ARPA | | Dayton, OH 45440 | | | A T & T: (513) 255-5156 | ------------------------------ Date: Wed, 20 Jan 88 21:39:09 PST From: mackay@june.cs.washington.edu (Pierre MacKay) Subject: tex on Pyramids Many thanks for your report on TeX-to-C. It sounds as if there may be no difficulty in incorporating your alterations into the generic files. I await Tim Morgan's comments on that. I have made the obvious trials on ULTRIX and BSD4.3 and in both cases the compilation has worked perfectly. You are quite right that rounding errors in the 6th or seventh decimal place are no invalidation of trip. As it happens, the authorized trip files on score produce some serious-looking oversized diffs when compared with trip files produced on Unix but, on inspection, they all turn out to be 36 vs 32 bit errors. I assume that the C library does things slightly differently from the way the Pascal library does at the trivial rounding level. On my attempt using ULTRIX, I was rather more surprised by how few 7th place rounding errors I got than by the fact that I got them. The "threats" message must be peculiar to Pyramid compilers. I have never seen anything even remotely like it. We are really hoping to extend the TeX-to-C movement into TeXware-to-C, which may obviate the problem altogether. Pierre ------------------------------ Date: Wed, 20 Jan 88 22:18:23 PST From: mackay@june.cs.washington.edu (Pierre MacKay) Subject: GF specials for font parameters (TeXhax Digest V88 #06) Charles Karney suggested that the name of the font and the magnification called for in the command line ought to be included, because fonts are sometimes renamed in a mystifying manner. It seems an excellent idea, so here is the new code. --------------------------------------------------------------------------- def mode_special(suffix $) = string s,d; s:=str$; d:=decimal scantokens s; special s&":="&d&";" enddef; extra_setup:=extra_setup&"nmode_setup"; def nmode_setup = p_p_i=pixels_per_inch/mag; if fontmaking > 0: begingroup; save d,s,p; save pixels_per_inch; string p; pixels_per_inch:=p_p_i; special jobname; mode_special(mag); p:=substring(0,length(mode_name[mode])-1) of mode_name[mode]; special "mode:="&p&";"; mode_special(pixels_per_inch); mode_special(blacker); mode_special(fillin); mode_special(o_correction); endgroup; fi enddef; -------------------------------------------------------------------------- I also use the following, which is a great help when the mode_def supplementary file has got too large to remember precisely. -------------------------------------------------------------------------- mode_def help = for i=1 upto number_of_modes: message mode_name[i]; endfor; save ?; % only use this once. it doesn't make sense to repeat enddef; let ? = help_; ____________________________________________________________________________ Pierre A. MacKay TUG Site Coordinator for Unix-flavored TeX ------------------------------ Date: Wed, 20 Jan 88 21:12 PST From: Subject: getting at character codes. I want to test the character code of the character following a macro. I can see two approaches, neither of which works for me: 1) Use a parameter. This fails when the next character is a space because the space gets gobbled by the macro invocation. (The problem with braces is less serious to me.) 2) Use \def\macro{\afterassignment\MACRO\let\char= } and test the code of \char in \MACRO, but I can't get \char to give back the character in a way that I can test it (\expandafter`\char does not work). So how do I do this? Modified 1? Modified 2? Or 3??? For those interested, I sent off my "dropped capital" macro to Matt Moelter. If you want a copy, send a note to him or me. Donald Arseneau asnd@triumfcl.bitnet asnd@dac.triumf.cdn ------------------------------ Date: Wed 20 Jan 88 23:26:59-PST From: Tomas G. Rokicki Subject: BibTeX in C bug Well, so much for beta testers. Everyone who got bibtex.c from me or anywhere else, get the latest, via anonymous ftp, from: labrea.stanford.edu:~ftp/pub/bibtex.c.Z There was a rather serious bug, which somehow didn't show up in the test cases that were run. (I don't use bibtex, so how was I to know?) Anyway, the diffs are here, for those who don't have access to ftp: 3134,3135c3134,3135 < if ( ( ( poplit1 <= 0 ) || ( poplit2 == 0 ) || ( poplit2 > exbuflength < ) || ( poplit2 + (int) exbuflength < 0 ) ) ) exbuflength = 0 ; --- > if ( ( ( poplit1 <= 0 ) || ( poplit2 == 0 ) || ( (int) exbuflength - poplit2 > < 0 ) || ( poplit2 + (int) exbuflength < 0 ) ) ) exbuflength = 0 ; 5626c5626 < tputs ( cnull , "This is BibTeX, C Version 0.98i\n" ) ; --- > tputs ( cnull , "This is BibTeX, C Version 0.98ib\n" ) ; Note the renaming to 0.98ib. As an aside, the bug illustrated by the following code still exists in the VAX bsd 4.3 pcc compiler: main() { int i = -1 ; unsigned short t = 44 ; if (i > (int)t) printf("Say what?\n") ; } -tom ------------------------------ Date: Wed, 20 Jan 88 09:51:57 +0100 From: Marc Shapiro Subject: shell scripts for .bib files Here are 2 shell scripts for printing a .bib file. You can't do it more efficiently. The scripts use \bibliographystyle{key} and \bibliographystyle{skey}. These styles use the bibtex key field as the citation key, i.e. \cite{sthg:123:456} comes out as [sthg:123:456]. The former style is unsorted, the latter sorted by author name. These styles are intended only for printing a bibliography file, not for use in a paper. I sent a modified btxbst.doc which generates these styles (and more) to texhax and to latex-styles some time ago; I can send them again on request. If you don't have, like, or want the "key" and "skey" styles, just change the 2 definitions of "style" below. This was tested on a Sun. The only version-dependency I can think of is in the usage of "date". The initial definition of "files" may be changed for your site; most would probably like it initially empty. I hearby put these programs in the public domain. ----- printbibkey: print bibliography file, unsorted -------- #! /bin/sh style=${style-key} title=${title-", by order of appearance"} export style title exec printbib "$@" ---- end printbibkey ----------------------------------------- ---- printbib: print bibliography file, sorte by 1st author -- #! /bin/sh # set -x usage='usage: printbib[key] [-noprint|-nocheck|-style bibstyle|-title "title"|-output file|-predef "file,file,..."] bibfile...' # you may have to change this for your site: files=${predef-"/users/bib/predef"} title=${title-", sorted by first author"} style=${style-skey} output=${output-test} check=${check-true} print=${print-true} while : do case "$1" in -p|-print) print=true; shift;; +p|-noprint) print=false; shift;; -c|-check) check=true; shift;; +c|-nocheck) check=false; shift;; -s|-style) style="$2"; shift 2;; -t|-title) title="$2"; shift 2;; -o|-output) output="$2"; shift 2;; -predef) files="$2"; shift 2;; -*|+*) echo "$usage" >&2; exit 1;; *) break;; esac done if [ $# -lt 1 ] then echo $usage >&2 exit 1 fi umask 0 rm -f ${output}.tex ${output}.aux ${output}.bbl ${output}.blg ${output}.log ${output}.dvi ${output}.DVI echo "Outputting to ${output}.tex" >&2 cat > ${output}.tex << EOD % tex file to print bibliography file(s) $@ % automatically generated by program $0 \\documentstyle[proc]{article} \\begin{document} \\title{Bibliography file $@ $title} \\author{Version of `date '+%a %d-%h-%y %H:%M'`} \\maketitle \\renewcommand\\thebibliography[1]{\\section*{Bibliography\\markboth {BIBLIOGRAPHY}{BIBLIOGRAPHY}}\\list {[\\arabic{enumi}]}{\\settowidth\\labelwidth{12345678}\\leftmargin\\labelwidth \\advance\\leftmargin\\labelsep \\usecounter{enumi}} \\def\\newblock{\\hskip .11em plus .33em minus -.07em} \\sloppy \\sfcode\`\\.=1000\\relax} \\bibliography{$files} \\bibliographystyle{${style}} \\end{document} EOD echo '\relax' > ${output}.aux while [ $# -gt 0 ] do f=`basename $1 .bib` if [ ! -r $f.bib ] then echo $usage >&2 exit 1 fi sed -n -e 's+^[ ]*@\([a-zA-Z]*\)[ ]*[({][ ]*\([-:_a-zA-Z0-9]*\),+\\citation{\2}+p' $f.bib >> ${output}.aux files="$files,$f" shift done echo "\\bibdata{$files}" >> ${output}.aux echo "\\bibstyle{$style}" >> ${output}.aux bibtex ${output} if egrep -l '(^ : |---)' ${output}.blg then echo "There are errors in the bibliography file(s) (see ${output}.blg)" >&2 if $check; then exit 1; fi fi latex ${output} if $print; then lpr -d ${output}.dvi; fi ---- end of printbib --------------------------------------------------- Marc Shapiro INRIA, B.P. 105, 78153 Le Chesnay Cedex, France. Tel.: +33 (1) 39-63-53-25 e-mail: shapiro@inria.inria.fr or: ...!mcvax!inria!shapiro ------------------------------ Date: 21-JAN-1988 16:40:36 GMT From: ABBOTTP%aston.ac.uk@NSS.Cs.Ucl.AC.UK Subject: Figures and tables with \twocolumn When using figures and tables with \twocolumn it is possible to produce a printed page with the table/figure at the top across both columns with two columns underneath. Leslie Lamports book states that floating to the bottom of the page is not possible (page 176 [loc] b) Since the table/figure is saved and printed on the next page it should be possible to change the text height so that the two columns of text are prepared and then printed above the table/figure on the page. It is no hardship to specify the required table/figure before the bottom of the preceeding page. Are there any plans to make this modification or has anyone achieved it. Thanks Peter ______________________ Computing Service JANET abbottp@uk.ac.aston Aston University ARPA pabbott@nss.cs.ucl.ac.uk Aston Triangle or abbottp%uk.ac.aston@nss.cs.ucl.ac.uk Birmingham B4 7ET UUCP ...!ukc!aston!abbottp U.K. BITNET abbottp%uk.ac.aston@ac.uk Tel (+44) 21 359 5492 ------------------------------ Date: Thu, 21 Jan 88 12:51:02 EST From: i5f@l.cc.purdue.edu (S Bechtolsheim) Subject: Search paths (font files) for drivers Does anybody have string feelings for search paths for fonts files of drivers? There are two extremes: one is to use the environment variable TEXFONTS as TeX does, the other extreme is use separate search paths like TEX_PK, TEX_GF, TEX_PXL. What do you think? Stephan Bechtolsheim i5f@l.cc.purdue.edu ------------------------------ Date: Thu, 21 Jan 88 20:04:07 EST From: John T Kohl Subject: VMS TeX distribution? Someone has asked me how to get a VMS TeX distribution. I know next to nothing about VMS TeX, but I'm sure many of you do. Where can I FTP or mail a tape to get a VMS distribution (preferably free or nominal media cost)? John Kohl MIT Project Athena ------------------------------ Subject: Contents of LaTeX style collection, 21st January 1988 Date: Thu, 21 Jan 88 22:48:16 -0500 From: Ken Yap [I'm trying to institute a uniform naming scheme so some files aren't really new, but just renamed or regrouped. The only new files are alltt.sty, btxbst.doc and btxbst.readme. For changed files, look at 00directory. - Ken] The LaTeX style collection now contains the files listed below. You should retrieve the file 00index first to obtain a brief description of current directory contents. The file 00directory contains a reverse time sorted list of files; this may be helpful in keeping your collection in sync with LaTeX-style. More submissions are very welcome. 00directory 00index 00readme a4.sty a4wide.sty aaai-instructions.tex aaai-named.bst aaai.sty acm.bst agugrl-sample.tex agugrl.sty agujgr-sample.tex agujgr.sty alltt.sty amssymbols.sty art10.txt art11.txt art12.txt article.txt biihead.sty btxbst.doc btxbst.readme cyrillic.sty dayofweek.tex deproc.sty deprocldc.tex docsty.shar doublespace.sty draft.sty drafthead.sty dvidoc.shar1 dvidoc.shar2 epic.shar1 epic.shar2 espo.sty format.sty fullpage.doc fullpage.sty geophysics.sty german.sty ieeetr.bst ist21.sty latex.bug layout.readme layout.tex lcustom.tex lfonts_ams.readme lfonts_ams.tex lgraph.shar local-suppl.tex memo.sty mfr.sty mitthesis-sample.tex mitthesis.sty natsci.bst natsci.sty newalpha.bst nl.sty nopagenumbers.doc nopagenumbers.sty remark.sty resume-sample.tex resume.sty rscsencode.shar sc21-wg1.sty sc21.sty sfwmac.sty showlabels.sty siam.bib siam.bst siam.doc siam.sty siam.tex siam10.doc siam10.sty siam11.sty siam12.sty slem.doc slem.sty spacecites.doc spacecites.sty suthesis.doc suthesis.sty texindex.shar texnames.doc texnames.sty tgrind.sty threepart.sty titlepage.txt trademark.sty uct10.doc uct11.doc uct12.doc ucthesis.doc ucthesis.readme uuencode.shar vdm.doc vdm.sty vdm.tex wsltex.shar xxxcustom.tex xxxslides.sty 1. For Internet users - how to ftp: Here is an example session. Disclaimer: ftp syntax varies from host to host. Your syntax may be different. The syntax presented here is that of Unix ftp. Comments in parentheses. % ftp cayuga.cs.rochester.edu (a.k.a. cs.rochester.edu, a.k.a. 192.5.53.209) ... (general blurb) user: anonymous password: ftp> cd public/latex-style (where the files are) ftp> ls (to see what is there) ... (lots of output) ftp> get 00index ... (more blurb) ftp> quit 2. Non-Internet users - how to retrieve by mail: An archive server has been installed. Send a piece of mail to LaTeX-Style (@cs.rochester.edu, via uucp or your favourite gateway) in the following format: Subject line should contain the phrase "@file request". Body of the mail should start with a line containing only an @ (at) sign. The first line following should be a mail address FROM rochester TO you. Then follow by the names of the files you want, either one to each line, or many to each line, separated by spaces. End with a line containing only an @ sign. Case is not significant. For example, if you are user at site.bitnet, this is what you should send: To: latex-style@cs.rochester.edu Subject: @file request @ user%site.bitnet@cunyvm.cuny.edu (don't forget your address!) 00readme 00index @ A word to the wise: it is best to fully qualify your mail address. Our mailer is pretty ignorant of Bitnet, CSnet or UUCP addresses unless they are in registered domains. It is best that you supply explicit gateway routes. Use the new domainized form or addresses whenever possible. If the Subject: line looks like: Subject: @file request uuencode or Subject: @file request rscsencode then the mail will be encoded with the requested scheme before sending. This _might_ help sites that get mail through gateways with unfriendly EBCDIC/ASCII mappings. You can find sources for the two types of en/decoders in the collection. You may have to do some porting of sources. Be patient as the server is actually a batch program run once a day. Files will be sent in batches, each not exceeding 100kbytes in size. 3. Distribution for IBM PC and clone users: There are two sources. David W. Hopper 446 Main Street Toronto, Ontario Canada M4C 4Y2 has LaTeX style files only. 1. Either one 1.2 MB diskette or three 360KB diskettes, blank and formatted. 2. Indication of the format required, 3. A self-addressed mailer, and 4. A $5.00 donation per set of files, to cover postage and equipment wear & tear. (If you live outside North America, airmail delivery will probably require more postage. You should probably contact David for details.) 5. No phone calls or personal visits please. Jon Radel P.O. Box 2276 Reston, VA 22090 has LaTeX style files and other goodies. For a list or other info send a SASE. 1. 360KB diskettes, blank and formatted. 2. A stamped, self-addressed mailer, and 3. $1.50 per disk. If you live outside North America, skip the stamps and send additional money or International Reply Coupons. As a convenience for people who have more money than floppies, Jon will supply everything for $6.00 per disk to U.S./Canada/Mexico addresses. ------------------------------ Subject: .doc vs .sty Date: Fri, 22 Jan 88 00:47:36 -0500 From: Ken Yap I'm in the midst of a name standardization effort for LaTeX style files. Many of the files in the collection suffixed with .sty should really be suffixed with .doc. The .sty file should be derived from the .doc file by stripping comments. This is sound naming practice and I intend to correct this problem in the collection over the next few months. What I would like to ask the readership of TeXHaX is whether stripping comments makes any noticeable difference to the speed of TeX. It would reduce confusion and ensure consistency if the .sty file was derived by simply renaming the .doc file. No need to keep two versions of the same file around. That seems to be worth more than saving a few milliseconds. Mail me your comments. Ken ------------------------------ %%% %%% 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 ************************** -------