TeXhax Digest Friday, July 31, 1987 Volume 87 : Issue 62 [SCORE.STANFORD.EDU]TEXHAX62.87 Editor: Malcolm Brown Today's Topics: A quickie shell file for tabular LaTeX users control character macros Re: control character macros BibTeX update Re: putting hrules in headers/footers LaTeX Notes (Re: TeXhax Digest V87 #59) LaTeX Notes (Re: TeXhax Digest V87 #59) Social Science Citations in LaTeX amsplain anyone? Bibtex style stuff texhax submission Re: Looks like a LaTeX bug to me. SLiTeX Re: TeXhax Digest V87 #59 ---------------------------------------------------------------------- 23-Jul-87 15:22:34-PDT,2134;000000000000 Date: Thu, 23 Jul 87 17:15:51 CDT From: William LeFebvre Subject: A quickie shell file for tabular LaTeX users To: TeXhax@score.stanford.edu One of the LaTeX users here recently posed an interesting problem to me. He had an alphabetized list of names that he wanted to put in a tabular environment, but he wanted the list to appear in four columns alphabetized down the column (like "ls" output). So, I cooked up a two line shell file (plus a "#!/bin/sh" line) to take a list of sorted names and produce the `meat' for just such a table. Well, bullet-proofing it, making it handle a specifiable number of columns, and making it more readable made it grow to 7 lines. But that still seems short enough to post here. Perhaps it will solve someone else's problems, too. I call it "tcols", but I have not written a manual page for it. It takes two arguments: the first one is the name of the file containing the alphabetized list (this argument must exist---it cannot take its input from stdin because it reads the file twice), the second one is an optional argument that specifies the number of columns to produce---the default is 2. The meat of the table is written to stdout: it must be surrounded by \begin{tabular}{...}...\end{tabular} and the final "\\" must be removed (that's real hard to suppress), but it does all the hard work. William LeFebvre Department of Computer Science Rice University -------------------- CUT HERE for "tcols" -------------------- #!/bin/sh file=${1:?"no file specified"} len=`wc $1 | awk '{print $1}'` cols=${2:-2} mcols=`expr $cols - 1` plen=`expr \( $len + $mcols \) / $cols` pr -s\& -t -$cols -l$plen $1 | sed -e 's/\&/ \& /g' -e 's/$/\\\\/' -------------------- End of "tcols" -------------------- ------------------------------ Date: Thu, 23 Jul 87 17:55:41 EDT From: kgk%cs.brown.edu@RELAY.CS.NET To: texhax@SCORE.STANFORD.EDU Subject: control character macros Is it really possible to use control characters other than the ones which TeX knows about already (tab, linefeed, rubout, etc.)? I'd like to do something akin to: \catcode`\^^V=\active \def^^V{\bgroup\verbatim} \catcode`\^^E=\active \def^^E{\egroup} But TeX barfs when I run it with such an input. It apparently knows nothing about my telling it to make the characters active because it complains about ^^?. This doesn't happen when I do something almost exactly alike: \catcode`\^^L=\active \def^^L{\vfill\eject} Could somebody please tell me what, if anything, I'm doing wrong? %% %% Barbara Beeton has a quick reply: %% ------------------------------ Mail-From: BEETON created at 24-Jul-87 06:19:55 Date: Fri 24 Jul 87 06:19:55-PDT From: Barbara Beeton Subject: Re: control character macros To: kgk%cs.brown.edu@RELAY.CS.NET if you really can't use the control characters other than tab, linefeed, etc, then you have a right to complain about your implementation of tex. tex {\sl does} know about all the control characters -- see the \mathcode table on page 344 of the texbook. and ^^_, ^^S and ^^D are used in plain, to make things convenient for using keyboards with extended character sets (texbook, page 357). it's funny you should choose ^^V -- knuth's own system has such an extended keyboard, and the circled-times symbol on that keyboard, with internal representation ^^V, is the symbol he originally chose to use to represent the tab in alignments. the syntax you're using looks okay. i'd suggest making a very small text file using some of the "suspect" control characters, and defining them to produce simple and distinct strings ("aaa", "bbb", etc.), then using them with \tracing switches turned on, to see what really is happening. if you then find that they realy aren't recognized, you should get in touch with the originator of your implementation. (you didn't say, by the way, what implementation you're using, or on what machine.) -- barbara beeton ------------------------------ Mail-From: PATASHNIK created at 24-Jul-87 07:26:17 Date: Fri 24 Jul 87 07:26:17-PDT From: Oren Patashnik Subject: BibTeX update To: texhax@Score.Stanford.EDU BibTeX is in the final stages of its last major update. Please send me any BibTeX bugs you haven't seen reported on texhax. Thanks. --Oren Patashnik (BibTeX implementor) patashnik@score.stanford.edu ------------------------------ Date: Thu, 23 Jul 87 10:48:15 BST From: Peter Ilieve To: texhax@score.stanford.edu Subject: Re: putting hrules in headers/footers > From: Jerry Sweet > Can anyone suggest a way to put horizontal rules below the header > information, or above the footer information, with LaTeX? The LaTeX > book is an example of the kind of effect I'm interested in. Here are two ways I have tried to get \hrules into headings. Both are done with document style options, one changes the definition of \@oddhead etc. and the other one changes \@outputpage. I actually used the \@outputpage one as I wanted the header to be wider than the \textwidth but the changes for that are not shown here. The basic method is to replace the \hbox containing the heading with a \vbox containing the original \hbox, whatever vertical space is required and the \hrule. The \@oddhead method: \headheight 25pt % more room, \textheight etc. will need adjusting as well \def\@oddhead{\vbox{\hbox to \textwidth{\strut whatever you want in here}% \vskip 10pt% or whatever \hrule}} This definition can be put into the definition of \ps@headings to get the rules only in the headings page style or used as is to get them all the time. The \@outputpage method: \headheight 25pt % more room again then change the bit of \@outputpage that does the header from: \vbox{\setbox\@tempboxa \vbox to\headheight{\vfil \hbox to\textwidth{\@thehead}} to: \vbox{\setbox\@tempboxa \vbox to\headheight{\vfil \hbox to\textwidth{\strut\@thehead}% \vskip 10pt% \hrule}% The footer can be changed in similar ways. I shall now go and cower in a corner and wait for Leslie Lamport to tell me this is all wrong -). I always like his comments. Peter Ilieve peter@memex.co.uk peter@memex.uucp ------------------------------ Date: Fri, 24 Jul 87 11:28:44 PDT From: lamport@src.DEC.COM (Leslie Lamport) To: TeXhax@Score.Stanford.edu Subject: LaTeX Notes (Re: TeXhax Digest V87 #59) Allanw Weber writes: Maybe I missed finding what I needed in the TeXbook or LaTeX book but can somebody recommend a way to make LaTeX push orphan lines over to the next page? I have a 100+ page document that has numerous pages with the first line of a paragraph as the last line on the page. I would like to have LaTeX stick in a page break whenever a new paragraph is started and there is room for only the first line on the current page. Thanks. The appropriate parameters are TeX's \clubpenalty and \widowpenalty. (One controls orphans, the other widows, but I'm not sure if the use of these terms is universally consistent.) LaTeX uses the standard Plain TeX values for these parameters, which seem to produce more widows and orphans than they should. Setting them to 10000 would prevent all widows and orphans, but this Draconian measure would have unpleasant side effects. I've never had much success at improving page breaking by adjusting penalties; it seems that TeX effectively ignores penalties until they are so large that they cause other problems. However, I must emphasize that I have not systematically investigated the use of penalties in page breaking; I simply assumed that Don Knuth had and had set these parameters to their optimal values. If anyone wants to do the necessary experimentation (which requires a large statistical base to make sure that the results are widely applicable), I'd be happy to incorporate the results into the standard document styles. Jeffrey A. Hallett writes: I've made a copy of the \def\@outputpage and put in the necessary changes. I've tried including this new macro both before and after the \begin{document}, but the system doesn't recognize my re-definition. It runs fine, but uses the old definition of \@outputpage, The most likely problem is that the "\def\@outputpage" occurs in a context in which "@" is catcode'd to be a nonletter, so this command is actually defining the command "\@". The proper approach is to put the definition in a document-substyle--e.g., put it in a file called foo.sty and use the substyle option "foo" in the \documentstyle command. (Style files are read with "@" catcoded as a letter.) Another approach, which is useful for testing, is to use the undocumented LaTeX command \makeatletter, which catcodes "@" as a letter. (The command \makeatother has the opposite effect.) Leslie Lamport ------------------------------ Date: Fri, 24 Jul 87 12:54:10 PDT From: lamport@src.DEC.COM (Leslie Lamport) To: TeXhax@Score.Stanford.edu Subject: LaTeX Notes (Re: TeXhax Digest V87 #59) Rainer Schoepf writes: The \dotfill command, used in a tabular environment, does not produce any leaders. Probably due to the \unskip at the end of every column. If this is the case the definition of \dotfill should include a \hskip0pt at the end. This is indeed a bug and will be fixed in the next release. (The \hrulefill command has the same problem.) Leslie Lamport ------------------------------ Date: Fri 24 Jul 87 13:07:57-PDT From: Ross Boylan Subject: Social Science Citations in LaTeX To: texhax@SCORE.STANFORD.EDU Does anyone know of a way of getting LaTeX/bibtex to produce standard social science citations and references? These look like (Weber, 1911) The reference itself in the bibliography looks like Weber, Max. 1911. Other bibliographic stuff. Multiple works by the same author/year look like Weber, 1911a. Sometimes several people with the same last name are identified by (M. Weber, 1911). It would be OK if the user had to provide the label as input to bibtex. If this has already been answered, please direct me to the appropriate place. Extensive checking hasn't turned much up. Specifically: 1) The LaTeX alpha styles produce truncated names, which are not helpful. The rochester style collection has some modifications of this, but they are basically the same. 2) The TexHax discussion of "sociology" style references referred to a completely different style of reference than referred to above (using ibid, idem, op cit , etc.) This is not the style used by the mainline sociology journals. 3) The tbib package looks promising, but a) it's yet another package and b) I understand it's in C, which doesn't help systems which don't have C. I think such a reference format would be of widespread interest to social scientists. Please RSVP to the above account (b.boylan@lear.stanford.edu) as well as texhax, since I'm loosely coupled with the bboard. Bitnet address: BOYLAN AT SUWATSON Thanks in advance. Any help would be greatly appreciated. P.S. A solution to a more general LaTeX bibliography problem would be nice. Sometimes a desired reference has multiple works, each with a qualification. At the moment only the whole group can be qualified. It would be useful to say (using the social science format) Sociologists have long been concerned with power (Marx, 1884, ch. 2; Weber, 1911, pp. 5010--7456). ------------------------------ Date: Fri, 24 Jul 87 16:11:37 EDT From: lear@aramis.rutgers.edu (eliot lear) To: TeXhax@score.stanford.edu Subject: amsplain anyone? Thanks for all the replies regarding LaserWriters and font generation. Next question: Does anyone know of a plain file for amstex that is PD? Thanks in advance (again), Eliot ------------------------------ Date: Fri, 24 Jul 87 15:22:48 CDT From: David Chase Subject: Bibtex style stuff To: texhax@score.stanford.edu I think that the bibtex entries out to also recognize a DAY field. This would make life much simpler when citing newspaper articles or magazines that appear weekly. (I have other questions, but they will be better answered when my copy of M-C. Van L's book arrives.) David ------------------------------ Date: Fri, 24 Jul 87 17:54 EDT From: Subject: texhax submission To: texhax@score.stanford.edu Myself and several others at our company have started using TEX for our documentation. We use a VAX/VMS with a XEROX 2700 printer. We obtained the Stanford distribution and joined TUG. We obtained an excellent 2700 driver for VMS from Illinois State. We use TEX, LATEX, and have experimented with METAFONT. The majority of our work utilizes LATEX. We have been very pleased with the results. The remaining problem is to integrate graphics capability into TEX (or LATEX). The most commonly used graphics terminals are Tektronix based. Our printer does not have Tektronix or any other graphics capability. What is needed is a general graphics line drawer within LATEX. I originally thought to just utilize the picture environment within LATEX. I wrote a program to convert instructions in a Tektronix graphics file to LATEX picture macros ( I have tried both line and bezier macros). I quickly found out that TEX's memory capacity is exceeded. Typically about 100-400 vectors can be drawn before this happens. I need to be able to draw several thousand vectors on a single figure. Is there any way to get around this problem? Am I stuck with having to use a printer which has graphics capability as a subset and use the \special command? Can I utilize the METAFONT program or other TEX support programs to generate a graphics package? Thanks in advance for a response James D. Freels Technology for Energy Corporation One Energy Center Lexingtion Drive P.O. Box 22996 Knoxville, Tennessee 37933-0996 freels%utkvx1.bitnet@wiscvm.wisc.edu or just freels@utkvx1 ------------------------------ Date: Fri 24 Jul 1987 18:00:20 EDT From: Subject: Re: Looks like a LaTeX bug to me. To: TEXHAX@SCORE.STANFORD.EDU In a recent issue of TeXhax, William LeFebvre commented that the following line does not produce the intended result in LaTeX. An equation using \verb|MIN_INT| is $x < \mbox{\verb|MIN_INT|}$. Please note that Section C.5.4 of the LaTeX manual indicates that the \verb and \verb* commands may not appear in the argument of any other command. In this case the desired result can be obtained using the following line. An equation using \verb|MIN_INT| is $x < \mbox{\tt MIN_INT}$. ------------------------------ Date: Fri 24 Jul 87 14:59:14-PDT From: Tony Li Subject: SLiTeX To: texhax@score.stanford.edu I'm trying to build SLiTeX under VMS from the Kellerman and Smith distribution. I think I understand what needs to be done, but I'm missing some of the .mf source files for the SLiTeX fonts. Specifically, I'm in need of cmsss8.mf,icmsss8.mf, etc. How can I get these? I tried looking on score, but I didn't find them. Thanks in advance, Tony ;-) ------------------------------ Date: Fri, 24 Jul 87 16:59:05 PDT From: Christopher Schmidt Subject: Re: TeXhax Digest V87 #59 To: TeXhax@SCORE.STANFORD.EDU I edited two lists once (Info-1100/Bug-1100) where one readership was a subset of the other. It wasn't too bad to maintain. The distribution list for Info-1100 (the less esoteric of the two, corresponding to TeXhax) just included an entry for the Bug-1100 list (corresponding to LaTeXhax). If a reader wanted both lists, I put him on Bug-1100. If he wanted only Info-1100, I put him on that list. The only annoying part was that I had to check two files if someone sent me a list deletion reqest and didn't specify the list(s) he was on. I favor the split, since I have no interest in LaTeX. I would expect a discussion of a circle font printer problem to take place on TeXhax. Circle fonts aren't unique to LaTeX, are they? (If they are, that would be the list I would expect the discussion to take place in.) I confess, however, that I eventually merged Info-1100 and Bug-1100 because many people didn't understand the distinction and I often had to manually redirect their mail. --Christopher %% A few have responded to the question as to whether TeXhax should %% bifurcate into two digests, LaTeX and TeX. All of these felt %% strongly that the digest should NOT be divided. Accordingly, %% I have no plans to create a separate digest for LaTeX, and I will %% not do so until there is a convincing statement from a large %% percentage of TeXhax subscribers. Fair enough?-- Malcolm