TeXhax Digest Friday, September 11, 1987 Volume 87 : Issue 74 [SCORE.STANFORD.EDU]TEXHAX74.87 Editor: Malcolm Brown Today's Topics: Questions about fonts Retrieving LaTeX style files Re: Figure to right of paragraph Variant environment. Re: Retrieving LaTeX style files eqnarray environment Bug in LaTeX figure environment? Previewer for VT200 LaTeX Notes (Re: TeXhax Digest V87 #73) ---------------------------------------------------------------------- 4-Sep-87 10:36:48-PDT,1902;000000000000 Date: Fri, 4 Sep 87 13:32:37 EDT From: Charlie Martin To: TeXHaX@score.stanford.edu Subject: Questions about fonts I keep running into font problems that I can't figure out from the documentation (I guess I've got to buy the canonical 5-book set someday.) I'd appreciate any advice on the following: 1. I regularly run into a problem where fonts in unusual sizes are not available, e.g. today when someone wanted amss10.3110pxl. How can I get fonts at particular sizes when they are not part of the distribution? 2. Space for the fonts is getting a little tight here, in part because we need both 118-pixel fonts and 300-pixel fonts. We have both Imagens and Laserwriters around. 2.1 Is there a PK-form (or other compressed form) driver available for the Imagen? 2.2 While we're on the subject, how about an imagen driver that includes options to print only selected pages? The one we have does not. 3. We now have a bunch of Macs and several Mac II's available here. We are doing a lot of illustrations with them. What is the best way to include the illos and diagrams into TeX and LaTeX using either LaserWriter or Imagen? 3.1 In particular, can someone tell me about whatever special magic (or \special magic) is needed to put arbitrary PostScript stuff into the middle of a TeX file to be printed on a laserwriter? 4. Is this mailing group being mailed out any more? I no longer get them, and have not been getting them for a couple of months at least. Thanks for all responses, Charlie Martin (crm@cs.duke.edu,mcnc!duke!crm) ------------------------------ Date: Fri, 4 Sep 87 12:59:01 CDT To: From: "John Hauck" Subject: Retrieving LaTeX style files I have tried several times unsuccessfully to retrieve LaTeX style files from latex-style@rochester.arpa as per the instructions given for BITNET in TUGboat, Volume 8(1987), No. 1, page 59. I did manage to get the 00index and 00readme files back, but requests for the style files have gone unanswered. Can someone help me or shed some light on what's happening? Thanks in advance. John Hauck Systems prog./Analyst Iowa State Univ. Computation Center ------------------------------ Date: Fri, 4 Sep 1987 17:17:50 CDT From: "Thomas J. Reid" Subject: Re: Figure to right of paragraph To: TEXHAX@score.stanford.edu Ralph Becker-Szendy writes: using LaTeX, i want to have a figure right next to a text paragraph. I know how to make the text become much narrower (even using plain TeX), for as many paragraphs as needed. But how do i get the figure to go into the empty space created at the right side of the text ? And how do i prevent accidents (like page-breaking across the whole mess) ? I would like to keep the "floating" property of figures, therefore only the output routine would know which paragraphs have to be made narrower (and i never messed around with output routines before). Leslie Lamport writes: What he wants to do is infeasible in TeX. However, it is not too hard to write a macro that puts a single figure next to a particular specified paragraph. The proper approach is thus to write the document without worrying about figure placement. Then, when you're sure that it's completely finished, do the figure placement "by hand", specifying exactly where each figure is to go. The time spent trying to get a macro to do the figure placement for you would be about equal to the time needed to manually do the figure placement for about two dozen thousand-page books. Actually, the solution is not difficult; I encountered a similar situation in a document that I wrote using plain \TeX. What I did was to put the figure in a box, then at each paragraph break within the vicinity of the figure, I tested for the following: (1) If the figure has not yet ``started,'' is there enough space on the page to start it? If so, ``start'' it and set the hanging indent. If not, do nothing. (2) If the figure has been ``started,'' redefine the hanging ident (since paragraph breaks turn it off. (3) If the position on the page is below the bottom of the figure (that is, if the figure is finished), do nothing. The only real problem here is answering the question ``is there enough space on the page to start it?'' This of course requires assistance from the output routine. So, first the modified output routine (again, this applies to plain \TeX\). Run \TeX\ on the rest of this note for a demo. Seed values of 13, 42, 88 and 99 each demonstrate some of the features of these macros. \output={\cscout} \newif\ifoutput \newtoks\outputpretest \catcode`@=11 \def\cscout{\the\outputpretest \ifoutput \shipout\vbox{\makeheadline\pagebody\makefootline} \advancepageno \ifnum\outputpenalty>-\@MM \else\dosupereject\fi \fi} \catcode`@=12 \outputpretest={\outputtrue} % These changes make the output routine call ``outputpretest'' first which % sets ``outputtrue'' or ``outputfalse'' to control whether or not a page % is actually shipped out. The default ``outputpretest'' sets ``outputtrue'' % to cause the output routine to behave in its normal manner. % Now, the text that leads up to where the figure begins. Since we don't % have any real text, we'll just make some up. (AI experts are invited to % improve this code.) \newcount\rndnum \newcount\rndval \newcount\rndtemp \message{Give me a number from 0 to 99:} \read-1 to\mynum \rndnum=\mynum \ifnum\rndnum>99 \rndnum=99 \fi% for bimbos The seed used for this run is \number\mynum. \def\rnd{\global\multiply\rndnum by 373 \global\advance\rndnum by 11 \ifnum\rndnum>99999 \rndtemp=\rndnum \divide\rndtemp by 100000 \multiply\rndtemp by 100000 \global\advance\rndnum by -\rndtemp\fi \global\rndval=\rndnum \global\divide\rndval by 1000 \relax} \newcount\ns \newcount\nw \newcount\nc \newcount\np \newcount\ASCII \def\randompar{\rnd \ns=\rndval \divide\ns by 10\advance\ns by 3 \loop \ifnum\ns>0 {\randomsent}.\advance\ns by -1 \repeat} \def\randomsent{\rnd \nw=\rndval \divide\nw by 7 \advance\nw by 5 \ASCII="41 \loop \ifnum\nw>0 { \randomword}\advance\nw by -1 \repeat} \def\randomword{\rnd \nc=\rndval \divide\nc by 15 \advance\nc by 2 \loop \ifnum\nc>0 {\randomchar}\advance\nc by -1 \repeat} \def\randomchar{\rnd \multiply\rndval by 29 \divide\rndval by 100 % 2a's 3e's \ifnum\rndval=26 \rndval=0 \fi \ifnum\rndval>26 \rndval=4 \fi \advance\rndval by \ASCII \char\rndval \global\ASCII="61} \np=\rndnum \loop \ifnum\np>0 \rnd \advance\np by -1 \repeat \rnd \ifnum\rndval>49 \parskip=6pt plus 3pt minus 2pt \parindent=0pt \fi \rnd \np=\rndval \divide\np by 20 \advance\np by 5 \def\dopar{\par} \loop \ifnum\np>0 \dopar {\randompar}\advance\np by -1 \repeat % Then, the figure is defined and placed in a box: \newdimen\unit \unit=5pt \def\point#1 #2 #3 {\rlap{\kern#1\unit\raise#2\unit\hbox{#3}}} \newbox\figbox \setbox\figbox=\vbox to 51\unit{\hbox{% \point 0 0 {\vrule height 1.5pt width 30\unit} \point 0 50 {\vrule depth 1.5pt width 30\unit} \point 0 0 {\vrule height 50\unit width 1.5pt} \point 30 0 {\kern -1.5pt\vrule height 50\unit width 1.5pt} \point 5 15 {\vrule height 2.0pt width 20\unit} \point 5 15 {\vrule height 4\unit width 2.0pt} \point 25 15 {\kern-2.0pt\vrule height 4\unit width 2.0pt} \point 7 28 {\vrule height 1.0pt width 4\unit} \point 7 35 {\vrule depth 1.0pt width 4\unit} \point 7 28 {\vrule height 7\unit width 1.0pt} \point 11 28 {\kern-1.0pt\vrule height 7\unit width 1.0pt} \point 7 28 {\vrule height 2.5\unit width 2\unit} \point 19 28 {\vrule height 1.0pt width 4\unit} \point 19 35 {\vrule depth 1.0pt width 4\unit} \point 19 28 {\vrule height 7\unit width 1.0pt} \point 23 28 {\kern-1.0pt\vrule height 7\unit width 1.0pt} \point 19 28 {\vrule height 2.5\unit width 2\unit} \hss}\vss} \wd\figbox=30\unit % Then, redefine ``outputpretest'': \newbox\pagebox \newdimen\pageht \newdimen\startpageht \newdimen\htdone \htdone=0pt \newcount\hangcount \outputpretest={\dofigtest} \def\dofigtest{\ifnum\outputpenalty=-10001 \setbox\pagebox=\vbox{\unvbox255}% \global\pageht=\ht\pagebox \outputfalse \unvbox\pagebox \else \outputtrue \fi} % This test uses a penalty value of -10001 to indicate that the current height % of box255 (the page) is to be placed in ``pageht'' but the page is not to be % done (i.e., ``outputfalse''). Now, we want the figure to start as soon after here as possible: \newif\iftryingfig \tryingfigtrue \newif\ifdoingfig \doingfigfalse \def\tryfig{\iftryingfig% \global is used in case user does any grouping \penalty-10001 \dimen0=\vsize \advance\dimen0 by -\pageht \ifdim\dimen0>\ht\figbox \vbox to 0pt{\hbox to \hsize{\kern\hsize \kern-\wd\figbox \copy\figbox \hss}\vss}% there's room left, "start" the figure \vskip-\baselineskip \global\tryingfigfalse \global\doingfigtrue \global\startpageht=\pageht \global\htdone=0pt \dohang \fi \else \ifdoingfig \penalty-10001 \global\htdone=\pageht \global\advance\htdone by -\startpageht \ifdim\htdone>0pt \ifdim\htdone<\ht\figbox \dohang \else \global\doingfigfalse \fi \else \global\doingfigfalse \fi \else \global\outputpretest={\outputtrue} \fi \fi} \def\dohang{\dimen0=\ht\figbox \advance\dimen0 by -\htdone \advance\dimen0 by 0.9\baselineskip \hangcount=\dimen0 \divide\hangcount by \baselineskip \dimen0=\wd\figbox \advance\dimen0 by 1pc \hangafter=-\hangcount \hangindent=-\dimen0} % Finally, we go back to ``writing'' our document. ``tryfig'' needs to be % called at each paragraph break until you are sure that the text has passed % the figure. \rnd \np=\rndval \divide\np by 10 \advance\np by 7 \loop \ifnum\np>0 \dopar \tryfig {\randompar}\advance\np by -1 \repeat \bye % Thomas Reid, Texas A&M University, BITnet: X066TR@TAMVM1 ------------------------------ Date: Sat 5 Sep 87 00:25:56-PDT From: Tony Li Subject: Variant environment. To: texhax@score.stanford.edu I'm trying to figure out how to set up a variant environment. Such an environment would either include or exclude a possibly substantial amount of text. Does anyone have a good way of doing this? I'd like to do something like: \newif\ifvara \def\astuff{\ifvara} \def\endastuff{\fi} and it would be used like \varatrue % or \varafalse \begin{astuff} Lots and lots of text... \end{astuff} The size of the included text makes the use of an \if almost mandatory. Any suggestions? ;-) Thanks in advance, Tony ------------------------------ To: texhax@score.stanford.edu Subject: Re: Retrieving LaTeX style files Date: Sat, 05 Sep 87 05:41:19 -0400 From: Ken Yap > I have tried several times unsuccessfully to retrieve LaTeX style files >from latex-style@rochester.arpa as per the instructions given for BITNET in >TUGboat, Volume 8(1987), No. 1, page 59. I did manage to get the 00index >and 00readme files back, but requests for the style files have gone unanswered. >Can someone help me or shed some light on what's happening? > Thanks in advance. > John Hauck > Systems prog./Analyst > Iowa State Univ. Computation Center Check that your input format is indeed correct. The server, being a stupid program, is very picky. Errors I have seen include: + Forgetting the @ signs where they are needed + Asking for non-existent files (you just don't get them, that's all) + Asking for files by wildcard (no such capability in the server) + Putting an extra hyphen in "@file request" + Not putting the "@file request" in the Subject: header + Forgetting the return address + Giving an impossible return address The last used to irritate me a lot as I got the bounced mail. Finally I made the server send messages as a pseudo account that junks all returned error notices. C'est la vie. How do I know about these errors, you ask? The server dumps anything it doesn't understand into my mailbox. Unless it is a human message which was missent to the server, I junk such messages on the principle that if I were to manually correct every mistaken request, I would be at it forever. Occasionally, mail will be lost through gateways, especially WISCVM. There is nothing I can do about this. If you still have no success, send me a copy of what you are trying to tell the server. Ken ------------------------------ Date: Sat, 5 Sep 87 13:37 PDT From: "Don Hosek, Editor, TeXMaG" To: helmut@hnympi51.bitnet, TeXhax@score.stanford.edu X-Vms-To: IN%"helmut@hnympi51", IN%"TeXhax@Score.Stanford.EDU" Here's a possible solution to your problem: $$\vcenter{ \valign{#\vss\cr \noalign{\hfil}% \halign{&# \hss\cr Das&is&nicht&guht.\cr %pardon my German This&is¬&good.\cr}\cr \noalign{\hfil}% \llap{Example 1.}\cr } }$$ I haven't actually tested this, so I don't know how well \bye ------------------------------ Date: Fri, 4 Sep 87 15:42:48 cdt From: yvo@im4u.utexas.edu (Yvonne Van Olphen) Posted-Date: Fri, 4 Sep 87 15:42:48 cdt To: texhax@score.stanford.edu Subject: eqnarray environment Here is an excerpt from the manuscript I am typing using LaTeX: -----begin----- \section{Nonzero Temperature at the Endpoints} We now pose the boundary value problem \setcounter{equation}{9} \begin{eqnarray} u_t = ku_{xx} & \mbox{in $D$} \\ u(0,t) = T_1 & t \geq 0 \\ u(a,t)=T_2 & t \geq 0 \\ u(x,0)=f(x) & 0 \leq x \leq a \end{eqnarray} where $T_1$ and $T_2$ are nonnegative constants and $f$ is a continuous nonnegative function with a piecewise continuous derivative and such that $f(0) = T_1$ and $f(a) = T_2$. The new endpoint conditions (11) and (12) are not linear, that is, the sum of two solutions that satisfy (11) and (12) does not satisfy (11) and (12), and this problem cannot be solved by just using the principle of superposition of solutions. -----end----- The problem I have is regarding the eqnarray. I want those two columns to be left justified, rather than the first one being right justified and the second one being centered. I don't know why the author wants the columns left-justified---I'm a typist, not a mathematician. I don't really understand the purpose of having the column justification fixed in eqnarray, unlike array, where you can specify it {lcr}. Additionally, I don't understand why the middle column is typeset in textstyle (according to the manual). If anyone would like to take on the difficult job of enlightening me, I'd be very appreciative. Please do not bother to reply if you're going to chastise me for "bad typesetting"--- it's not my choice to make (it's not my manuscript!). If there is some other way to have numbered equations in that format (two left-justified columns), I'd like to hear about it! <\>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\ | | Yvonne Van Olphen _|___|_ University of Texas at Austin CS Dept. \_|_/ {seismo,harvard,gatech}!ut-sally!im4u!yvo | yvo@im4u.UUCP ******* yvo@im4u.utexas.edu ------------------------------ Date: Sun, 6 Sep 87 09:31 EDT From: Subject: Bug in LaTeX figure environment? To: texhax@score.stanford.edu In Volume 87, issue 9 of the TeXhax Digest (Feb. 10, 1987), Leslie Lamport made a suggestion for producing full page figures. His idea involved using a \vbox to move the caption to the bottom of the page. This technique for producing full page figures can lead to some unexpected results. Consider the following example. ------------------------------ \documentstyle{article} \begin{document} \section{Introduction} \section{Finite Strain Measurements} \subsection{The Samples} See figure (Fig.c\ref{fig:50}). \begin{figure}[p] \vbox to \textheight{\vspace{\fill} \caption[Caption for figure 1]{Caption for figure 1 }} %\vspace{5in} %\caption[Caption for figure ]{Caption for figure 1} \label{fig:50} \end{figure} \end{document} ------------------------------ This example will generate "See figure Fig. 2.1" (i.e. it uses the current section number) instead of "See figure Fig. 1". If I use the two commented lines to move the caption to the bottom of the page, LaTeX will correctly generate a reference to figure 1. I can also correct the problem by moving the \label into the \caption command. Is this a bug or a "feature"? The LaTeX manual seems to indicate that this should work. Rick Zaccone zaccone@bknlvms.bitnet Bucknell University ------------------------------ Date: Sun, 6 Sep 87 17:17 CDT From: Subject: Previewer for VT200 To: texhax@score.stanford.edu I know this has been asked 186,282 times before, but I am eatting up my funding just in printer costs. Does anyone out there have a screen previewer for a DEC VT220 or VT240 terminal. I haven't had any luck locally, so maybe TeX-HaX can help me. Please respond to me @ RJB6487@TAMSTAR.BITNET. Thank you. Rich Babowicz Agricultural Engineering Dept. Texas A&M University ------------------------------ Date: Sun, 6 Sep 87 16:16:27 pdt From: lamport@src.DEC.COM (Leslie Lamport) To: TeXhax@Score.Stanford.edu Subject: LaTeX Notes (Re: TeXhax Digest V87 #73) Atul Kacker writes I am trying to use \vfill within the LaTeX table environment without much success. What I want to be able to do is to move the caption down to the bottom of the page using the rubber length \vfill. LaTeX seems to ignore the \vfill command. Am I missing something ? Is there another way of doing the same thing ? The table environment produces a box whose height is determined by its conents. A \vfill in that environment does nothing for precisely the same reason that the \hfill in \mbox{a\hfill b} does nothing. To put the `a' at the left margin and the `b' at the right, you would need to write \makebox[\textwidth]{a\hfill b}. LaTeX doesn't provide a command for specifying the vertical height of a box (the way \makebox's optional argument specifies its width). So, you can either use TeX's \vbox command or fake it by using a strut combined with a minipage environment. (This seems to require knowing the height of the caption.) Leslie Lamport ------------------------------ %%% %%% 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 ************************** -------