TeXhax Digest Tuesday, November 22, 1988 Volume 88 : Issue 102 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: Structured TeX macro programming TeX Inputs declare.tex (allocating registers locally) TeX Inputs loopy.tex (nested loop constructs) re: LaTeX display on an Ascii terminal Mixing landscape and regular fonts in a picture Problems with METAFONT on VAX/VMS Needed: mode_def for the HP Laser jet+ Needed: Metafile/Pixel/Style-files for cyrillic Request for e-mail access on behalf of third party WEB differences -> change-file ? TEXBIB in BibTeX 0.99 PC-based implementation of \TeX\--$\mu$\TeX\ \midinsert Using Macintosh figures in LaTeX -> dvi2ps ----------------------------------------------------------------------------- %%% Moderators' note: The first entry in this issue, from J E PITTMAN is part %% of a longer submission that seems to us so important that we shall devote %% the entirety of issue 103 to it. %%% Also, for those who have been distressed by the mismatch between the %% "Today's Topics" heads and the "Subject:" lines, that has been corrected. %% The match should be correct in this issue. ----------------------------------------------------------------------------- Date: Wed, 9 Nov 88 14:24:14 CST From: J E PITTMAN Subject: Structured TeX macro programmming Keyword: macros, TeX TUGboat V8 N3 has an article about what constitutes a well-structured TeX macro, however, the article does not finish the discussion and I have not been able to find later discussions on the topic. In my design of Cellular.TeX, I have attempted to apply basic structured programming principles such as data encapsulation, modularity, divide-and-conquer, visual indentation of code, et cetera. Two of the files in that submission (TeX Inputs declare.tex and TeX Inputs loopy.tex) were designed specifically to support structured programming. The nomenclature of the files is probably new to the TeX community. The syntax is zero or more directory names and a file name. The first directory name is usually TeX, AMSTeX, LaTeX, or a combination separated by `|'s. The next directory name gives the collection of files that the file belongs to such as Inputs, Styles, Formats, et cetera. The file name is usually given in lowercase, which indicates that it is a user file. If it is in uppercase, then it is usually input only within a macro defined elsewhere. A discussion about structured TeX macro programming would be useful to me since a lot of my work is intended for distribution to the TeX community at large. I think it will also help the TeX community since we are developing a large but somewhat disorganized and incoherent collection of TeX macros. I would like to encourage everyone who has an opinion on this subject to send their comments into TeXhax. J E Pittman Bitnet: JEPTeX@TAMVenus User Services Group Internet: JEPTeX@Venus.TAMU.EDU Computing Services Center Texas A&M University P.S. Beginning suggestions: The author's name and address should appear near the top of the file. The date of last edit by the original author should appear near the top of the file. Any subsequent editors should put their names, a summary of their changes, and the date near the top of the file. A file should be edited only by the author if at all possible. All lines of a file should be no longer than 80 columns. An \endinput, \end, \bye, or similar macro should be used to end the file. This allows spurious garbage to be added at the end of the file harmlessly. Whenever possible, the macros should be packaged so as to minimize the number of control sequence names visible outside the scope of the macros. Comments should be excessive. That should be enough to get the discussion started. ------------------------------------------------------------------------------ Date: Wed, 9 Nov 88 14:10:05 CST From: J E PITTMAN Subject: TeX Inputs declare.tex (allocating registers locally) Keywords: macros, TeX % File: TeX Inputs declare.tex % Author: J E Pittman % Bitnet: JEPTeX@TAMVenus % Internet: JEPTeX@Venus.TAMU.EDU % Date: September 29, 1988 % % These macros provide a method of locally allocating registers % without interference with previously allocated registers. The % method is the same as on pages 346--347 of the \TeX book, however, % the declare macros are intended for local use only. It is a logical % error to use a new macro between a declare macro and the end of the % appropriate enclosing group. % \def\declarecount {\allocate0\countdef}% \def\declaredimen {\allocate1\dimendef}% \def\declareskip {\allocate2\skipdef}% \def\declaremuskip{\allocate3\muskipdef}% \def\declarebox {\allocate4\chardef}% \def\declaretoks {\allocate5\toksdef}% % \def\allocate#1#2#3{\relax \advance\count1#1 by 1 \ifnum\count1#1<\count19 \else \errmessage{No room for \string#3!}% \fi #2#3=\count1#1 }% % \endinput ----------------------------------------------------------------------------- Date: Wed, 9 Nov 88 14:07:12 CST From: J E PITTMAN Subject: TeX Inputs loopy.tex (nested loop constructs) Keywords: macros, TeX % File: TeX Inputs loopy.tex % Author: J E Pittman % Bitnet: JEPTeX@TAMVenus % Internet: JEPTeX@Venus.TAMU.EDU % Date: September 29, 1988 % % These macros supply structured, nested loop constructs as follows: % % \forcount \csname=number to number by number do % valid_TeX_input % \endfor \csname % % \while \csname \if_of_any_type do % valid_TeX_input % \endwhile \csname % % \whilenot \csname \if_of_any_type do % valid_TeX_input % \endwhile \csname % % The \csname for the for loop must refer to a count register, for the % while loops it must uniquely identify the while loop. % \def\forcount #1{\relax \def \for #1=##1to ##2by ##3do ##4% \endfor #1% {\relax #1=##1\relax \ifnum ##3>0 \whilenot #1\ifnum ##2<#1do ##4% \advance #1 by ##3\relax \endwhilenot #1% \else \while #1\ifnum ##2<#1do ##4% \advance #1 by ##3\relax \endwhile #1% \fi }% \for #1% }% % \let\endwhilenot=\fi % \def\whilenot #1{\relax \def \whilenotloop#1 ##1do ##2% \endwhilenot #1% {\relax \expandafter\def\csname whilenotbody\string#1\endcsname{##2}% \expandafter\def\csname whilenotloop\string#1\endcsname {\relax ##1% \let\next=\relax \else \csname whilenotbody\string#1\endcsname \expandafter\let\expandafter\next \csname whilenotloop\string#1\endcsname \fi \next }% \csname whilenotloop\string#1\endcsname }% \whilenotloop#1 }% % \let\endwhile=\fi % \def\while #1{\relax \def \whileloop#1 ##1do ##2% \endwhile #1% {\relax \expandafter\def\csname whilebody\string#1\endcsname{##2}% \expandafter\def\csname whileloop\string#1\endcsname {\relax ##1% \csname whilebody\string#1\endcsname \expandafter\let\expandafter\next \csname whileloop\string#1\endcsname \else \let\next=\relax \fi \next }% \csname whileloop\string#1\endcsname }% \whileloop#1 }% % \endinput ------------------------------------------------------------------------------ Date: Wed, 9 Nov 88 10:00:13 NZT From: Russell Fulton Subject: re: LaTeX display on an Ascii terminal Keywords: LaTeX, Ascii, tables Thanks to those who responded to my request for output readable on a Ascii terminal from LaTeX. Brief summary follows: The DVIDOC package written by ken@Rochester GNU EMACS's TeXInfo - might not handle Latex well. screen.sty from Peter Abbott, its in the Ashton archive ( and presumably also at Rochester) I will get both DVIDOC and screen.sty - we can't run EMACS's on our system. And now another Latex problem: I am trying to produce a ``List of Abbreviations'' for our Thesis style. The idea is that you use the \abrev command, that takes two parameters - the abbreviation and its full form, in the text when you first use the abbreviation and LaTeX then collects them up and prints them along with the List of Tables etc. The problem is that I want to have the table printed using the tabular enviroment. I am using the standard tableofcontents macros supplied in LaTeX to write a 'abb' file but it all blows up as soon as I put &s in to delimit the table fields. >> Document Style `article'. Released 4 September 1986. >> (art10.sty.*)) (abbr.sty.*) (test.aux.*) (test.abb.* >> ! Missing \endgroup inserted. >> >> \endgroup >> >> \endtemplate >> \l@abbr #1#2->#1 & >> #2 \\ >> l.1 \l@abbr {IBM}{International Business Machines} I have studied the TeX book on the subject of \begingroup and \endgroup but am still none the wiser. I have had similar problems with trying to set one line of a table in italics, the & acts as a \endgroup resetting the font. You have to set \it for each column. Thanks again, Russell Organisation: "Computer Centre, University of Auckland Private Bag, Auckland, New Zealand" telephone: "+64 9 737-999 X 8955 (GMT +13,nzdt)" internet: "rj.fulton@aukuni.ac.nz" ----------------------------------------------------------------------------- Date: Wed, 9 Nov 88 15:47 PST From: LPRICE@VMSA.CF.UCI.EDU Subject: Mixing landscape and regular fonts in a picture Keywords: fonts We often use the LaTeX picture environment to make figures for scientific reports. Many of the figures are historgrams, graphs, etc. which require the vertical axis to be labeled. Frequently these figures would look much better if the text along the vertical axis could be rotated by 90-degrees (into "landscape" mode). MY QUESTION: How does one mix landscape and regular fonts in the same figure? It seems that (at least in principle) one might be able to: 1. Use MF to create fonts rotated by 90-degrees. (Would this be an easy thing to do?) 2. Using some TeX/LaTeX macro (perhaps like \shortstack) place these characters in a vertical arrangement. BUT: a) How does one get the baselines to line up? (When generating the fonts, could they all be generated with the same horizontal dimension. Would this take care of lining up the baselines?) b) How does one get proportional spacing between these rotated characters? I've heard that it might be possible to mix landscape and regular fonts with particular drivers, but I would like a purely TeX solution, if at all possible. Thanks. LeRoy Price Physics Dept. Univ. of California, Irvine Bitnet: LPRICE@UCIVMSA Internet: LPRICE@VMSA.CF.UCI.EDU ------------------------------------------------------------------------------ Date: Sun, 13 Nov 88 14:12 GMT From: ICNM2%ccuab1.uab.es@Forsythe.Stanford.EDU Subject: Problems with METAFONT on VAX/VMS Keywords: METAFONT I have experienced a problem when trying to upgrade METAFONT from V1.4 to V1.5 under VMS. I get the following error: #################### This is MF, Vax/VMS Version 1.5 (INIMF) **DRSF:[TEX.MF]PLAIN %PAS-F-ARRINDVAL, array index value is out of range %TRACE-F-TRACEBACK, symbolic stack dump follows module name routine name line rel PC abs PC MF USERREWRITE 392 00000090 00066BD8 000B88CF 000B88CF 000B82E4 000B82E4 MF AOPENOUT 399 00000059 00066CE1 MF OPENLOGFILE 4107 0000011F 00090333 MF STARTINPUT 4135 00000209 00090775 MF MF 6170 00000424 0006496C #################### I think that might be a VAX Pascal bug. We have VAX Pascal V3.7-254 under VMS V4.7 Does anybody have a solution to this problem? Thank you. Goncal Badenes Centre Nacional de Microelectronica Universitat Autonoma de Barcelona 08193 BELLATERRA (Barcelona) SPAIN Bitnet: ICNM2@EBCCUAB1.BITNET ICNM2@CCUAB1.UAB.ES ------------------------------------------------------------------------------- Date: Thu, 10-NOV-1988 10:05:00.95 GMT From: Subject: Needed: mode_def for the HP LaserJet+ Keywords: printer Does anybody have a good mode_def for the HP Laserjet+ laser printer? Any help would be appreciated. Sincerely, Goncal Badenes Goncal Badenes Centre Nacional de Microelectronica Universitat Autonoma de Barcelona 08193 Bellaterra SPAIN Bitnet: ICNM2@EBCCUAB1 ------------------------------------------------------------------------------- Date: Thu, 10 Nov 88 10:28 N From: Subject: Needed: Metafile/Pixel/Style-files for cyrillic %Keywords: fonts I'm interested in cyrillic-fonts (preferred PD). Does anyone have information on how to obtain Metafile/Pixel/Style-files? Peter Beckmann Bitnet/EARN: Beckmann@dmswwu5p.bitnet Univ. Muenster DECNet: vxwa80::beckmann (22618::beckmann) Inst. f. Nuclear Research CSNet: beckmann%dmswwu5p.bitnet@csnet-relay.csnet Wilhelm-Klemm-Str. 9 ARPANet: beckmann%dmswwu5p.bitnet@cunyvm.cuny.edu D-4400 Muenster West-Germany BellNet: +49(251)83-4949 ------------------------------------------------------------------------------- Date: 14-NOV-1988 14:07:57 GMT From: CHAA006%vaxa.rhbnc.ac.uk@NSS.Cs.Ucl.AC.UK (Philip Taylor) Subject: Request for e-mail access on behalf of third-party Keywords: queries At the recent inaugural meeting of TuG-UK, Malcolm Clark reminded us of the difficulties faced by non-academic TeX users, in that they typically have no access to InterNet e-mail. After the meeting, I was approached by one such person, who said that he would dearly like to be able to access the InterNet TeX mailing lists and servers, and asked if I knew how he could do so. We discussed the technicalities and financial implications, and it seems that it would not be possible for his site to provide the necessary Greybook and X.25 software, but he does have access to the PSS system, and can therefore make X.29 calls, via the London or Rutherford gateways, into Janet. I undertook to ask on his behalf if there is any Janet site that would be prepared to offer him a guest account, such that he could access the Aston TeX-server and subscribe to the various TeX- related mailing lists. If there is, could someone from that site please contact: Paul L. Allen, T.E.G. Lab, Ferranti Defence Systems, Ltd., Robertson Avenue, Edinburgh, Scotland. Tel: 031 337 2442 Ext: 3246 ** Phil. ------------------------------------------------------------------------------ Date: 10-NOV-1988 12:04:49 GMT From: CHAA006%vaxb.rhbnc.ac.uk@NSS.Cs.Ucl.AC.UK Subject: WEB differences -> change-file ? Keywords: utilities I wonder if anyone has written a "differences" utility which could compare two versions of a WEB file and produce a change file which, if applied to the earlier WEB file, would produce the later ? ** Phil. ------------------------------------------------------------------------------- Date: Thu, 10 Nov 88 14:25:08 PST From: jane@rtsg.ee.lbl.gov (Jane Colman) Subject: VMS GFtoPXL bug Keywords: VMS, bug Some time ago (TeXhax V88 #72) there was a complaint from someone who had obtained both the VMS TeX distribution and the GF files from the Stanford tape, and could not get GFtoPXL to read the GF files. I have also received phone calls from people with the same problem, and have created a new VMS GFtoPXL change file which fixes the bug. I had missed it earlier because I use GF files generated by VMS Metafont, which pads the final record with the GF id byte, while the Stanford GF files pad with 0's after the required 4 to 7 occurrences of the id. Both the new gftopxl.ch and its gftopxl.exe (VMS V4.7, for sites without Pascal compilers) are available by anonymous ftp from rtsg.ee.lbl.gov. They are in the directory tex/mf. I hope someone at Score will pick them up and put them into the standard distribution. --------------------------------- I am also including here a VMS DIFFERENCES file and a DIFFERENCES/SLP file (which can be used to update the Stanford changes file with EDIT/SUM). Change file differences: ************ File RTSGVX$DRA0:[TMP.TEX]GFTOPXL.CH;1 4 ****** File ALT:[TEX.MF]GFTOPXL.CH;2 4 17Aug88 JLC .Changed bot_pixel for large magnfications of cmex10. 5 01Sep88 JLC .Fixed bug in calculating gf file length. 6 14Sep88 JLC .Added code to handle gf files with trailing 0's. 7 ************ ************ File RTSGVX$DRA0:[TMP.TEX]GFTOPXL.CH;1 62 and |term_out| for terminal output. ****** File ALT:[TEX.MF]GFTOPXL.CH;2 65 @!bot_pixel=-250; 66 @y 67 @!bot_pixel=-306; 68 @z 69 70 @x 71 and |term_out| for terminal output. ************ ************ File RTSGVX$DRA0:[TMP.TEX]GFTOPXL.CH;1 237 begin gf_length:=gf_blocks*VAX_block_length-1; 238 @z ****** File ALT:[TEX.MF]GFTOPXL.CH;2 246 begin gf_length:=(gf_blocks-1)*VAX_block_length; 247 @z ************ ************ File RTSGVX$DRA0:[TMP.TEX]GFTOPXL.CH;1 251 @x ****** File ALT:[TEX.MF]GFTOPXL.CH;2 260 @x Kludge for Stanford tape gf files which end in 0's 261 if not eof(gf_file) then bad_gf('signature in byte ',cur_loc-1:1, 262 @y 263 if not eof(gf_file) and (m<>0) then bad_gf('signature in byte ',cur_loc-1:1, 264 @z 265 266 @x ************ Number of difference sections found: 4 Number of difference records found: 16 DIFFERENCES /IGNORE=()/MERGED=1/OUTPUT=RTSGVX$DRA0:[TMP.TEX]GFTOPXL.MSG;1- RTSGVX$DRA0:[TMP.TEX]GFTOPXL.CH;1- ALT:[TEX.MF]GFTOPXL.CH;2 End of change file SUMSLP update file: - 3 17Aug88 JLC .Changed bot_pixel for large magnfications of cmex10. 01Sep88 JLC .Fixed bug in calculating gf file length. 14Sep88 JLC .Added code to handle gf files with trailing 0's. - 61 <@!bot_pixel=-250; <@y <@!bot_pixel=-306; <@z <@x - 237, 237 begin gf_length:=(gf_blocks-1)*VAX_block_length; - 250 <@x Kludge for Stanford tape gf files which end in 0's if not eof(gf_file) then bad_gf('signature in byte ',cur_loc-1:1, <@y if not eof(gf_file) and (m<>0) then bad_gf('signature in byte ',cur_loc-1:1, <@z / End of SUMSLP file Jane Colman Lawrence Berkeley Laboratory JLColman@lbl.gov or jane@rtsg.ee.lbl.gov ------------------------------------------------------------------------------- Date: Fri, 11 Nov 88 10:00:22 EST From: gil@gatech.edu (Gil Neiger) Subject: TEXBIB in BibTeX 0.99 Keywords: BibTeX, UNIX The documentation for BibTeX version 0.99a states that one can use the UNIX environment variable TEXBIB to give paths in which to search for .bib files. However, this does not work for me. In fact, I can find no reference to TEXBIB anywhere in the code, including in the bibext files I have. Could someone responsible for the UNIX interface for BibTeX respond to this please? - Gil Neiger gil@gatech.edu ------------------------------------------------------------------------------- Date: Fri, 11 Nov 88 13:42:53 EST From: ahw@arbortext.com Subject: PC-based implementation of \TeX\--$\mu$\TeX\ Keywords: TeX The following are the relevent sections of a recent press release about $\mu$\TeX. It is being sent to clear up some incorrect information we have read in past months. -------------------------------------------- NEWS RELEASE For Immediate Release For More Information Call (313) 996--3566 PC-BASED SOFTWARE NOW AVAILABLE FROM ARBORTEXT, INC. Ann Arbor, Michigan --- ArborText, Inc. has released a PC-based implementation of \TeX\ that completes the company's present line of software products. Called $\mu$\TeX, the product is based on an implementation of \TeX\ for IBM and compatible microcomputers, developed by David Fuchs and previously marketed by Addison-Wesley Publishing Company, Inc. under the name Micro\TeX\. $\mu$\TeX\ is fully compatible with the latest, most up to date version of \TeX 82, version 2.9.3. According to David L. Rodgers, President of ArborText, Inc., the availability of $\mu$\TeX\ means the company can now meet the needs of a broader range of users. "Although ArborText has been well known and well respected as a supplier of a range of \TeX\ software on a variety of hardware platforms for many years, the availability of $\mu$\TeX\ means that we can now accommodate the segment of users that want to use \TeX\ on PC's," states Rodgers. "$\mu$\TeX\ interfaces with our present \TeX\ support software that operates on the IBM PC/AT and compatibles as well as Sun, Apollo and Digital VAX workstations and mainframes. This means that ArborText can now deliver a full compliment of \TeX\ and \TeX\ support software," stresses Rodgers. A number of macro packages that provide increased functionality are included: \LaTeX, \BibTeX\, and \IniTeX. \AMSTeX\ and \SliTeX\ are available upon request at no additional charge. Also included with $\mu$\TeX is MAPPIT, which translates text files containing generic markup codes into \LaTeX or \TeX\ files. Current owners of Micro\TeX\ can upgrade to $\mu$\TeX\ for $100.00 by forwarding the installation diskette #1 with check, money order or purchase order to ArborText, Inc.... (Truncated here.) ------------------------------------------------------------------------------ Date: Fri, 11 Nov 88 15:15:54 PST From: Fred Long Subject: \midinsert Keywords: TeX I'm using \midinsert, and sometimes the insertion happens at the top of the current page, instead of the next page. What's wrong? ------------------------------------------------------------------------------- Date: Thu, 10 Nov 88 12:33:05 +0100 From: mcvax!nastassia.laas.fr!ralph@uunet.UU.NET Subject: Using Macintosh Figures in LaTeX -> Dvi2ps Keywords: TeX, dvi2ps, Macintosh, LaserPrep, \special I sent the following message to the following newsgroups. But maybe someone familar with the latest version of Unix TeX, or dvi2ps might be able to help. I normally do not receive the TeXhax mailing list directly. So please reply to me directly. Of course, if others are interested I'll summarize. Thank you. Newsgroups: comp.laser-printers,comp.lang.postscript Question: Is it possible to include Macintosh generated PostScript files/figures in LaTeX documents destined for a PostScript printer? I would love to hear from anyone who has succeeded in including Mac figures in a LaTeX/TeX -> dvi2ps -> PostScript-printer production stream under Unix(tm). As I understand, there exist a number of versions of dvi2ps. The source (dvi2ps.c) has a version of 2.10 defined. The man pages' author history includes: "Mark Senn wrote the early versions of this program for the BBN BitGraph. Stephan Bechtolsheim, Bob Brown, Richard Furuta, James Schaad and Robert Wells improved it. Norm Hutchinson ported the program to the Sun. Neal Holtz ported it to the Apollo, and then to produce PostScript. Printed 9/21/85" We are able to send our Macintosh PostScript files (generated by command-F) to our printer. We have a slightly patched version of LaserPrep.ps (AppleDict md version 67 0, dated Mar. 19, 1987). We have dvi2ps' prologue file: tex.ps (for version 2.00 of dvi2ps, by Neal Holtz, last modified Aug. 25, 1985). I have had to patch our version of this file so that Mac figures would not abort and flush the PostScript printer. Considering the errors that I found, I assume that a more recent version of `tex.ps' must exist, but where? I corrected a number of simple errors in tex.ps, all related to the \special TeX command. Now, the tex.ps does not seem able to undo the implicit `showpage' hidden under the LaserPrep's \cp command. I am not an expert of PostScript, but still I hope that there exists somewhere a solution or more recent or different software. Any help would be appreciated. Thanx again, Ralph P. Sobek | UUCP: uunet!mcvax!inria!lasso!ralph, or v | ralph@lasso.uucp LAAS-CNRS | Internet: ralph@laas.laas.fr, or 7, avenue du Colonel-Roche | ralph%laas.laas.fr@uunet.UU.NET F-31077 Toulouse Cedex, FRANCE | ARPA: sobek@eclair.Berkeley.EDU (forwarded\ +(33) 61-33-62-66 | BITNET/EARN: SOBEK@FRMOP11 \ to UUCP ) ------------------------------------------------------------------------------- %%% 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 %%% %%% Concerning subscriptions, address changes, unsubscribing: %%% BITNET: send a one-line mail message to LISTSERV@UWAVM.ACS.WASHINGTON.EDU %%% SUBSCRIBE TEXHAX % to subscribe %%% %%% All others: send mail to %%% TeXhax-request@cs.washington.edu %%% please send a valid internet address!! %%% in the form name@domain or name%routing@domain %%% %%% %%% All submissions to: TeXhax@cs.washington.edu %%% %%% Back issues available for FTPing as: %%% machine: directory: filename: %%% JUNE.CS.WASHINGTON.EDU TeXhax/TeXhaxyy.nn %%% yy = last two digits of current year %%% nn = issue number %%%\bye %%% ------------------------------ End of TeXhax Digest ************************** -------