TeXhax Digest Friday, February 17, 1989 Volume 89 : Issue 14 Moderators: Tiina Modisett and Pierre MacKay %%% The TeXhax digest is brought to you as a service of the TeX Users Group %%% %%% in cooperation with the UnixTeX distribution service at the %%% %%% University of Washington %%% Today's Topics: Mac <-> LaTeX? Re: TeXhax Digest V89 #7 Needed: CWEB How can I get TeX? Where is C-TeX or TeX-to-C? Needed: IBM 3812 DVI driver for the IBM PC Problem with \underline LaTeX footnotes--numbering on each page Re: Refer functionality for BibTeX Re: Graphics in TeX ------------------------------------------------------------------------------- Date: Tue, 14 Feb 89 11:02:07 WET From: Flash Sheridan Reply-To: flash <@NSS.Cs.Ucl.AC.UK:flash@cs.qmc.ac.uk> Subject: Mac <-> LaTeX? Re: TeXhax Digest V89 #7 Keywords: Mac, LaTex Sorry if this is one of the frequently asked questions, but is there a way to convert _any_ Macintosh format [_with special fonts] to and from LaTeX? I've got a Common Lisp function from the net to do LaTeX to RTF, but it doesn't know about Mac fonts, and doesn't go the other way. From: flash@cs.qmc.ac.uk (Flash Sheridan) ------------------------------------------------------------------------------- Date: Sun, 12 Feb 89 09:50:29 pst From: Sridhar Ramakrishnan Subject: Needed: CWEB Keywords: CWEB Sir: I am looking for an implementation of WEB for the C language. I am primarily interested in the sources, since I am exploring some of my research ideas and need to play with the source. The alternative of entering the code by hand from the tech. report by Knuth [1983] is tedious but possible. Please send any responses to "sridhar%hpclove@hplabs.hp.com" Thanks. Sridhar -------------------------------------------------------------------------- Date: Fri, 10 Feb 89 10:16 CST From: ABONAMAH@OSHKOSH.WISC.EDU Subject: How can I get TeX? Keywords: TeX, information I am a new fan of TeX, I have been reading Knuth's book and would like to get a copy to run on VMS with HP laser jet II+. Can you tell me how to get a copy of TeX and a device driver for the HP laser. Dr. A. Abonamah E-mail: abonamah@oshkosh.wisc.edu ------------------------------------------------------------------------------ Date: Thu, 17 Nov 88 10:22:52 PST From: brucker@ee.UCLA.EDU (Jim Brucker) Subject: Where is C-TeX or TeX-to-C? Keywords: C-TeX, TeX-to-C Do you know where the source for C-TeX or TeX-to-C is kept? Thank you, thanks, jim brucker UCLA Electrical Engineering Dept, 6731 Boelter hall, UCLA, LA, CA 90024 ARPAnet: brucker@ee.ucla.edu; tele: 213-206-3658 -------------------------------------------------------------------------- Date: 10-FEB-1989 11:24:31 From: TEX%rmcs.cranfield.ac.uk@NSS.Cs.Ucl.AC.UK Subject: Needed: IBM 3812 DVI driver for the IBM PC Keywords: IBM 3812, dviware I'm about to be given a "spare" IBM 3812 Pageprinter to replace an Epson FX-1000 on the office IBM PC system. As usual the 3812 will come with no documentation, so I don't know much about it! I've seen back issues of TeXhax (1988, #5, 21, 30 & 37) referring to METAFONT mode_def settings for the 3812, so it must be feasible to use it as a TeX output device. Can anybody tell me whether there is an IBM PC based DVI driver for the 3812? I'd be willing to look at 3812 drivers designed for other systems to see if I can graft the font downloading parts onto the Beebe DVI driver set. All responses /advice will be gratefully received ! C. Niel KEMPSON | Slow (but reliable) Mail: | Telephone: Swindon (0793) 785687 | | School of Elec Eng & Science, | International: +44-793-785687 | | Royal Military College of Science,| | | Shrivenham, SWINDON, | E-mail | | SN6 8LA, | JANET: tex@uk.ac.cranfield.rmcs | | United Kingdom | | ------------------------------------------------------------------------------ Date: Thu, 9 Feb 89 20:49:13 EST From: jin@caen.engin.umich.edu (jin ji) Subject: Problem with \underline Keywords: \underline, TeX The problem with p option in tabular (V89 #1) and its solution (V89 #7) remind me the similar problem with \underline. If you put the following on the same line, you can see how ugly it looks. \underline{This is a test.} \underline{This is a good test.} I tried to change 'endpbox' in V89 #7 to 'endmbox' but it did not work. Please help. Thanks, Jin Ji jin@caen.engin.umich.edu ----------------------------------------------------------------------------- Date: Tue, 14 Feb 89 14:30:51 est From: Brian T. Schellenberger Subject: LaTeX footnotes--numbering on each page Keywords: LaTeX, footnotes As Leslie mentioned in the latest issue (sorry, I forgot the number), getting footnotes to renumber on each page is nontrivial; you have to write stuff out to the aux file in order to correct anomolies on the second pass. However, I have done it, so I'm sending it along . . . enjoy, those of you who (like me) want totally traditional book footnotes. Note that on the first pass, this gets as close as possible (does what Leslie suggested in his TeXhax item, which is also in the comments in latex.doc). Even those who couldn't care less about footnotes might like the definitions environment defined at the beginning; it lets you do "programming" in LaTeX like in most programming languages: Space is only for the convenience of the programmer. It lets you space things so that they look nice and you no longer need lots of ugly percent signs at the ends of lines . . . I would be interested in other people's reactions to this (especially Leslie's), and also whether they might want to see some of my other LaTeX stuff; in particular, I have an emphasize command that automatically inserts an italic correction if needed, and an "newlogo" command that creates a command that puts in space if desired; these allow you to turn this: \LaTeX\ forces you to put in {\em italic\/} corrections. ^ ^^ into this: \latex forces you to put in \E{italic} corrections. I also have code environments that let an aribtrary character be used for escape and other things. I have meaning to write them up in TUGBoat for some time, but I might as well admit I won't. Qs: 1. Are relatively undocumented postings of these in TUGBoat useful? 2. Would anybody be willing to help me document them for a TUGBoat article or other distribution to make them more widely available? * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * I happened to call this file "pagefoots.sty" . . . % A footnote-numbering style from Brian T. Schellenberger. v1.0. % This is redistributable by anybody to anybody for any price. % I only ask that you credit me for it, and that if you make any % changes and distribute them to anybody else at all, you (1) send % them back to me, and (2) note who made them so that any different % versions of this floating around may be distinguished. % The first think here is my begin definitions environment. It is % an environment for programming, and is seperate from the footnote- % related stuff. I find it convenient, and it is needed for my other % code to work. I also use symbolic names for all catcodes in my % programming, but I've gotten that out of this code for greater ease % of use by the great wide world out there. % The footnote code itself. % 1. This code resets foot notes on each page. It needs two passes % to do this correctly, although it comes as close as possible on % the first pass. You generally make two passes with LaTeX anyway, % to get cross-references right, so this shouldn't be a problem. % It uses the aux file like everything else. % 2. It also uses the \fnsymbol to "number" the footnotes. This is % controlled by the first line of \newfoots. % 3. It gets rid of the usual footnote rule, and inserts more vertical % space for footnotes. This is also easy to see/control in the % \newfoots command. % 4. Most of this code simply makes the "new" footnotes stuff available; % you can include all of this except the last line in a style file % and only say \newfoots if you want them, or you include it all % and say \restorefoots for the files where you don't want it. % 5. \restorefoots and/or \newfoots are only guarenteed to work right % in the preamble. % 6. I don't think I depend on anything funny in LaTeX, but in case % this falls apart totally, I am running the 29-Apr-87 LaTeX. %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %----definitions: within \begin{definitions} (which does not really define % a group), spacing means nothing. Use \space for a space character % and \par for a blank line, for those rare instances where they are % really desired. Also, @ is seen as a letter. All these are reversed % and \end{definitions}---\E{even if} they had the same catagories before! % These should not be nested but, unfortunately, there is no way to tell. \newif\ifatletter \newenvironment {definitions} { \endgroup % doesn't really nest \ifcat @a \atlettertrue \else \atletterfalse \fi % \catcode`\ =\ignoreC \catcode`\^^M=\ignoreC \makeatletter \catcode`\ =9 \catcode`\^^M=9 }% { % \catcode`\ =\spaceC \catcode`\^^M=\nlC \makeatother \catcode`\ =10 \catcode`\^^M=5 \ifatletter \makeatletter \fi \def \@currenvir {definitions} \begingroup % doesn't really nest } %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \begin{definitions} %-----\my@footnote: stuff for handling my footnote stuff % NOTE: This corrects it on the second pass, based on the page numbers % on the first pass. Both this and other cross-reference stuff % will need to be run TWICE again if tables of contents, lists of % figures, &c. are paginated with the main material. \def \my@footnote { \if@minipage\else % In a minipage, we can't cross a page. \edef \tmp@name {ft@\thepage-\the\c@footnote} \expandafter\expandafter\expandafter\ifx \expandafter\csname\tmp@name\endcsname \relax \else % DEFINED: replace footnote marker \edef\tmp@b{\expandafter\csname\tmp@name\endcsname} \begingroup \c@footnote = \tmp@b \xdef \@thefnmark {\thefootnote} \endgroup \fi % end \ifx ... \else DEFINED \if@filesw \edef \fttmp@ { \write\@auxout { \string\newfoot@mark{\thepage} {\the\c@footnote}{\noexpand\thepage} } } \fttmp@ \fi % end \if@filesw \fi % end \if@minipage } % \newfoot@mark: % #1: nominal page it occurs on, as by \thepage. % #2: nominal footnote number on that page. % #3: actual page it occurs on, as by \thepage. \newcount\ft@page \ft@page = 0 \newcount\ft@foot \ft@foot = 0 \def \newfoot@mark #1#2#3 { \ifdigit{#3} \ifnum #3 < \ft@page \ft@page=0 \else\ifnum #3 > \ft@page \ft@page=#3 \ft@foot=0 \fi\fi \else \ft@page=0 \fi \addtolength\ft@foot{1} \def\tmp@a{#2} \edef\tmp@b{\the\ft@foot} \ifx \tmp@a\tmp@b \else \expandafter \xdef \csname ft@#1-#2\endcsname {\the\ft@foot} \fi } \newif\ifisdigit \def \ifdigit #1 {\digithelp #1 \digithelpend} \def \digithelp#1#2\digithelpend { \isdigitfalse \if0#1\isdigittrue\fi \if1#1\isdigittrue\fi \if2#1\isdigittrue\fi \if3#1\isdigittrue\fi \if4#1\isdigittrue\fi \if5#1\isdigittrue\fi \if4#1\isdigittrue\fi \if5#1\isdigittrue\fi \if6#1\isdigittrue\fi \if7#1\isdigittrue\fi \if8#1\isdigittrue\fi \if9#1\isdigittrue\fi \ifisdigit } \def \newfoots { \renewcommand \thefootnote {\fnsymbol{footnote}} %only if you want! \renewcommand \thempfootnote {\arabic{footnote}} \renewcommand \footnoterule {} \skip\footins = 16pt plus 6pt minus 4pt \@addtoreset{footnote}{page} \let \cur@footnote = \my@footnote } % NOTE: \restorefoots MUST be called before anything else is added to % \cl@page => do NOT move the \@@cl@page into the .static. file, % and do it at the very end of mytex.sty. Also, if \stdfoots % are desired, they should be the first thing restored---and % \E{definately} in the preamble. \def \restorefoots { \renewcommand \thefootnote {\arabic{footnote}} \renewcommand \thempfootnote {\alph{mpfootnote}} \let \footnoterule = \@@footnoterule \skip\footins = \bigskipamount \let \cl@page = \@@cl@page \let \cur@footnote = \relax } \def \footnote { \@ifnextchar [ {\@xfootnote} %else, no optional argument: { \stepcounter{\@mpfn} \xdef\@thefnmark{\thempfn} \cur@footnote \@footnotemark\@footnotetext } } \end{definitions} \newfoots * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Brian T. Schellenberger . . . Brian, the Man from Babble-on. ...!mcnc!rti!sas!bts ------------------------------------------------------------------- Date: Fri 10 Feb 89 08:00:43-PST From: Oren Patashnik Subject: Re: Refer functionality for BibTeX Keywords: refer, BibTeX > From: nr@Princeton.EDU (Norman Ramsey) > Subject: Refer functionality for BibTeX > UNIX has a bibliographic utility, refer, that works with troff. > One notable feature is that documents can be cited by a series of key > words. These key words are drawn from authors, title, and so on, so > a citation of the form %[knuth searching sorting%] would retrieve volume > 3 of the Art of Computer Programming, and so on. > > Has anyone implemented a similar utility for bibtex? I would like to > be able to retrieve bibtex keys by specifying a list of key words. That citation method has its advantages (and disadvantages---what works one week might not work the next week, because you've added some other entry to the database; but probably more important, that method isn't consistent with the way LaTeX does things, and after all, BibTeX was written as a LaTeX tool, even though it's possible to use BibTeX without using LaTeX). And I see no direct way to implement that method with BibTeX. The only possibility I can think of is to have two other programs, which you'd run before and after each run of BibTeX, that would convert between BibTeX's method of citation and refer's. To me it doesn't seem worth the effort either to write these two programs in the first place or, once written, to use them (but those who've grown accustomed to refer might feel otherwise). --Oren Patashnik ------------------------------------------------------------------------ Date: 15-FEB-1989 12:51:34 GMT From: CHAA006%vaxa.rhbnc.ac.uk@NSS.Cs.Ucl.AC.UK Subject: Re: Graphics in TeX Keywords: graphics, TeX David Rogers has made an interesting proposal for a standard mechanism whereby graphical material may be incorporated in a TeX document. I wonder if I might be permitted to comment on parts of his proposal, without wishing in any way to detract from its content ? Where a chevronned line appears without comment, I include it only to show agreement with the suggestion. >>>\beginpicture (Begin picture) >>>\endpicture (End picture) >>>\viewport#1#2 (Viewport) Two comments: although "Viewport is the common computer graphics name for this function", I do not believe that it is an intuitive or inherently meaningful term. In fact, I am still not sure exactly what David implies by "Viewport". Is it the area within which the graphics will be constrained to appear ? Is cropping defined to automatically occur if the graphics try to exceed the graphical area, or is it simply notional, and are graphics allowed to spread all over the page ? Presumably it will reserve an \hbox or a \vbox as appropriate, but is it context-sensitive ? If \beginpicture \viewport ... \endpicture occur in horizontal mode, will the resulting box be treated as a normal part of the horizontal-mode material ? >>> The origin is in the lower left corner positive upward >>> and to the right. The lower left corner of what ? The current page ? The current \vbox, if any ? Why not the current reference point ? >>>\linethickness#1 (Line thickness) >>>\setrsl#1#2 (Set resolution) The first example of an unnecessarily terse mnemonic. David's previous terms have all been spelt out in full, and have therefore been readable, if not, in the case of \viewport, inherently meaningful. Why not \setresolution ? Is this the right way to specify the size of a pixel anyway ? If the user subsequently changes the size of the "viewport", the size of the pixels will change. I would have thought that, for a particular output device, there might well be an optimal pixel size which is, and should be, independent of the size of any individual "viewport". Should we not specify pixel sizes absolutely ? >>>\ma#1#2 (Move absolute) >>>\mr#1#2 (Move relative) >>>\da#1#2 (Draw absolute) >>>\dr#1#2 (Draw relative) Ditto, for all of these. I can see that short forms will be useful, to reduce the size of the graphics interfile, but I fail to see why a long form, with a short form \let equal to it, should not be defined as the canonical primitive. >>>\pa#1#2 (Point absolute) >>>\pr#1#2 (Point relative) >>> #1 The distance to be moved visibly in a horizontal direction I dispute that the parameters specify "the distance to be moved visibly ..."; I suggest that they specify the distance to be moved {\it invisibly}. Again, canonical full forms would help readibility (?\plotpointabsolute, ?\plotpointrelative) >>>\text#1 (Text) >>> #1 The text string to be plotted. >>> >>> The current font is used. Default is cmr10. In what circumstances would the default font be used. Is it really cmr10, or is it the translation of \tenrm, or is it selected by \rm ? All could yield different results. >>>\tangle#1 (Text angle) A bad choice of name, given that TeX is written in WEB. What's wrong with \textangle ? What exactly is meant by the text angle ? is it the angle through which the individual glyphs are rotated, or is the angle through which the entire string is rotated ? If the latter, an angle of pi/2 will cause the text to be written {\it up} the page; it is more common to have vertically-oriented text written {\it down} the page. >>>\setrgb#1#2#3 (Set rgp) [should be (Set rgb)] >>> #1 The red component of the current drawing color. >>> #2 The green component of the current drawing color. >>> #3 The blue component of the current drawing color. >>> >>> The red, green and blue components of the color are given as >>> decimal numbers in the range 0 to 1 with 0 representing no >>> intensity of the component and 1 full intensity. >>> >>> Black is indicated by r = 0, g = 0, b = 0. >>> White is indicated by r = 1, g = 1, b = 1. >>> >>> The default is black. Here I'm stepping very much outside my own area of knowledge, so the following comment is very tentative: the x- and y-co\"ordinates are unexceptionable, but are the r-,g-,b-components adequate ? They seem to specify not only colour but also intensity; is this desirable ? Is there a better system ? Are there alternative systems that separate out colour, hue, saturation, intensity, ... ? >>>\setpxl#1#2#3#4#5 (Set pixel) The comments on r-,g-,b- as above, plus why not \setpixel ? Then, for consistency, why do we have \pa (point absolute) but \setpxl (set pixel) ? Why do we have a verb in one command but not in the other. Should we use verbs or nouns as commands ? (I believe verbs, always). Which verb(s) ? Plot ? Set ? I believe "Plot", leaving "Set" for an entirely different operation (see next). >>>\setgray#1#2 (Set gray levels) >>> #1 The number of gray levels available. >>> #2 Parameter that determines the gray level representation scheme. >>> p -- patterning (see Ref.~3 and below) >>> d -- dither (see Ref.~3) \setgray implies that we are setting a gray level, not setting the number of gray levels; why not \setgraylevels ? >>>\setlut#1#2#3 (Set look-up table) Why not \setlookuptable >>>[...] Their intended use >>>is as the end product of a filter pipe (footnote pipe is used here in >>>the context of a UNIX or MS-DOS pipe) A sad way of alientating half of your audience; many of us do not have Unix systems, through choice, and find the use of Unix terminology in a non-Unix context both unnecessary and slighlty irritating. There is nothing magic about a pipe; it is simply a way of avoiding the use of intermediate disc files, at the expense of multiple concurrent processes. Finally, a comment on the macro parameters themselves. As suggested by David, they are undelimited parameters; I find that a more natural syntax often results from the use of explicitly delimited parameters, particularly where keywords are involved. Writing such macros is undoubtedly more work, particularly where variant keywords are involved, but the end result is well worth the effort, in my opinion. As the macros are not yet written, might we not consider delimited forms ? ** Phil. ------------------------------------------------------------------------------- %%% The TeXhax digest is brought to you as a service of the TeX Users Group %%% in cooperation with the UnixTeX distribution service at the %%% University of Washington %%% %%% Concerning subscriptions, address changes, unsubscribing: %%% BITNET: send a one-line mail message to LISTSERV@UWAVM %%% SUBSCRIBE TEXHAX % to subscribe %%% or UNSUBSCRIBE TEXHAX %%% %%% All others: send a similar one line mail message to %%% TeXhax-request@cs.washington.edu %%% Please be sure you send a valid internet address!! %%% in the form name@domain or name%routing@domain %%% and use the style of the Bitnet one-line message, so that %%% we can find your subscription request easily. %%% %%% All submissions to: TeXhax@cs.washington.edu %%% %%% Back issues available for FTPing as: %%% machine: directory: filename: %%% JUNE.CS.WASHINGTON.EDU TeXhax/TeXhaxyy.nn %%% yy = last two digits of current year %%% nn = issue number %%% %%% For further information about TeX Users Group services and publications %%% contact Karen at KLB@SEED.AMS.COM or write to TUG at %%% TeX Users Group %%% P.O. Box 9506 %%% Providence, R.I. 02940-9506 %%% Telephone (401) 751-7760 %%% %%% Current versions of the software now in general distribution: %%% TeX 2.95 metafont 1.7 %%% plain.tex 2.94 plain.mf 1.0 %%% LaTeX 2.09 ( 8/10/88) cmbase.mf see cm85.bug %%% SliTeX 2.09 gftodvi 1.7 %%% tangle 2.9 gftopk 1.4 %%% weave 2.9 gftype 2.2 %%% dvitype 2.9 pktype 2.2 %%% pltotf 2.3 pktogf 1.0 %%% tftopl 2.5 mft 0.3 %%% BibTeX 0.99c dvipage 3.0 %%% AmSTeX 1.1d %%%\bye %%% End of TeXhax Digest ************************** -------