Subject: TeXhax Digest V87 #49 From: TeXhax Digest Errors-to: TeXhax-request@Score.Stanford.EDU Maint-Path: TeXhax-request@Score.Stanford.EDU To: TeXhax Distribution List: ; Reply-to: TeXhax@Score.Stanford.edu TeXhax Digest Friday, June 19, 1987 Volume 87 : Issue 49 [SCORE.STANFORD.EDU]TEXHAX49.87 Editor: Malcolm Brown Today's Topics: remote execution of Unix TeX LaTeX Notes (Re: TeXhax Digest V87 #45) \headline and \footline in AmSTeX Semi Verbatim Mode in LaTeX SPIE proceedings formatting \specials X windows previewer Pic-like software for TeX fonts for write-write printers Univ. of Minnesota thesis format Input file line numbers in TeX? ---------------------------------------------------------------------- Date: Fri, 12 Jun 87 09:30:33 EDT From: beck@svax.cs.cornell.edu (Micah Beck) To: texhax@score.stanford.edu Subject: remote execution of Unix TeX One of the problems we've encountered in trying to encourage use of LaTeX in Cornell's Computer Science department is that of performance. Most graduate students currently use a single 4.3 BSD Unix MicroVax for their work, and a few LaTeX jobs running at once will lay it low. Our department has several other multiuser computers, and about twenty Sun-3/50s which are often lightly loaded, so I've devised a simple load-balancing scheme which can execute TeX remotely. My question is: has anyone else implemented such a scheme for Unix TeX? Are other people interested in my hack? I have not yet determined what my department's policy on distributing code is, but I will look into it. If you are interested, it would help to send me a brief description of your Unix computing environment. That way I can package up the code in the most useful form - right now it has some local dependencies. This hack has made a world of difference in our LaTeX environment. There is almost always an idle Sun-3 on the network, and so the speed of LaTeX jobs does not decrease at all when the multiuser systems are busy. Some details about the mechanism: 1) It uses rwhod information for load balancing. 2) It uses rsh for remote execution. 3) File access is implemented through a hack to the test_access() routine in ext.c For the moment, I'm just gathering information - I won't be able to distribute anything for a while. Micah Beck (beck@svax.cs.cornell.edu) Department of Computer Science Cornell University ------------------------------ Date: Fri, 12 Jun 87 10:08:20 PDT From: lamport@src.DEC.COM (Leslie Lamport) To: TeXhax@Score.Stanford.edu Subject: LaTeX Notes (Re: TeXhax Digest V87 #45) First, a message to those of you who may have sent me mail and not received a response. I reply to all mail sent directly to me--though my reply may be rather curt if the question should have gone to the sender's site coordinator. Often, the return address does not work, and the mail bounces. If that happens, I will try to create an alternate address that I think might work and resend the message. If that doesn't work, I give up. I dislike doing this, but I can think of no reasonable alternative. In response to Reid Rowlett: I contacted SPIE (Society for Photo-Optical Instrumentation Engineers, an optical engineering group) concerning whether they would accept camera-ready copy on 8.5 x 11 (already-reduced) sheets, rather than on the larger sheets they provide, which are too large for our Imagen laser printer. I was told they would not. Sigh... I'm willing to write to SPIE or other organizations pointing out their anachronism, though I doubt if that would do any good. I suggest that, in this and similar cases, two pieces of information be obtained: 1. How do most authors produce their copy? (I doubt if many of them still use ordinary typewriters, and it's my impression that most word processors' impact printers don't accomodate large paper either.) 2. Is the source of the problem the editor (the organization compiling the material) or the printer (the company that actually manufactures the proceedings)? In the latter case, perhaps the solution is to encourage competetive bids from other printers. What I can do instead is to tell LaTeX the actual dimensions I want, and then print the document twice on the laser printer (in landscape orientation), using different print margins so that first the top half and then the bottom half of the page is printed. I still have to paste up the results, but at least LaTeX has done the formatting for me, and the format exactly fits SPIE's specifications. This is a probably the best approach if you have lots of two-column figures or footnotes, or if you have someone to do the pasting whose judgement you don't trust. However, if you have to paste anyway, you might consider the alternative of having LaTeX generate galleys and doing the page layout yourself. (Set the page height to the maximum printable size and inhibit page breaks within paragraphs with the \samepage declaration.) This is more work, but can produce better results because page breaking is the one major part of formatting that TeX and LaTeX are not very good at. I need a 9-point option for ARTICLE.STY to obtain approximately 11-point fonts at magnification=1200. Perhaps Leslie Lamport can give me direction on creating a 9-point option style by modifying ART10.STY (can I simply use the \small declarations and redefine all the sizing commands?). As long as fonts come in discrete sizes, it's impossible to create perfectly scaled versions of documents. The best you can do is get the \normalsize text to be (almost) perfectly scaled and the rest to come close. This is done by scaling all dimensions and font sizes in art10.sty. Although I have no training in document design, I do not consider myself naive with respect to judging readability. What a document designer presumably understands that I do not is WHY one style is more readable than another, and HOW to select dimensions and fonts and so forth to make a readable style. I doubt if I was any more naive than Rowlett when I started, but working with designers taught me that I routinely made formatting mistakes that made documents harder to read. Dan Rovner writes: To whoever can explain this phenomenon: Below is a fragment of a Latex input file which does something that I wish Latex would do all the time: it puts a float in the middle of a paragraph. The answer, which can found in greater detail by looking up "figure environment" in the index of the LaTeX manual, is the `h'. I am happy--nay, eager--to debug LaTeX problems, but only if they really are LaTeX problems. The only way I can be sure it's a LaTeX problem is if it appears when using only features described in the manual. When you encounter a problem, please try to create the smallest example that exhibits it using only commands and styles from the manual. (In the past, I've wasted too much time locating nonLaTeX problems--for example, a couple of hours spent discovering a \def\else{...} command in the input.) Leslie Lamport ------------------------------ Date: Fri, 12 Jun 87 13:14:11 EDT From: agw@morningside.columbia.edu (Art Werschulz) To: texhax@score.stanford.edu Subject: \headline and \footline in AmSTeX Hi TeXhaxers. How does one get a \headline and a \footline in AmSTeX? A friend of mine is working on a book. He wants to have a \headline which consists of a page number and either a chapter title or a section title. More precisely, the left-hand page should contain the page number, \hss, and the chapter title, while the right-hand page should contain the section title, \hss, and the page number. No page numbers should occur on the bottom, except on the first page of a chapter. On the first page of a chapter, the \footline should contain a page number, either on the left side (even page number) or the right side (odd page number). I suggested the following: \pageno=\startpageno \headline={\ifodd\pageno\rightheadline \else\leftheadline\fi} \footline={\ifodd\pageno\hss\pageno \else\pageno\hss\fi} \ifnum\pageno=\startpageno \global\def\leftheadline{} \global\def\rightheadline{} \else \global\def\leftheadline{\pageno\hss\chaptertitle} \global\def\rightheadline{\sectiontitle\hss\pageno} \nopagenumbers \fi \chaptertitle and \sectiontitle are set by \chapterbeg and \sectionbeg macros. Unfortunately, this doesn't work in AmSTeX, since the \output routine for AmSTeX doesn't use \headline or \footline. I tried using \output={\plainoutput} to get around this problem, but every time AmSTeX tried to ship out a page, I got the following kind of error msg: Underfull \hbox (badness 10000) has occurred while \output is active [] ! Missing number, treated as zero. } \plainoutput ...eheadline \pagebody \makefootline }\advancepageno \ifnum \ou... {\plainoutput } \bigbreak ->\par \ifdim \lastskip <\bigskipamount \removelastskip \penalty -... \next@ ->\bigbreak \bgroup \let \\=\cr \global \setbox \headingbox@ \vbox \b... { l.112 \heading{ \bf 1.1. Problem Formulation} \endheading So, what should I do to include \headlines and \footlines in AmSTeX? I assume this involves writing a new \output routine, from which I know nothing. P.S. Would you please CC: any replies to greg@cs.columbia.edu, as well as to me? Thanks. Art Werschulz ARPAnet: agw@columbia.edu USEnet: ... seismo!columbia!agw BITnet: agw%columbia.edu@wiscvm CCNET: agw@columbia ATTnet: Columbia University (212) 280-3610 280-2736 Fordham University (212) 841-5323 841-5396 ------------------------------ Date: Fri, 12 Jun 87 13:07 CDT From: David D. Loeffler Subject: Semi Verbatim Mode in LaTeX To: TeXhax%Score.Stanford.edu@mcc.com Reply-To: Loeffler@MCC.COM I would like to have a semi-verbatim mode for LaTeX for inserting code examples in text. I have a lisp mode in Zmacs that changes fonts depending on context and I want to insert font shifts in verbatim mode. Below is the newenvironment I created that seems to do most of the right things and I would like a TeX-pert to review it and give me some advice about how to make it better. % -*- Mode: Text; Nofill: T; Default-character-style: (:FIX :ROMAN :LARGE); -*- % lisp Environment. % Like verbatim except you can do font changes. The following % fonts are specifically for lisp code. \font\ttten=cmtt10 \font\ttb=cmttb10 \font\sften=cmss10 \font\sfb=cmssbx10 \font\sfnine=cmss9 \font\sfi=cmssi10 {\catcode`\`=\active \gdef`{\relax\lq}} \newenvironment{lisp}{\begin{trivlist}\item[]\def\par{\leavevmode\endgraf}\catcode`\`=\active \setlength{\baselineskip}{9pt}\ttten \obeylines\catcode``=13\catcode`\&=12\catcode`\#=12\catcode`\ =12\obeyspaces}{\end{trivlist}} {\obeyspaces\global\let =\ } % Let active space = control space. -- David D. Loeffler ------------------------------ To: Reid Rowlett Subject: SPIE proceedings formatting Date: Fri, 12 Jun 87 11:19:37 PDT From: Richard Roy I have sent several papers to SPIE proceedings, all LaTeX formatted and find the simplest method for meeting their specifications is to produce the twocolumn LaTeX output on 8.5 x 11 standard size, then use a copier with 122% magnification. A little tweaking with your twocolumn.sty file to set margins, i.e. textwidth, textheight, columnwidth, oddsidemargin, evensidemargin (if twosided), etc., and you can simply put your paper in the feeder, your mats in the large tray, and press the start button. This is to date the simplest solution I have found --- I REFUSE TO CUT-AND-PASTE! I'll tweak before I'll stoop to that. If you are interested in the margins I use, let me know and I'll try and dig them up. Note the overall position depends on the margins added by your dvi2whatever program! RR ------------------------------ Date: Fri, 12 Jun 87 14:22:25 CDT From: amit@umn-cs.arpa (Neta Amit) To: dhosek%hmcvax.bitnet@wiscvm.wisc.edu, texhax@score.stanford.edu Subject: \specials The situation is, in my opinion, quite analogues to toding (semi-) fancy stuff on terminals. I.e. there are fairly large but reasonably well defined capabilities that terminals can possess, and we can invoke them using different codes. The capabilities, and the codes per display, can be encoded quite efficiently in a database, e.g. termcap, where various programs can look up. The same thing applies to printers, and printcap. I don't see why there cannot be a central database, say lasercap, which will specify primitives per laserprinter, and the related codes. A device driver will then lookup the lasercap file to determine what's the correct sequence to print e.g. a circle at position (x,y). This is as far as the backend goes. As for the frontend, it is not dissimilar to Unix's Curses, i.e. higher level logical primitives that can be implemented by calling the lower level termcap codes. Those higher level logical primitives is what users should use I'm not convinced that what the TeX community needs here is consensus. Another approach would be for someone(s) to implement lasercaps (or other suggestions) and demonstrate that they have a general \special facility. Names may not be ``ideal'' (are termcap's...) but what the heck -- neither are (La)TeX's. On the other hand, if someone is working toward this end, it would be beneficial to the TeX community to be aware of such an effort. --Neta Amit (amit@umn-cs.arpa) University of Minnesota CSci ------------------------------ To: msh%cool.uucp%fingate.bitnet@wiscvm.wisc.edu Subject: X windows previewer Date: Fri, 12 Jun 87 15:53:48 -0400 From: Ken Yap There is xdvi in the X10 distribution. I have a version that accepts pk fonts as well. Mail me if you want a copy. Ken ------------------------------ Date: Fri 12 Jun 87 14:33:02-EDT From: John Gourlay Subject: Pic-like software for TeX To: shapiro@inria.inria.fr%csnet.arpa John Renner, a former student of mine now at Adobe, has written a program called TeXtyl to allow TeX users to draw lines and curves in their documents. It's actually a postprocessor: one runs TeX on an input file containing \specials that define a drawing, and then runs TeXtyl on the dvi file to obtain a new dvi file in which the \specials are replaced with dvi commands to print the lines and curves by piecing together small characters from special fonts. It's in the public domain, but contact John (adobe!renner@decwrl.dec.com) for details. ------------------------------ Date: Fri, 12 Jun 87 21:22:28 PDT From: Bruce Langdon To: texhax@score.stanford.edu Subject: fonts for write-write printers According to the documentation for ArborText's current release of dvips, their second set of pixel files in the distribution are for write-white printers (Ricoh etc.) that produce anemic output when one uses Canon pixel files (witness many recent messages here). I have seen how bad the result is with write-black pixel files on LN03, TI.... printers. Sure hate to have anyone put up with that. But I haven't seen with my own eyes the results with ArborText's alternate pixel files. ------------------------------ Date: 15 Jun 87 07:25 EDT From: Richard Zaccone To: Subject: Univ. of Minnesota thesis format X-Orig-To: texhax@score.stanford.edu Does anyone have macros for the University of Minnesota Ph.D. thesis format? Rick Zaccone Bucknell University zaccone@bucknell.bitnet ------------------------------ From: bnfb@june.cs.washington.edu (Bjorn Freeman-Benson) To: texhax@score.stanford.edu Subject: Input file line numbers in TeX? Date: Mon, 15 Jun 87 17:34:57 PDT I would like to have access to the input file line numbers that TeX uses to print out error messages. Specifically, I would like to say: \typeout{I am at line \linenumber in this file.} Thank you for any help... Bjorn N. Freeman-Benson ------------------------------ Date: Mon, 15 Jun 87 17:34:42 GMT From: CMI011%UK.AC.SOUTHAMPTON.IBM@ac.uk To: TEXHAX@score.stanford.edu For those TeXhaxers who use PostScript in their output devices, heres a modified version of Spencer Thomas's Unix shell script to print the word DRAFT on every page of a document; instead of outline lettering, this does it in grey, underneath the text. Sebastian Rahtz, Computer Science, Southampton, UK PS the backslashes will almost certainly be mucked up by the file transfer round here (what do you expect with an IBM?) so use your intelligence if you try this out. #! /bin/sh # Put the word "DRAFT" (or a specified word) on each page of a postscript # document. # Usage: # psdraft [-s draftstring] < file ... # Author: Spencer W. Thomas # Computer Science Dept. # University of Utah # thomas@cs.utah.edu # Modified by LA Carr, Electronics & Computer Science, # University of Southampton, Southampton S09 5NH (lac@uk.ac.soton.cm) # # Insert header after first line that does not begin %% or %! # trap "rm -f /tmp/psd$$.*" 0 1 2 15 if [ "x$1" = "x-s" ] ; then draftstring=$2 shift shift else draftstring=DRAFT fi if [ "x$*" = "x" ] ; then echo "Usage: psdraft [-s draftstring] files ..." fi # Create sed script file sed "s/(DRAFT)/($draftstring)/" <<'EOF' >/tmp/psd$$.sed 1,/^[^%]/ s/^%/%/ s/^$// t skip i\ % Prelude to show a draft string on every page.\ (DRAFT)\ /DRAFTDICT 10 dict def\ DRAFTDICT begin\ /DRAFTSTRING exch def\ /DRAFT gsave\ initmatrix\ /Helvetica-Bold findfont setfont\ DRAFTSTRING dup stringwidth pop 8.875 exch div dup 72 mul dup scale\ 52.3 rotate 2.5 exch div -.35 translate\ 0.95 setgray\ 0 0 moveto show\ grestore def\ /oldshow /showpage load def\ /oldcopy /copypage load def\ /oldinitgraphics /initgraphics load def\ end\ /showpage DRAFTDICT begin oldshow DRAFT end def\ /copypage DRAFTDICT begin oldcopy DRAFT end def\ /initgraphics DRAFTDICT begin oldinitgraphics DRAFT end def\ DRAFTDICT begin DRAFT end\ % End of draft prelude : skip EOF cat $* | sed -f /tmp/psd$$.sed ------------------------------ %%% %%% subscriptions, address changes to: texhax-request@score.stanford.edu %%% %%% submissions to: texhax@score.stanford.edu% %%% %%% BITNET redistribution: TEX-L@TAMVM1.BITNET (list server) %%%\bye ------------------------------ End of TeXhax Digest ************************** -------