TeXhax Digest Tuesday, February 10, 1987 Volume 87 : Issue 09 TEXHAX09.87 Editor: Malcolm Brown Today's Topics: More mathematical symbols 10 and 12 point fonts in LaTeX Re: BibTeX wish list Responses To LaTeX questions/complaints double spacing, 10pt option, and full page figure drafthd.sty layout.sty MF bugs & fixes (VAX/VMS specific) ---------------------------------------------------------------------- Date: Wed, 4 Feb 87 15:52:44 PST From: martyg@lbl-csa3.arpa (martin gelbaum) Subject: More mathematical symbols To: texhax@score.stanford.edu One of the users here was interested in the following mathematical characters for TeX (NOT LaTeX): (1) lambdabar (which is to l as hbar is to h) (2) script capital I (for moment of inertia) (3) The pound sign without the bar (for Lagrangian) Is there some standard way people define these characters? Thank you very much. Martin Gelbaum ------------------------------ Date: Wed, 4 Feb 87 14:58:35 PST From: martyg@lbl-csa3.arpa (martin gelbaum) Subject: 10 and 12 point fonts in LaTeX To: texhax@score.stanford.edu The following is the gist of a letter from a local LaTeX user: Here is part of the lfonts.tex file. As you can see it gets all its 10 point fonts directly from the font set. However it gets the 12pt fonts by scaling up the 10 pt ones. The 12pt fonts, cmr12 etc, are never used. The resolution of the 12pt fonts is therefore worse than it would be if the cmr12 fonts were used. % File LFONTS - Version of 6 May 1986 % % FONT CONVENTIONS % ten point \font\tenly = lasy10 % LaTeX symbols % twelve point \font\twlrm = cmr10 \@magscale1 % roman \font\twlmi = cmmi10 \@magscale1 % math italic (The version of LaTeX is slightly out of date.) I gather from the header to lfonts.tex that the fonts chosen are supposed to be "customized." If so, does one simply replace "cmr10 \@magscale1" by "cmr12", for example, if cmr12 is locally available? Do many sites actually customize lfonts.tex? Or are users asked to call in cmr12 (for example) themselves as appropriate? Thanks very much. Martin Gelbaum ------------------------------ Mail-From: PATASHNIK created at 5-Feb-87 06:20:07 Date: Thu 5 Feb 87 06:20:07-PST From: Oren Patashnik Subject: Re: BibTeX wish list Here are responses to Charles Karney's BibTeX suggestions from the last digest: > (1) Allow a whole bibliographic data base to be printed (i.e., incorporate > Eric Muller's changes). The demand for this has been so great that, barring some unforeseen problem, it will be implemented. > (2) Allow multiple bibliography style files (as in \bibliographystyle > {foo,bar}). This would be useful in two cases: > (a) You have a large file of journal abbreviations, which you don't want > to include in every other BST file. The proper way to do this (or at least the way that currently works) is to make each abbreviation an @STRING command and to put these in a separate .BIB file (be sure to list this .BIB file first, before the database files). > (b) You need to generate a style which is only slightly different from > some other file. You should be able to load in some redefinitions as > a separate file. (This is similar to the optional arguments to > \documentstyle.) It's enough extra work to implement this, and it's easy enough to simply edit an existing .bst file (but change its name if it's one of the four standard styles), that the current system will probably stay. > (3) Allow some subsets of the data base to be printed. The immediate > application would be the production of the bibliographies of individuals. > In this case you need to select all papers authored, co-authored, or edited > by the individual. One way this might be accomplished is to define a new > selection key which could take a list of values. Then in the TeX file > \bibselect{Smith,Jones} would select all papers with either Smith or Jones > in its selection key. (This could of course get even more complicated by > allowing ORs, ANDs and NOTs on the selection keys.) Assuming the change in (1) above occurs, you'll be able to write your own .bst files to do this. Doing this in a .bst file, rather than hardwiring it into BibTeX, seems the right way to go on this. --Oren Patashnik ------------------------------ Date: Thu, 5 Feb 87 08:54:09 pst From: lamport@decwrl.DEC.COM (Leslie Lamport) To: texhax@score.stanford.edu Subject: Responses To LaTeX questions/complaints Responses To LaTeX questions/complaints Subject: LaTeX Gotcha! From: Dan Grim We have a user who [typed] ... \documentstyle [10pt]{article} This makes lots of sense but results in an error ... This can be permitted by adding the following command to the article document-style file: \@namedef{ds@10pt}{\relax} To me, it doesn't seem worth the space cost of another macro definition. From: Reid Rowlett Subject: LaTeX double spacing macro ... Reid Rowlett ROWLETT@RESTON.UNISYS.CS.NET Unisys Corporation Reston Technology Center Reston, Virginia ------------------------------ From: Jean-Francois Lamy Subject: Topics from Issue 06 a) I have assembled from pieces from MIT, Stanford and elsewhere a doublespace environment ... Jean-Francois Lamy CSNet: lamy@ai.toronto.edu AI Group, Dept of Computer Science ARPA: lamy%ai.toronto.edu@relay.cs.net University of Toronto EAN: lamy@ai.toronto.cdn Toronto, ON, Canada UUCP: lamy@utai.uucp M5S 1A4 BITNET: lamy@ai.utoronto The only good reason I know of for double-spacing text is to provide output for a copy editor. Simply redefining \baselinestretch to 2 in the preamble works fine for this. People who know nothing about document design should leave the design of their document to people who do, such as the designers of the standard LaTeX styles. I'm aware that universities have requirements for spacing and margins of dissertations that are designed for typewriters and produce abysmal results when applied to typeset documents. It's about time that computer science departments insisted that their universities enter the 1970s and permit typeset dissertations. (Just because the French literature department may still be using 19th or early 20th century technology doesn't mean that the rest of the university must also.) I will be glad to do anything I can to support LaTeX users in their battles with their university bureaucracy. However, it's their faculty that has to be willing to fight for them. For users who must conform to these archaic requirements, my suggestion is to generate an official version for the university and another version, with the standard document styles, for people to read. (I recommend that the official version be formatted with `\tt \raggedright' declarations.) Users are doing their readers a disservice by making them read a version formatted for a typewriter. From: Kamal Al-Yahya Subject: \nopagebreak For some reason we need a centered heading that can take arbitrary number of line as its argument. We made a macro \mhead to be used like this \mhead{ first line \\ second line \\ ......... } The macro was defined in terms of the center environment, like this: \newenvironment{Mhead}{\begin{center}}{\end{center}} \def\mhead#1{ \begin{Mhead}\nopagebreak \vbox{\vskip.3in\bf #1}\nopagebreak \end{Mhead}\nopagebreak} This has a problem, though. Despite the \nopagebreak, it was very common to have the heading come at the bottom of the page. Does anybody have a way to prevent the page break, or a better idea for the macro? Section headings are tricky, and macros that approximate what a heading macro should do are going to cause problems. The best way to modify a document style is by modifying the commands defined in the document- style files. Looking in these files will show that section headings are defined using a macro named something like \@startsection. It's a hairy macro, but it should be easy to figure out where the actual heading is being typeset and make the appropriate changes at that point. From: Reply-To: X854%DDAGSI3.BITNET@forsythe.stanford.edu Subject: question one figure per page with LATEX Michael Dahlinger 0049-6151-16-3016 Institut fuer Kernphysik Schlossgartenstr.9 D-6100 Darmstadt Germany I have a problem with LATEX. I want to produce an outputpage containing NOTHING, but place for one figure plus its caption, aligned to the bottom of the page. I tried this (among several other possibilities): % \begin{figure}[p] \vspace{10\fill} \caption[Elektronik-Laufplan]{Elektronik-Laufplan.... % 10 LINES MORE CAPTION ....} \label{fig:elec} \end{figure} Please reply to: Michael Dahlinger X854@DDAGSI3.BITNET This is a typical misunderstanding about rubber length. A rubber length expands as far as needed to fill its current box--in this case, the box containing the figure. Since the height of that box is equal to the natural height of the material in it, vertical rubber space has no effect. One can do something like: \begin{figure}[p] \vbox to \textheight{\vspace{\fill} \caption{...}} \end{figure} An easier approach might be to change the document-style parameters that control the positioning of figures on a float page. See the parameters \@fptop and \@fpbot. Leslie Lamport ------------------------------ Date: Thu, 5 Feb 87 09:57 MDT From: Subject: double spacing, 10pt option, and full page figure To: TEXHAX@SU-SCORE.ARPA In reply to Dan Grim: 10pt option in LaTeX I have the same problem with clever users that follow my suggestions. A simple fix to article is to add a \@namedef for 10pt like there is for 11pt and 12pt. I have reproduced the first few lines of the Article style below with the change. % ARTICLE DOCUMENT STYLE -- version 0.93 - released 10 February 1985 % for LaTeX version 2.08 % Copyright (C) 1985 by Leslie Lamport \typeout{Document Style 'article'. Version 0.93 - released 10 February 1985} % The type size option is handled by reading a different file for each % size, as follows: % 10pt : ART10, 11pt : ART11, 12pt : ART12 % Implemented by \def'ing \@ptsize to last digit of file name. % \def\@ptsize{0} % Default is ART10.STY \@namedef{ds@10pt}{\def\@ptsize{0}} % 10pt option reads in ART10.STY \@namedef{ds@11pt}{\def\@ptsize{1}} % 11pt option reads in ART11.STY \@namedef{ds@12pt}{\def\@ptsize{2}} % 12pt option reads in ART12.STY %%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%% Ben Pashkoff requested a way to get double spacing in LaTeX: I followed the suggestion in the LaTeX book under \baselinestretch (page 155) that you can produce double-spaced documents, but they will be ugly and hard to read. So though not a competent typographic designer I looked at the definition of the font sizes in the option files like ART11.STY and changed the arguments to the \@setsize command. This is setting the \baselinestretch for the font. Since I wanted to switch back and forth between double and single I defined a new font \doublesize by coping the \@normalsize definition and changing the \@setsize to not quite twice the \@normalsize spacing. To make this new font be the default for the document you need to change the begin document command to use \doublesize in place of \@normalsize. I just copied the definition from the LaTex.sty file and put it into the document style file. NOTE: This will give you single spaced footnotes, figure captions, etc. %%%%% %%%%%%%% to be put in the option style file (ie. ART11.STY) %%%%% \def\doublesize{\@setsize\doublesize{26.5pt}\xipt\@xipt \abovedisplayskip 11pt plus3pt minus6pt\belowdisplayskip \abovedisplayskip \abovedisplayshortskip \z@ plus3pt\belowdisplayshortskip 6.5pt plus3.5pt minus3pt} %%%%% %%%%%%%% to be put in the main style file (ie. ARTICLE.STY) %%%%% \def\document{\endgroup \@colht\textheight \@colroom\textheight \vsize\textheight \columnwidth\textwidth \@clubpenalty\clubpenalty \if@twocolumn \advance\columnwidth -\columnsep \divide\columnwidth\tw@ \hsize\columnwidth \@firstcolumntrue \fi \hsize\columnwidth \linewidth\hsize \begingroup\@floatplacement\@dblfloatplacement \makeatletter\let\@writefile\@gobbletwo \@input{\jobname.aux}\endgroup \if@filesw \immediate\openout\@mainaux=\jobname.aux \immediate\write\@mainaux{\relax}\fi \def\do##1{\let ##1\@notprerr} \@preamblecmds \let\do\noexpand \doublesize\everypar{}} %%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%% Michael Dahlinger wanted to have a full page figure with the caption aligned at the bottom of the page. Well I have a facingpage figure that you should be able to modify to do what you want. The arguments for my macro are just passed on to caption so you would use it like: \facingpage[short caption for TOC]{long caption for figure}. I make this work for you remove the first \begin{figure}...\end{figure}, and the second \vspace{0.5\facingfill}, finaly take out the 0.5 in the remaining \vspace{0.5\facingfill}. You should change all occurrences of facing to something like full. %%%%% %%%%%%%% to be put in the main style file (ie. ARTICLE.STY) %%%%% \def\setheight#1#2{\setbox\@tempboxa\vbox{#2}#1\ht\@tempboxa} \newlength{\facingheight} \newlength{\facingfill} \setlength{\facingfill}{\textheight} \def\facingpage#1#2{\relax \setheight{\facingheight}{#2} \advance \facingfill by -1\facingheight \begin{figure}\vspace{\textheight}\end{figure}\par\relax \begin{figure} \vspace{0.5\facingfill} \caption[#1]{#2} \vspace{0.5\facingfill} \end{figure} \par\relax} I hope these help someone out there. Michael E. Van Steenberg BITNET ==> MVS@JILA.BITNET SPAN ==> TAURUS::MEV ------------------------------ Date: Thu, 5 Feb 1987 13:22:52 EST From: "F. James Rohlf" Subject: drafthd.sty To: "S. D. Page" I am having problems with your drafthd.sty file that I received from the LaTeX style directory. It does not try to print "draft" on page 1. On all documents of more than one page it "bombs". TeX complains that a number is missing. Perhaps something was lost on its way through the networks. Could you send me an original copy directly? Thanks ------------------------------ Date: Thu, 05 Feb 87 13:25:50 EST From: "F. James Rohlf" Subject: layout.sty To: Malcom Brown I can't get this file to work. Many lines extend off the page at the right and there are a lot of capital Greek pi's printed. Have there been any other complaints? ------------------------------ Date: Fri, 6 Feb 87 09:41:53 PST From: cel@CitHex.Caltech.Edu (Chuck Lane) Subject: MF bugs & fixes (VAX/VMS specific) To: texhax@su-score.arpa There is a problem with Metafont that I ran into here. % \def\here{VAX/VMS V4.5} When one exits (X) from an error menu, Pascal complains about a "Non-Local-GOTO" and dies with an access violation and a stack dump. In fact, any call to JUMPOUT does this. It turns out that this is a rather subtle problem: Pascal sets up a pointer to the original stack frame, and the GOTO code uses this pointer to set up a condition handler which then gets invoked to unwind the stack and do the GOTO. The fun comes when the filenames used get longer than file_name_size and clobber the pointer. A little longer, and maybe it would hit the $CODE section and die with an obvious error, a little shorter and everything would work okay. Tricky. MF mostly does it's own bounds checking, and the standard is to turn off the built-in checking, but filenames returned by the system aren't checked and certainly should be. Here's the changes I applied to the VMS change file: -----------------------------cut here-------------------- Modifications to VMS Metafont C. Lane (cel@cithex) 23 Dec 86 funny global GOTO problem caused by user_reset overwriting a Pascal call frame pointer for the GOTO condition handler (Ugh). The following sets the file_name_size larger so that it shouldn't be a problem anymore. @x @!file_name_size=40; {file names shouldn't be longer than this} @!pool_name='MFbases:MF.POOL '; @y @!file_name_size=60; {file names shouldn't be longer than this} @\ @!pool_name='MF$bases:MF.POO '; @z add testing for filename length overflow, make it a fatal error @x @d reset_OK(#)==erstat(#)=0 @d rewrite_OK(#)==erstat(#)=0 @p function a_open_in(var @!f:alpha_file):boolean; @y @p function user_reset (var FAB:VAX_FAB_type; var RAB:VAX_RAB_type; var F:unsafe_file):integer; var status:integer; NAM:NAM_ptr; p:chrptr; i:integer; begin last_length:=0; status:=VAX_open(FAB); if odd(status) then status:=VAX_connect(RAB); if odd(status) then begin NAM:=FAB.VAX_FAB_L_NAM::NAM_ptr; if NAM<>nil then last_length:=NAM^.VAX_NAM_B_RSL; if last_length > file_name_size then fatal_error("File name too long"); for i:=1 to last_length do begin p:=(NAM^.VAX_NAM_L_RSA::integer+i-1)::chrptr; last_name[i]:=p^; end; end; user_reset:=status; end; @# function user_rewrite (var FAB:VAX_FAB_type; var RAB:VAX_RAB_type; var F:unsafe_file):integer; var status:integer; NAM:NAM_ptr; p:chrptr; i:integer; begin status:=VAX_create(FAB); if odd(status) then status:=VAX_connect(RAB); if odd(status) then begin NAM:=FAB.VAX_FAB_L_NAM::NAM_ptr; if NAM<>nil then last_length:=NAM^.VAX_NAM_B_RSL; if last_length > file_name_size then fatal_error("File name too long"); for i:=1 to last_length do begin p:=(NAM^.VAX_NAM_L_RSA::integer+i-1)::chrptr; last_name[i]:=p^; end; end; user_rewrite:=status; end; @# function a_open_in(var @!f:alpha_file):boolean; @z ---------------------------end cut-------------------------------------- This does add another string to MF's pool, so you have to redux INIMF and the formats, which is kind of a pain. I looked for a pre-existing string in the pool that would suffice for the error message, but there didn't seem to be one. The limit above of 60 chars is somewhat arbitrary. Tangle complains when the line with the MF.POO string gets too long. VMS file names are limited to some length like 84 characters, and I suppose that there should be some way to get the system to hold onto filename for you so that you don't run into bounds-checking problems... I've been holding off on posting this because there appears to be another VMS specific bug, this time in the Pascal compiler. Now, I'm not sure that our Pascal compiler is up to snuff (it's V3.3-92, if it's any help) but this is a frightening bug: in the procedure DUALMOVES, the compiler decides to use the space occupied by the SMOOTHBOT variable on the heap for doing it's own scratch computations (making up procedure calls, etc). The result is a completely screwed up value, and you can only find it by digging in the assembly listing! Here's the "fix", such as it is: -------------------------cut here------------------------------- @x @!w,@!ww:pointer; {pointers to the current offset and its neighbor} @!smooth_bot,@!smooth_top:0..move_size; {boundaries of smoothing} @!xx,@!yy,@!xp,@!yp,@!delx,@!dely,@!tx,@!ty:scaled; {registers for coordinate calculations} @y @!w,@!ww:pointer; {pointers to the current offset and its neighbor} @!smooth_bot,@!smooth_top:[static] 0..move_size; {boundaries of smoothing} @!xx,@!yy,@!xp,@!yp,@!delx,@!dely,@!tx,@!ty:scaled; {registers for coordinate calculations} @z ----------------------------end cut----------------------------------- yep, I make SMOOTHBOT and SMOOTHTOP static, and so take them off the heap. The frightening thing is that this could be happening elsewhere in TeX and MF, and there'd be no way to tell until it messes up. On the other hand, once the fix above was put in, MF seems to work just as it's supposed to. Since the bug appeared when trying the simple excercises on p. 31 of the METAFONTbook, you should know rather quickly if you have such a brain-damaged compiler. DEC will eventually get a complaint about this....but the fact that tiny changes in the procedure causes the problem to dissappear makes it difficult to isolate it well enough to complain about. So it goes. I'd be happy to send the complete MF.CH file to anyone who wants it, realizing that the @x@y@z sections above may be a bit confusing. (or maybe a bit confused....) --Chuck Lane cel@cithex.hepnet cithex.caltech.edu cithex.bitnet "The price of freedom (from bugs) is eternal vigilance" -- Unknown Programmer ------------------------------ % %\bye % End of TeXhax Digest ************************** -------