TeXhax Digest Monday, April 25, 1988 Volume 88 : Issue 40 [SCORE.STANFORD.EDU]TEXHAX40.88 Editor: Malcolm Brown Today's Topics: Pretty printing using TeX DVI driver news Multilingual TeX/LaTeX Wide marks in LaTeX ??? Problems with Figure and Table Labels using LaTeX Common Tex PERT charts ~h Re: Preventing bibitem from printing [ ] in LaTeX RE: V88 #37 Problem w/Figure and Table Captions using Latex Unix sites: changes for multiple copies in "iptex" \edef expanding its first argument. Margins,margins Chinese character set Section-page page numbering Re: cmss/i/bx at magsteps 6/7/8/9 LaTeX macros for Springer-Verlag now available ---------------------------------------------------------------------- Date: Mon, 18 Apr 88 16:02:59 EST From: oravax!norman@cu-arpa.cs.cornell.edu (Norman Ramsey) Subject: Pretty printing using TeX Pugh and Sinofsky at Cornell have come up with a novel scheme for specifiying line breaks when prettyprinting program text. The basic idea is this: a ``group'' structure is defined on the text, and objects called ``conditional line breaks'' are introduced. The resulting wadge should be printing out with the following constraint: if any conditional break within a group is taken, every such break must be taken. thus if {} stand for grouping, and and % stands for a conditional break, we have: {if condition % then statement % else statment } printing either as if a then x := 1; else x := 2; or if some_other_condition then x := x/2; else x := x-1; but never if very_ugly then x := throw_away; else x := great_beauty; So, I have racked my brains to figure out how to get TeX's line-breaking algorithm to do this, or, failing that, find some other efficient way to do it in TeX (using any means you like to label indent, outdent, grouping, and conditional breaks). I hope someone out there will have an idea how to do it using TeX's line-breaking algorithm, or else someone will have a convincing argument saying why it can't be done with TeX's line breaking. If I can figure out a reasonable way to do this it will vastly improve the pretty-printing capability of a WEB system I am building. Norman norman%oravax.uucp@cu-arpa.cs.cornell.edu ------------------------------ Date: Mon, 18 Apr 88 18:43 PDT From: Don Hosek Subject: DVI driver news This is the first in a series (hopefully) of announcements regarding DVI drivers and previewers available for TeX. First off, in case you hadn't heard, the driver lists are currently available from LISTSERV@TAMVM1 (this applies to everybody who can reach BITNET via electronic mail). The files available are DRIVERS EXP A brief explanation regarding files DRIVERS LASER Laser printer drivers DRIVERS LOWRES Drivers for Dot-matrix and other lowres printers DRIVERS PREVIEW Previewers DRIVERS SOURCES Driver sources information DRIVERS TYPESET Typesetter drivers To get a file, send a one-line mail message along the lines of GET DRIVERS whichever to LISTSERV@TAMVM1.BITNET (if you're connected through the internet, the address is LISTSERV%TAMVM1.BITNET@CUNYVM.CUNY.EDU). The files, in theory will be updated monthly. In reality, I haven't updated them since about January (sorry, I'll get on it this weekend). Other news: DVIOUT-- a PostScript/generic DVI driver for VAX/VMS. This is a driver written to be capable of supporting many devices; it currently contains PostScript and Imagen (untested) driver code as well as a Tek4014 previewer (oh my!). Features include: o Inclusion of Tektronix and MacPaint graphics files which may be rotated and scaled in the output; o Graphics primitive (lines, arcs, polygons, etc.) commands via \special; o Settable page orientation and size; o Support for native PostScript fonts; o Support for Right-to-Left text in Left-to-Right documents (presumably using the DVI-IVD modification as per Knuth & Mackay); o Uses PXL, PK or GF fonts. Also included is a well-featured PostScript symbiont. Written in C/Macro-32 The program is in the DECUS program library, tape VAX-301 on a 600' Mag tape in VMS/Backup format. There is a note on my information which makes it seem as if the charge is $45+$2 (shipping?) If you're not in DECUS, I don't know if you can snag the program from them, somebody might want to look into contacting Scott Campbell, PAR Government Services Corporation, the program's author. Address: 7150 Campus Drive Suite 375 Colorado Springs, CO 80920 Phone: 303-594-0095 ++++++ Second up is a driver for the Oc\'e 6750 Laserprinter (a fairly new entry into the crowd, I believe). The 6750 has a resolution of 508dpi and the print samples sent to me look rather impressive. I have no precise details on the driver although it seems that it can do landscape printing. For more information contact Oc\'e Nederland B.V. Division Office Automation Attn.: Mr. J. van Knippenberg P.O.Box 101 5900 MA VENLO The Netherlands Phone: + 31.77.736466 x135 Telex: 58037 Fax: +31.77.544700 Informatively yours, -dh ------------------------------ Date: Mon, 18 Apr 88 13:34:28 CST From: Robert Coleman Subject: Multilingual TeX/LaTeX I have retrieved the file German.sty (German.tex) from the LaTeX-style file in Rochester. One can use this style file with either LaTeX or TeX to typeset documents and portions therof in English, French or German. The file indicates that it is possible to have multiple hyphenation files, one for each language, and that the language switching commands automatically switch back and forth between them provided a multilingual TeX is available. Questions: 1. How does on get the latest hyphenation files for various languages (bitnet access please). 2. Precisely what is involved in setting up a multilingual TeX. 3. What if any is the cost of the above software? 4. In the recent Issue of TUGboat, macros for Greek were described. How does one get the fonts and the macros. Does one need to have a separate TeX or LaTeX to run them? How much do they cost? Please reply either to TeXhax (I suspect that others will want to hear the answer as well) or to me directly. Robert Coleman coleman@uregina2.bitnet ------------------------------ From: RALPH%UHHEPG.BITNET@CUNYVM.CUNY.EDU Subject: Wide marks in LaTeX ??? Date: 18-APR-1988 21:17:14.27 Several questions: I remember seeing this question (or a related one) lately, but my collection of TeXHAXes got attacked by a vicious disk error and died. I am using the report document style, option headings, in LaTeX for a document which has LOST OF LONG MARGINAL NOTES (bad style, but usefull). To have more space for marginal notes I use \addtolength$\oddsidemargin$-30pt \addtolength$\evensidemargin$30pt \addtolength$\marginparwidth$30pt without changing any of the other parameters. That works nicely. But now I want the headings on the page to extend all the way over everything, text AND marginal notes. I tried: \makeatletter \def\@evenhead$\underline$\protect\hspace*$0pt-\marginparwidth \rm \thepage \hfill \sl \leftmark \def\@oddhead$\hbox$ \underline$\sl \rightmark \hfill \protect\hspace*$\marginparwidth \rm\thepage \makeatother which follows the original definition closely, except for inserting the \marginparwidth. Well, it JUST DOESN'T WORK. Why not ? Is there a solution ? The next problem occurs when a chapter or section heading (which appears in the page header) is too long for the page header. In the section heading it will just be broken across lines, but as it goes into a box for the page heading, it will just NOT FIT. I tried using \markright and \markboth with absolutely no effect. Is there any way of having an alternative page heading ? My dream would be something like \section[Short title]$And here comes the ... long title, where "Short title" goes into the page header, and "And here comes the .. long title" is the real section title, which is typeset at the beginning of the section, and goes into the table of contents. It seems to me that the area of page headings is implemented in a way too confusing for me (maybe it is not my fault). IMPORTANT QUESTION: You may have heard about Mass-11, a word-processor for VAX/VMS, IBM PCs and others. If not, don't read on. It can do quite a bit of type-setting these days. Does anyone know about a Mass-11 to TeX (or even better straight to LaTeX) converter ??? I have heard about a Wordstar to TeX converter, is there something similar ? I know it will not be able to do the complete conversion (for example tables and math formulae can probably not be translated). Next problem: I redefined citations to be \def\@cite#1$$$#1$ so they look like an exponent. Now, how can I access the "content" of the citation in the text without using the \cite command ? If i have a \bibitem[1]$whatever Whatever et^al ... and then say "In reference^\cite$whatever the author ..." I get the exponent. But that is exactly NOT what i want in this situation, I just want the text "1" here. How do I get it ? Now a question: A while ago I saw a neat way to do floating figures next to text Tugboat \underline$8 315 (1983), by Thomas J. Reid. Does anyone know of a modified version that works with LaTeX ? And maybe (even better) is compatible with the standard LaTeX floating bodies ??? Now, last but not least, some comments about Bengt Martensson's opinion from TeXHAX37.88: > To customize LaTeX and Plain is--in principle--hard, and requires > knowledge. However, opposed to the general meaning (?), I would argue > that the "straightjacket" LaTeX is no harder to customize than plain. > (The code is beautifully commented.) Well, that may be true for most of the body of LaTeX itself (lplain and latex.tex), and for the two "standard" document styles (report and article). It does not hold for other document styles (I consider memo and letter to be examples of horrible programming style). Some areas of LaTeX (like maybe page-headings, see above, passing parameters to the document style, for example look at \memohdr, and the handling of floating bodies) are badly programmed, or work in a way I personally consider unsatisfactory. In the whole area of customizing document styles and writing new document styles there is hardly any help from the author of LaTeX. Just not to be mis-understood: I like LaTeX. I use it all the time. But it is not perfect, yet. There are things which could be improved. Quite a confusing mix of questions for help and opinions ... Ralph Becker-Szendy RALPH@UHHEPG.BITNET University of Hawaii / High Energy Physics Group (808)948-7391 Watanabe Hall #203, 2505 Correa Road, Honolulu, HI 96822 "Hawaii - it's not just for tourists. People actually live and work there." ------------------------------ Date: Tue, 19 Apr 88 06:15:17 EST From: i5f@l.cc.purdue.edu (S Bechtolsheim) Subject: Problems with Figure and Table Labels using LaTeX \label must come AFTER \caption. Stephan v. Bechtolsheim, i5f@l.cc.purdue.edu, (317) 463 0162 Statistics Department, Purdue University, Math Sc Bldg, W Lafayette, IN 47907 ------------------------------ From: SCCS6038%IRUCCVAX.UCC.IE@forsythe.stanford.edu Date: Tue, 19 Apr 88 15:33 GMT Subject: Common Tex Can anyone inform me on where to obtain SOURCE code for Common Tex?. I believe that Common Tex is public domain software and that the source code (written in C, I think) is available. Please send any replys to the address below, or to the net. Thanks a lot in advance, Aidan Delaney SCCS6038%IRUCCVAX.BITNET@CUNYVM.CUNY.EDU ------------------------------ Date: Tue, 19 Apr 88 08:56:29 cdt From: reed@m.cs.uiuc.edu (Daniel A. Reed) Subject: PERT charts I need to produce some PERT charts (shudder) for an upcoming project. Has anyone seen or heard of any style files for such a beastie? Dan Reed Department of Computer Science University of Illinois at Urbana-Champaign reed@a.cs.uiuc.edu ------------------------------ Date: Tue, 19 Apr 88 11:02:35 EDT From: elwell@ichthyosaur.cis.ohio-state.edu (Clayton M. Elwell) Subject: ~h Re: Common TeX 2.9 and SUN OS 3.5 An alternative solution to the "constant out of range" problem is to change the test from " < 256" to " <= 255". Of course, for an unsigned char this will always be true, so... Clayton M. Elwell -=- "You can't just take my dreams away, not with me watching" -- Holly Near ------------------------------ Date: Tue, 19 Apr 88 13:21:11 EDT From: Ashwin Ram Subject: Re: Preventing bibitem from printing [ ] in LaTeX > Could anyone on texhax please give me some hints on how I can > prevent the square brackets from being printed around the reference numbers in > LaTeX? [...] I am having a hard time > trying to figure out how to prevent the square brackets being printed so that > I could have the references listed in the Artificial Intelligence Journal > format as: 1. authors, title, etc. If you look in latex.tex, you'll see the following definition for \@biblabel: \def\@biblabel#1{[#1]\hfill} Simply change this to: \def\@biblabel#1{#1.\hfill} \@biblabel appears in the expansion of \bibitem. The documentation (again from latex.tex) for \@biblabel follows: % \@biblabel : A macro to produce the label in the bibliography % entry. For \bibitem[LABEL]{NAME}, the label is % generated by \@biblabel{LABEL}. It has the default % definition \@biblabel{LABEL} -> [LABEL]. -- Ashwin Ram -- ARPA: Ram-Ashwin@cs.yale.edu UUCP: {decvax,ucbvax,harvard,cmcl2,...}!yale!Ram-Ashwin BITNET: Ram@yalecs ------------------------------ Date: Thu, 21 Apr 88 08:47 EDT From: MICHELLE%ATC%atc.bendix.com@RELAY.CS.NET Subject: RE: V88 #37 Problem w/Figure and Table Captions using Latex In Texhax V88 #37, Tom Moriarity mentions a problem with incorrect numbers on his tables and figures. As stated on p. 177 in the LaTex book, all he needs to do is put the \label command in the caption's heading or in the body of the figure after the \caption command. The same technique handles tables. ------------------------------ Date: Thu, 21 Apr 88 14:33:36 HST From: Bob Cunningham Subject: Unix sites: changes for multiple copies in "iptex" Unix sites using Chris Torek's excellent "iptex" driver for Imagen laser printers will want to make these simple changes to the iptex driving script and its documentation to allow making multiple copies in the same style as the Unix "lpr" command: ----------------diffs for iptex.sh------------------------------ 6a7,8 > # one copy by default, maximum 99 > copies=1 15a18,19 > -#[0-9]*) > copies=`expr substr $1 3 2`;; 54c58 < ipr $tmpfile --- > ipr -c$copies $tmpfile 60c64 < imagen1 $offset $flags $dvifile | ipr --- > imagen1 $offset $flags $dvifile | ipr -c$copies ----------------diffs for iptex.1 manual page-------------------- 6a7,8 > .I \-#num > ] [ 49a52,57 > To get multiple copies, use the > .I \-# > flag (e.g., > .B "\-#2" > will give you two copies). > .PP ---------------------------------------------------------------- Bob Cunningham (bob@loihi.hig.hawaii.edu) ------------------------------ From: prakash%aiag.DEC@decwrl.dec.com Date: 22 Apr 88 13:12 Subject: \edef expanding its first argument. Can anyone tell me what is the problem with the following macro? The contents of the .tex and the .lis files are appended to this message. What I am trying to do is to recursively expand a macro, save its expansion (using \edef), do some more precessing, and then use the earlier expansion. The whole thing is inside its own group so that some parameters changed by \foo in an inner level do not effect their values at the outer level. The error message seems to be rather confusing, since \edef should not be expanding its first argument (in this case, \fie) at all. It should just \def it to be whatever the expansion of its second argument happens to be. Note that without recursion, the macro works fine (i.e., \foo1 is ok, \foo{\foo1} is not.) ----- Recurse.Tex: ----- \def\foo#1{{% \edef\fie{#1} }}% \tracingmacros=2\tracingcommands=2 \foo1% \foo{\foo1}% \end ----- Recurse.Lis: ----- This is TeX, Vax/VMS Version 2.0 (preloaded format=plain 86.1.16) 22 APR 1988 12:44 **recurse (DISK$FOO:[PRAKASH.TEX.TEST]RECURSE.TEX;6 \foo #1->{\edef \fie {#1} } #1<-1 {begin-group character {} {\edef} {blank space } {end-group character }} \foo #1->{\edef \fie {#1} } #1<-\foo 1 {begin-group character {} {\edef} \foo #1->{\edef \fie {#1} } #1<-1 {undefined} ! Undefined control sequence. \foo #1->{\edef \fie {#1} } \foo 1 \foo #1->{\edef \fie {#1 } } l.8 \foo{\foo1} % ? ---------------------------------------- Thanks. -mayank. +--------------------------------------------------------------------------+ | InterNet: Prakash@AIAG.DEC.COM | | UUCP: ...!decwrl!aiag.dec.com!Prakash | | VoiceNet: (617)490.8139 | | SnailNet: DEC, 290 Donald Lynch Blvd. DLB5-3/B10, Marlboro, MA 01752 | +--------------------------------------------------------------------------+ Disclaimer: The above is probably only line noise, and does not reflect the opinions of anybody, far less my employer's. ------------------------------ Date: Fri, 22 Apr 1988 11:07:49 +0200 From: Francis Borceux Subject: Margins,margins I am running TeXtures on a Macintosh II connected to an Imagewriter LQ and do have some printing problems. That printer has a satisfactory resolution, accepts most sizes of paper and is able to print with rather narrow margins. I am normally printing on A4 paper (211mm x 298mm). First of all, an example where things work nicely. When I print the input file of a TeX document, I get it with a 13mm top margin and a 5mm left margin. Now the trouble is when printing the output file. In that case, no matter the size of the document, it is printed with a one inch top and left margins. In case of a small document, I can easyly center the printed area using the commands \hoffset and \voffset with positive parameters. But recently I had to produce for the "Springer Lecture Notes" a document with size 180mm x 265mm, thus with a 16mm top margin and a 15mm left margin; this is perfectly compatible with the possibilities of the printer. I naively imagined it sufficed to use again the \hoffset and \voffset commands with, this time, negative parameters. As a result, the printed area has been moved in the expected way...except that the one inch top and left margin were still there, acting thus as "white holes" in which part of the text had disappeared. I recall that I am using plain TeX on a Macintosh, thus without a separate driver. Can somebody help a poor TeX Boeotian who does not find any answer to his problem in the TeXbook? Francis Borceux, Louvain-la-Neuve, Belgium. ------------------------------ From: K.P.Donnelly%EDINBURGH.AC.UK@forsythe.stanford.edu Subject: Chinese character set Regarding the query on the TEXHAX bulletin board about the escape sequence to invoke the Chinese character set. From the quote it looks as if there are misprints in the standard, and it presumably means that the escape sequence for invoking the Chinese character set as G0 is ESC 2/4 4/1 (where 2/4 and 4/1 are hexadecimal representations). The code for invoking the G0 set as GL is always SI. The standard model for a character display or printing device is that that it "stores" four character sets, called G0, G1, G2 and G3. Any of these may be invoked into GL, GL being what you actually get when you send 7-bit data to the device. Devices which are capable of it can designate various registered international standard character sets as G0, G1, G2 or G3, the escape sequence for doing this being defined in the standard for the character set along with its graphic representation. For information on the standards framework for character codes, see Smith,J.M. ALLC Bulletin 11, 63-67, 1983, or "Standard ECMA-35 - Code Extension Techniques", This is basically international standard IS 2022 and is available free from European Computer Manufacturs Association, 114 Rue du Rhone, 1204 Geneva, Switzerland To quote from the latter document (section 5.3.9) "ESC 2/4 2/8 F designates a multiple-byte graphic set as the G0 set. The designated set is invoked by SI." (F is a "final character" taken from columns 4 to 7 of the hex table, indicating the particular international standard character set) "As exception to these rules ESC 2/4 4/0, ESC 2/4 4/1 and ESC 2/4 4/2 designate multiple-byte sets as G0 sets, because they are already registered" You actually only get 94x94 = 8836 characters in a 2-byte 7-bit code, because you are not allowed to use the 32 control character positions (so the IBM PC character set does not fit in with international standards) and you are not allowed to displace the codes for SPACE and DEL characters in a G0 set. If any of this is wrong, someone please tell me. Kevin Donnelly Forestry Commission Research, Edinburgh "K.P.Donnelly @ EDINBURGH" on EARN or JANET networks ------------------------------ Date: Thu, 21 Apr 88 11:08 N From: (Nico Poppelier) Subject: Section-page page numbering Mathieu Federspeil writes (TeXhax V88 #37): > Note that you will need to specify \setcounter{page}{1} > immediately after each \chapter command for document style book. The section ENVIRONMENT COUNTER MACROS of latex.tex explains the use of \@addtoreset, which is probably a better way of getting the same result. Add the following to the appropriate style file: \@addtoreset{page}{chapter} Nico Poppelier Theoretical Nuclear Physics University of Utrecht, The Netherlands ------------------------------ Date: Thu, 21 Apr 88 13:17 PDT From: Don Hosek Subject: Re: cmss/i/bx at magsteps 6/7/8/9 First off, if you wish to do anything with Metafont, you should have a mode_def for your output device. This is actually not as scary as it sounds, the file waits.mf contains mode_def settings for a variety of output devices, and ones that aren't present are either available from TUGboat or Doug Henderson (DLatex@Ucbcmsa). Anyway, if you have a version of plain.bas with the built-in mode_def you need, then you can skip ahead. If not, what you should do is modify waits.mf so it contains the mode_def that you need, then use INIMF to create a new plain.bas with the following command: INIMF plain input waits; dump; (if your INIMF does not accept command line arguments, you can type the stuff beginning with plain... at the ** prompt). This will generate a new plain.bas file that you can then put in the appropriate directory/disk for your system. You may, at this point also want to create a cmbase.bas file. This is done with the command INIMF &plain cmbase \dump; It's just that easy. Now that you have your base file generated, you can create any font that you need with the following command: MF \mode:="mode"; \mag:="mag"; \input "font_name"; (stuff in quotes should not be typed as is). "mode" indicates the name of the mode_def you created. For example, at HMC, we use \mode:=laser; for the QMS, \mode:=vs; for the VAXstation, and \mode:=prx; for the printronix. "mag" can be specified in one of two forms: you can say something like 1.2 to get what TeX calls magnification 1200, or you can say magstep1 which will give the same result, but using MF to calculate just what magstep1 would be. A few examples: to create cmss10 at magstep6 for "laser" you type MF \mode:=laser; \mag:=magstep6; \input cmss10; to create cmssq8 at normal size for "prx" you can type MF \mode:=prx; \input cmssq8; (note that if you want to use no magnification, you need not specify \mag.) Hope that this is helpful, -dh ------------------------------ Date: Thu, 21 Apr 88 12:21 PDT From: Subject: LaTeX macros for Springer-Verlag now available LaTeX users who write books for Springer-Verlag will be pleased to know that special macros have been designed to facilitate this process. Ed Sznyter, at Stanford's Distributed Systems Group in Computer Science (ews@Pescadero.stanford.edu), cooperatively developed these macros in conjunction with SV. These macros are variations of the standard LaTeX "report" documentstyle. Following are the two macros, plus a user manual in LaTeX source code. %%% This submission is too large (22K) for distrbution via the digest. It %%% is available for FTP retrieval on the machine SCORE.STANFORD.EDU %%% under the filename %%% SPRINGER.TXH %%% A copy of the file has been sent to TEX-L for BITNET access. Malcolm ------------------------------ %%% %%% 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 %%% %%%\bye %%% ------------------------------ End of TeXhax Digest ************************** -------