TeXhax Digest Thursday, April 16, 1987 Volume 87 : Issue 27 TEXHAX27.87 Editor: Malcolm Brown Today's Topics: program listings font question LaTeX for the -ms macros user TeX for SYMBOLICS? XHMEIA Anonymous FTP TeX/Pascal Formatter/prettyprinter (a la WEB?) LaTeX captions formletter macro question two LaTeX problems - letter closing & matrices Help Installing TeX on CMS ---------------------------------------------------------------------- Date: Tue, 7 Apr 87 15:59:10 EST From: Karl Berry To: texhax@SCORE.STANFORD.EDU Subject: program listings A number of people have written in asking for program listing macros. I have had good luck using an approach similar to Knuth's, when he typeset the Metafontbook. It takes more work than just saying {\ttverbatim ....} (or whatever equivalent thereof you like), but you end up with much nicer output. The idea is to put text in bold, roman, or italics, by typing things like !procedure! /hi_there/(/first_par: integer/); This isn't too much harder to type than regular text, and you get output that looks like it was produced by Weave, instead of by a typewriter. Of course, if you're including several pages of code, this is useless. But just being able to typeset examples or small fragments is nice. I will give what I have to anyone who wants it. Since I wrote them to suit my personal typing style, they will probably serve more as a starting place than as a finished product. By the way, a simple way to make tabs act as eight spaces, in cmtt, is \catcode`\^^I = \active \def^^I{\hskip 2em\relax} To get tabs to act as alignment characters, see the first part of Chapter 22 in the TeXbook, where Knuth typesets a computer program by hand. (And change the catcode to that of ``alignment character.'') Karl kbb@cs.brown.edu {ihnp4, decvax}!brunix!kbb ------------------------------ Date: Tue, 7 Apr 87 21:34:32 EST From: Keiji Kanazawa To: texhax@SCORE.STANFORD.EDU Subject: font question Does somebody have a fixed width sans-serif font that I could use to display lisp code? I'm not very fond of typewriter style when used for this purpose, and that seems to be the only standard fixed width font. I think I prefer sans-serif, but if you know of some other font which is fixed width and works well for lisp, then I would appreciate pointers to that as well. Keiji Kanazawa (I hope this isn't a real elementary question...) ------------------------------ To: texhax@score.stanford.edu Subject: LaTeX for the -ms macros user Date: Wed, 08 Apr 87 16:13:53 GMT From: John Pavel Here is a LaTeX version of the first cut on a paper that should help anyone trying to convert from the -ms macros to LaTeX. I would welcome any contributions to completing/correcting this paper. The extra style file is from Marshall Rose, slightly adapted. Thanks, John Pavel %%% John's file is far too large for digest distribution (over 40K !). %%% It is yours for the taking via FTP: it's stored as %%% PAVEL.TXH at SCORE.STANFORD.EDU %%% A copy has been forwarded to the TEX-L list for those on BITNET. %%% %%% Malcolm ------------------------------ Date: Wed, 8 Apr 87 12:26:52 PST From: Bernhard Nebel To: TeXhax@score.stanford.edu Subject: TeX for SYMBOLICS? Hi. Is there anybody out there who knows about a TeX implementation for the SYMBOLICS Lispmachine? If so, please respond directly via mail because I'm not on the list. Thanks - bernhard ------------------------------ Date: Wed, 8 Apr 87 16:08:49 PDT From: zar@Xhmeia.Caltech.Edu Subject: XHMEIA Anonymous FTP To: texhax@score.stanford.edu We just installed a better TCP/IP software package so FTP access to XHMEIA should improve. If you sent me a note in the past about trouble with accessing XHMEIA, try again. XHMEIA.CALTECH.EDU [192.12.19.15] allows logging in with username ANONYMOUS and any non-null password to access our database of (plain) TeX macros. You may also use DECNET from span node by looking in the directory LOC$FTP: (XHMEIA is node 920 area 5). From The Great Zar ------------------------------ Date: Wed, 8 Apr 87 20:24:42 PST From: To: texhax@score.stanford.edu Subject: TeX/Pascal Formatter/prettyprinter (a la WEB?) Does anyone know of a set of macros that can be used to format a Pascal source code listing? For example, I'd like to be able to format the following code fragment with bold-faced, uppercase reserved words and preserve the spacing (tabs line up, etc.): FOR loop := 1 TO 100 DO BEGIN writeln('This would be printed 100 times... how silly!'); IF (loop = 50) THEN writeln('Halfway there -- rah.'); END; ...and so on. To do this by hand is tedious at best, and for a relative TeX novice such as myself I find lining up tabs and such to be very messy (as I would prefer not to have to make the listing unreadable with TeX commands). Anyone have any suggestions? Please respond directly to me and I will summarize for the digest. Thanks in advance, Mike Weekley EDWARDCA@VUENGVAX ------------------------------ Date: Thu, 9 Apr 87 11:44:57 pst From: Kamal Al-Yahya To: TeXhax@score.stanford.edu Subject: LaTeX captions I believe someone mentioned this (bug?) before. The following caption produces an error: \caption{The result of scaling the data in Figure~\protect\ref{mylabel}.......} The first pass of latex runs fine. When it comes to the second pass, it bombs out if a list of figures is requested ( .lof file). Anybody knows how to handle this one? (in the meantime I will insert the number manually after I figure out what number latex gave to that figure). ------------------------------ Date: Thu, 9 Apr 87 12:39:59 PST From: (Bob Jantzen, BITNET:JANTZEN@VUVAXCOM) To: TeXhax@score.stanford.edu Subject: formletter macro question % This is a test of a formletter macro which bombs due to a grouping problem. % It divides the standard TeXbook letterformat letter into two halves after the % \address macro and uses the \endmode trick of the same letterformat to have % \@ before each obeylines style address ina list print the end of the previous % letter and the beginning of the current letter. The same address list can be % used for other purposes like labelmaking. The formletter can be made more % sophistocated, improving the \addressee line and using \input, but it is a % simple idea that has other applications in macro writing and would be nice to % make work. BELLMAC.THX is just too involved for simple address listings and % simpleminded TeXers who want to understand and manipulate the macros for % their own purposes. This test derails at the \closing, where \obeylines no % longer works and a grouping error is reported. Can anyone help? \magnification=\magstep1 \input letterformat.tex \def\beginformletter{} \let\endmod=\par \def\endformletter{\endmod\end} \def\@{\endmod\gdef\endmod{\ending}\beginning} \long\gdef\beginning{ \localletterhead \address } \long\gdef\ending{ \body Dear \addressee: blah blah blah \closing Sincerely, bob \TeX\ failure \annotations blah blah \ps P.S. \ blah blah \endletter } \beginformletter \@ Ms. Marina Martinelli 13 Lorrel Lane Little, PA 19343 \@ Mr. Marino Martinelli 13 Lorrel Lane Little, PA 19343 \endformletter ------------------------------ Date: 9 Apr 1987 1801-PST (Thursday) From: David Jones To: TeXhax@score.stanford.edu Subject: two LaTeX problems - letter closing & matrices I've tried these two on our local LaTeX person and he is either stumped or doesn't have enough time. 1) I'm sure some LaTeXpert has already solved this. I want to show some matrix equations, involving row and column vectors as well as matrices. I would like the row vectors to align with the tops of the matrices and the tops of the column vectors to align with the tops of the matrices -- with any extra hanging down below the bottom of the matrices. How does one accomplish this? I tried a few and I think I got the contents of the matrices in the right place, but the surrounding brackets were wrong. 2) Try printing the following. The \closing doesn't get indented like it should (at least not on my machine). How come? %%%%% \documentstyle[12pt]{letter} \name{David G.~Jones} \signature{David G.~Jones} \begin{document} \begin{letter}{Fred} \opening{Dear Fred,} Hi there. \closing{sincerely,} \end{letter} \end{document} %%%%% - any insights will be appreciated - maybe you should reply to TeXhax@score and they will "select" the best responses. thanks, Dave Jones djones@rocky.stanford.edu ------------------------------ Date: Fri, 10 Apr 87 14:58:29 PST From: To: TeXhax@score.stanford.edu Subject: Help Installing TeX on CMS I was pleased to read Peter Schumacher's note in V87 #21 asking for font documentation. At that time, I was reviewing the "installation instructions", trying to decide what files go where and what had to be done to implement the device driver for our 4250 printer. It was reassuring to see I was not the only one who could not naturally divine the purpose of most of the files shipped with TeX and soon, I hoped, some sympathetic expert would share the secrets and respond to Peter's plea. Alas, I have seen no sign of a response in the TeXhax Digest and in the time since issue 21 was distributed I have tried off and on to determine on my own what needed to be done in order to get TeX output on our 4250 printer. I've had some minor success, but for the most part, it has been unproductive, time consuming, and frustrating. In Peter's request, he commented "The documentation supplied with the distribution (including README's) is not very detailed on this." He's being very diplomatic; in fact the documentation is woefully inadequate and filled with errors. Please don't take this an attack on the people who've prepared the distribution material because it's not. I know this is a cooperative effort by people with other commitments and obligations and a good deal of work has been done just to make the product available at all, but I feel there is much yet to be done to help the novice installer. I hope I can contibute something in this regard if/when I finally understand the installation procedure. And here I make my own plea and trust that some kindly expert will come to my aid. I want to take a commonly used approach for installing CMS products, namely to have a disk with files for the installer/maintainer and a second, separate disk containing only the files needed to execute TeX (LaTeX, etc.) and the device drivers we can support. We provide cover EXECs on our system disk that ensure the second disk is accessed by the end user of TeX (ie., the person trying to format a document -- not the person trying to port a new version of TeX to system XYZ). Unfortunately, the CMS DOC file does not indicate which files are required to run TeX. I've narrowed it down to the EXECs and MODULES for TeX and DVI4250, the TEX and STY files for LaTeX, and the TFM files for TeX and LaTeX. Most of the other files seem to be either documentation for bugs and changes, source files for TeX, WEB, TANGLE, etc., or MF source files for fonts and GF files that need to be converted to FONT4250 files. This is oversimplification but generally correct I think. Does anyone have a concise list of the essential files needed by the end-user? I have not been able to figure out what GF files should be used to start making the 4250 fonts. The distribution includes 300GF, 329GF, 360GF, 432GF, 518GF, 622GF, and 746GF files for all the Computer Modern and special fonts. Which one(s) do I use as input to the GFTOPXL program? What are the differences? The instructions in CMS DOC imply that the GFTOPXL file will take an nnnGF file as input and create an xxxxPXL file as output since the xxxxPXL file is required by the PXLCVT program to produce a FONT4250 file. However, GFTOPXL will ALWAYS create a file with a filetype of GFTOPXL! Presumably it needs to be renamed to have a filetype of xxxxPXL, but how is the magnification (xxxx) determined?!??!! Well, I guessed and made it this far. Now CMS DOC says the file naming scheme of the 4250 fonts differs from the standard TeX convention, the magnification factor is in the filename, not the filetype. It goes on to say "The PXLCVT utility generates the proper filenames." -- not true. PXLCVT will create an output file with exactly the same filename as the input file!!! So how do I get the magnified fonts for LaTeX? Naturally, I'm not satisfied with guesswork and need to know the correct steps. I'm afraid I've gone on at some length and perhaps this is not the appropriate place. If not, I trust the moderator to edit my submission and perhaps forward it to some TeX wizard on my behalf. I would greatly appreciate hearing from any other CMS sites -- lets pool our experiences and see what we can do to make it better for the next guy. Thanks in advance, Marshal Linfoot York University Computing Services NetNorth: MARSHAL@YORVM1 ------------------------------ %%% %%% subscriptions, address changes to: texhax-request@score.stanford.edu %%% %%% submissions to: texhax@score.stanford.edu %%% %%% \bye %%% End of TeXhax Digest ************************** -------