TeXhax Issue #3 texhax03.861105 % With this issue, TeXhax will be very close to being caught up. % % Sorry that it has taken so long to finally begin cranking out issues, but % I've been concerned to ensure that the mailing list was in order and that % no one was left out. There's been a steady stream of subscription requests. % % The question has been raised about storage of back issues. Previously, all % issues of TeXhax were appended to a single file. Needless to say, this file % very quickly became too large to mail or to access via FTP. % % Let me propose a new system. Issues will be stored individually, under the % format: % texhaxn. % where "n" in the number of the issue in the current year and "date" is a % six digit number describing the date the issue was sent out. The first % line of every issue --- beginning with this issue --- will contain that % name of that issue's filename. % % I would hope to keep each issue online for at least a year, but that will % depend on the volume of material. % % If you have suggestions, I invite you to send them to % texhax-request@score.stanford.edu % I'll then summarize them in some future issue. % Malcolm Brown % 17-Oct-86 18:00:33-PDT,3021;000000000000 Return-Path: Date: Fri 17 Oct 86 19:01:46-MDT >From: "Nelson H.F. Beebe" Subject: LaTeX \protect version \string To: TeXHaX@SU-SCORE.ARPA X-US-Mail: "College of Science Computer, Dept. of Physics, University of Utah, Salt Lake City, UT 84112" X-Telephone: (801) 581-5254 I am interested in TeX macro wizard comments about the following bboard message I recently issued. The use of \string instead of \protect turns out to solve another problem that I have frequently met in writing about TeX and LaTeX -- you cannot put \verb|...| inside a LaTeX moving argument, which happens an awful lot of places. Often, I just want to get a TeX control sequence name complete with its backslash; using \string\csname works where \verb|\csname| does not. Subject: Index font change problem solved To: "*PS:LATEX.TXT.1"@UTAH-SCIENCE.ARPA cc: BEEBE@UTAH-SCIENCE.ARPA US-Mail: "College of Science Computer, Dept. of Physics, University of Utah, Salt Lake City, UT 84112" Telephone: (801) 581-5254 Message-ID: <12246273941.7.BEEBE@UTAH-SCIENCE.ARPA> In order to guarantee complete indexing of a phrase, it is sometimes useful to define a macro which generates both in-line text, and an index entry. That way, instead of writing gnats and gnus\index{gnats and gnus} you can do \newcommand{\GG}{gnats and gnus\index{gnats and gnus}} and just write \GG{} when you need it. However, if the index string contains a font change, the font macro gets expanded: \newcommand{\GG}{{\tt gnats and gnus}\index{{\tt gnats and gnus}}} produces in the .idx file \indexentry{{\protect \fam \ttfam \tentt gnats and gnus}}{1} instead of \indexentry{{\tt gnats and gnus}}{1} I made some experiments with \protect\tt, which is implied by the LaTeX book to protect the name from expansion, but it does not work. I can now report a solution. Try #1: \newcommand{\C}[1]{{\tt #1}\index{{\tt #1}}} \C{an-index-entry with C} \indexentry{{\protect \fam \ttfam \tentt an-index-entry with C}}{1} --no good--\tt got expanded Try #2: \newcommand{\CTWO}[1]{{\tt #1}\index{{\string\tt #1}}} \CTWO{an-index-entry with CTWO} \indexentry{{\ttan-index-entry with CTWO}}{1} --almost, but \tt runs onto index string Try #3: \newcommand{\CTHREE}[1]{{\tt #1}\index{{\string\tt{}#1}}} \CTHREE{an-index-entry with CTHREE} \indexentry{{\tt{}an-index-entry with CTHREE}}{1} --this is okay, since the empty group prevents \tt from running into the index entry Try #4: \newcommand{\CFOUR}[1]{{\tt #1}\index{{\string\tt\space#1}}} \CFOUR{an-index-entry with CFOUR} \indexentry{{\tt an-index-entry with CFOUR}}{1} --EUREKA! \string protects \tt from expansion, and \space becomes a single blank ------- 18-Oct-86 11:28:34-PDT,6671;000000000000 Return-Path: Date: Sat 18 Oct 86 12:29:34-MDT >From: "Nelson H.F. Beebe" Subject: Useful extension to DVITYPE To: TeXHaX@SU-SCORE.ARPA DVITYPE outputs coordinates in high-resolution TeX (h,v) units and in (hh,vv) pixel units, both with h=hh=v=vv=0 at the upper-left corner of the TeX page. However, DVI drivers are required to place this (0,0) point 1in in and down from the physical page corner, and for many output devices, the coordinates are measured from the bottom left corner of the page. I have accordingly prepared a modified DVITYPE which outputs physical page coordinates as well, which I find useful in checking DVI driver output. The TOPS-20 change file for DVITYPE Version 2.8 follows; it should be relatively easy to merge these into any other system-dependent change file. This is another example where the multiple change file modifications to WEB discussed recently in TUGBoat would be useful. ------------------------------------------------------------ DVITYPE.TOPS10-CHANGES.2,2, 3-Mar-84 22:17:46,14-Aug-86 18:08:59,TEX82-1.1 DVITYPE.TOPS20-CHANGES.1,1,13-Apr-85 15:22:37,17-Oct-86 08:57:58,TEX82-1.1 DVITYPE.TOPS20-CHANGES.2,2,17-Oct-86 12:06:26,18-Oct-86 12:26:31,BEEBE DVITYPE.VMS-CHANGES.1,6,10-Jun-86 16:08:42,14-Aug-86 18:09:00,TEX82-1.1 DVITYPE.WEB.1,41, 5-Oct-85 12:19:44,17-Oct-86 09:32:49,TEX82-1.1 ------------------------------------------------------------ DVItype change file for Tops-20 Copyright (C) 1983 by David Fuchs. All rights are reserved. @x Tell WEAVE to print only the changes: \pageno=\contentspagenumber \advance\pageno by 1 @y \pageno=\contentspagenumber \advance\pageno by 1 \let\maybe=\iffalse \def\title{DVI$\,$\lowercase{type} changes for Tops-20} @z @x TOPS-20's banner: @d banner=='This is DVItype, Version 2.8' {printed when the program starts} @y Version 2.8a adds output of page coordinates in pixels, |hh_page| measured from the left edge of the output page, |vv_up| measured from the bottom edge, and |vv_down| measured from the top edge. Page size is assumed to be 8.5in by 11in, with the TeX origin placed one inch over and down from the upper-left corner, as decreed by the Stanford TeX Project. In addition, commands which update the current |h| or |v| positions now display the page coordinates before as well as after the operation. This additional output should simplify checking of DVI driver programs for actual output devices. @d banner=='This is DVItype, Tops-20 Version 2.8a with (hhpage,vvpage) output' @z @x Identify input vs. output files so version numbers are properly handled: @p program DVI_type(@!dvi_file,@!output); @y @p program DVI_type(@!dvi_file:-,@!output:+,TTY:/); @z @x Open dvi_file in binary mode: begin reset(dvi_file); @y begin reset(dvi_file,'','/B:8'); @z @x Open tfm_file in binary mode: begin reset(tfm_file,cur_name); @y begin reset(tfm_file,cur_name,'/B:8'); @z @x @!resolution:real; {pixels per inch} @y @!resolution:real; {pixels per inch} @!hh_max:integer; { page width in pixels } @!hh_offset:integer; { left margin offset } @!hh_page:integer; { page coordinate in pixels } @!vv_down:integer; { page coordinate in pixels } @!vv_max:integer; { page height in pixels } @!vv_offset:integer; { top margin in pixels } @!vv_up:integer; { page coordinate in pixels } @z @x Hardwire term_in and term_out to TTY: and |term_out| for terminal output. @^system dependencies@> @= @!buffer:array[0..terminal_line_length] of ASCII_code; @!term_in:text_file; {the terminal, considered as an input file} @!term_out:text_file; {the terminal, considered as an output file} @y and |term_out| for terminal output. @^system dependencies@> @d term_in==TTY {the terminal, considered as an input file} @d term_out==TTY {the terminal, considered as an output file} @= @!buffer:array[0..terminal_line_length] of ASCII_code; @z @x Update_terminal does nothing: @d update_terminal == break(term_out) {empty the terminal output buffer} @y @d update_terminal == do_nothing {empty the terminal output buffer} @z @x begin update_terminal; reset(term_in); @y begin update_terminal; @z @x begin rewrite(term_out); {prepare the terminal for output} @y begin {no need to prepare the terminal for output} @z @x print_ln(' Resolution = ',resolution:12:8,' pixels per inch'); @y print_ln(' Resolution = ',resolution:12:8,' pixels per inch'); hh_max:=round(8.5 * resolution); { page width in pixels } vv_max:=round(11.0 * resolution); { page height in pixels } hh_offset:=round(1.0 * resolution); { left margin 1.0in in } vv_offset:=round(1.0 * resolution); { top margin 1.0in down } print_ln(' Page size = ',hh_max:1,'H x ',vv_max:1,'V pixels'); print_ln(' TeX top left page corner is ',hh_offset:1,' pixels over and ', vv_offset:1,' pixels down on physical page'); @z @x hhh:=pixel_round(h+q); @y if showing then begin hhh:=pixel_round(h); hh_page:=hh_offset + hhh; print_ln(' ':6,'old_hh:=',hhh:1,', old_hh_page:=',hh_page:1,','); print(' ':5); end; hhh:=pixel_round(h+q); @z @x print(q:1,'=',h+q:1,', hh:=',hh:1); @y print(q:1,'=',h+q:1,', hh:=',hh:1); hh_page:=hh_offset + hh; print(', hh_page:=',hh_page:1); @z @x vvv:=pixel_round(v+p); @y if showing then begin vvv:=pixel_round(v); vv_down:=vvv + vv_offset; vv_up:=vv_max - vv_down; print_ln(' old_vv:=',vvv:1,', old_vv_up:=',vv_up:1, ', old_vv_down:=',vv_down:1,','); print(' ':5); end; vvv:=pixel_round(v+p); @z @x print(p:1,'=',v+p:1,', vv:=',vv:1); @y print(p:1,'=',v+p:1,', vv:=',vv:1); vv_down:=vv + vv_offset; vv_up:=vv_max - vv_down; print(', vv_up:=',vv_up:1,', vv_down:=',vv_down:1); @z @x print('level ',ss:1,':(h=',h:1,',v=',v:1, ',w=',w:1,',x=',x:1,',y=',y:1,',z=',z:1, ',hh=',hh:1,',vv=',vv:1,')'); @y hh_page:=hh_offset + hh; vv_down:=vv + vv_offset; vv_up:=vv_max - vv_down; print_ln('level ',ss:1,':(h=',h:1,',v=',v:1, ',w=',w:1,',x=',x:1,',y=',y:1,',z=',z:1, ',hh=',hh:1,',vv=',vv:1,','); print(' ':6,'hh_page=',hh_page:1, ',vv_up=',vv_up:1,',vv_down=',vv_down:1,')'); @z ------- 20-Oct-86 19:55:28-PDT,1010;000000000000 Return-Path: Date: Mon 20 Oct 86 22:54:13-EDT >From: John Crawford Subject: Re: TeXhax returns To: TeXhax@SU-SCORE.ARPA Looking forward to TeXhax... A question... does Maria Code's ASCII tape reflect changes which the -chrono- files on su-score suggest have been made to the MF, AMSTeX, etc in the recent months? I have the first TeX 2.0 tape from her, but don't want to order another unless it's been updated. I see from -chrono- files, that mf.web has been altered, but it's too big I think to ftp. John Crawford thanks! ------- 22-Oct-86 10:10:09-PDT,1122;000000000000 Return-Path: Date: Tue, 21 Oct 86 17:24:02 cet To: TEXHAX@SU-SCORE.ARPA >From: DDESMET%UA1VM.BITNET@WISCVM.WISC.EDU Subject: tex *********************************************************** Greetings This may be a dumb question, but let me try anyway. Our computer center has an IBM maching running VM/CMS. We have TeX software in the machine, but we do not have anything to print the output on. We do have a xerox 2700 laser printer (vanilla flavored) driven from a 3705 communications device from the IBM. Is there any way to make the laser printer print things from TeX? Is there anyone who has mamaged to do this who would share their knowledge? Is this a bad idea? Thanks for any help you have to offer. Don DeSmet DDESMET@UA1VM.BITNET ********************************************************************* 22-Oct-86 10:42:18-PDT,685;000000000000 Return-Path: Date: Wed, 22 Oct 86 11:29 CDT To: texhax@su-score.arpa >From: BUSU%UOFMCC.BITNET@WISCVM.WISC.EDU Subject: LaTeX style for APA Has anyone made or used a style file to conform to the American Psychological Association (APA) style? It shouldn't be that tough of a job, but I am just checking to see if the proverbial wheel wasn't already invented. Any info as to who might have more info etc., would be helpfull. Dan Keizer BITNET: BUSU@UOFMCC 22-Oct-86 17:02:51-PDT,544;000000000000 Return-Path: Date: Wed 22 Oct 86 20:00:12-EDT >From: Ben Fried Subject: Ricoh mode_def? To: texhax@SU-SCORE.ARPA Anyone have a mode_def for printers using the Ricoh printing engines? (for example, the imagen 12/300 and the dec ln03) Ben Fried ben@cu20b.columbia.edu ben@cucca (bitnet) seismo!columbia!cucca!ben (usenet) ------- 23-Oct-86 04:18:02-PDT,962;000000000000 Return-Path: Date: Thu 23 Oct 86 04:18:48-PDT >From: Doug Bryan Subject: typesetting previewers for Sun workstations To: info-graphics@ADS.ARPA, info-postscript@Score.Stanford.EDU, unix-wizards@BRL.ARPA, laser-lovers@WARD.CS.WASHINGTON.EDU I'm looking for a TeX previewer for Sun-3 workstations. If anyone out there knows of a previewer for TeX, DVI, Scribe, Impress, or PostScript, please let me know. Please reply to me directly since I am not on all of these mailing lists. My apologies to those of you who are on more than one of the above mailing lists. doug ------- 30-Oct-86 14:50:43-PST,1838;000000000000 Return-Path: Date: Thu 30 Oct 86 10:45:25-PST >From: Joseph I. Pallas Subject: Re: Treat for TeXxies. Marianne Winslett sent out this puzzle: %A treat for TeX hackers: \def\somemath#1{\relax\ifmmode#1\else$ #1 $\fi} \def\alph{\somemath{\alpha}} \def\alphprime{\somemath{\alpha'}} As you can see, \alph\ works and \alphprime\ works. Further, $\alph$ works and $\alph'$ works, but $\alphprime$ doesn't work. Fixing it will probably entail changing the definition of $'$. Enjoy. \end %--Marianne I'm not exactly a TeX wizard, but I can't resist this kind of puzzle, because I generally learn something. This time I learned that there may or may not be a bug in TeX. I can't tell from The TeXbook whether this behavior is correct or not. I'm pretty sure that it's wrong, though. This is the problem---in the following example, mumble gets executed: \def\mumble{\message{Boy, am I confused!}} \let\foo\else \iffalse\let\foo\mumble\fi I'm pretty sure that shouldn't happen, but the manual doesn't seem to go into enough detail about how ifs are processed for me to be certain. Can anyone tell me whether this is a bug? joe P.S. In any case, Marianne can get her example to work by changing somemath as follows: \def\somemath#1{\relax\ifmmode\def\mthing{#1}\else\def\mthing{$#1$}\fi\mthing} Even if the problem she had is due to a bug, this definition is better because it will make $\alphprime'$ do the right thing. ------- 30-Oct-86 15:13:33-PST,1226;000000000000 Return-Path: Date: 30 Oct 86 1514 PST >From: Joe Weening Subject: Re: Treat for TeXxies. To: PALLAS@SUSHI.STANFORD.EDU There's a simpler solution. Just change the definition of \somemath to \def\somemath#1{\ifmmode#1 \else$ #1 $\fi} and there's no longer a problem. (Note the space after the first #1 where there wasn't one before.) The space is ignored in math mode, but serves to prevent TeX from reading the \else when expanding the ' character, which is what was causing the problem. \relax will also work instead of a space. (But neither handles $\alphprime'$, I'll admit.) Regarding your other example: \def\mumble{\message{Boy, am I confused!}} \let\foo\else \iffalse\let\foo\mumble\fi I don't think anything is wrong here, since \let\foo\else causes \foo to be treated like \else, hence the last line is the same as \iffalse\let\else\mumble\fi i.e., it reduces to just \mumble. 31-Oct-86 07:29:19-PST,2776;000000000000 Return-Path: Date: Fri, 31 Oct 86 10:27:10 EST >From: Richard Furuta To: texhax@su-score.arpa Subject: Unix TeX-related questions from TeXHaX Cc: FRENCH%ti-eg.csnet@relay.cs.net, furuta@mimsy.umd.edu, johnm@afsc-bmo.arpa, kamal%hanauma@su-score.arpa, mackay@ward.cs.washington.edu Let me give quick answers to some of the Unix TeX-related questions that showed up in the revived TeXHaX. - For the person who wants to run TeX on an 8600: You didn't specify which operating system you are using on the 8600. If it is Berkeley Unix, contact Pierre MacKay Department of Computer Science, FR-35 University of Washington Seattle, WA 98195 for a Unix-TeX distribution tape. The tape is complete, including sources, fonts, macros, etc. Cost is $75 for U.S. sites by check to the University of Washington. No purchase orders, please, he can't handle them. Cost for sites outside of the U.S. is $85, by check in U.S. funds. The standard medium used is magnetic tape at 1600 bpi. I think he can also handle Sun streamer tapes. Contact him for information. If you are running VMS, I'd suggest you contact Kellerman and Smith in Portland, OR or that you obtain the generic distribution tape from Maria Code. I am not in a position to discuss the relative merits of the two different distributions. If you are running some other variant of Unix, contact Pierre or me directly. - For the person who is having trouble with undump on a Sun-3: There is a special version of undump for the Sun-3 that may be found in ./undump on tapes written within the past 6 months or so (my recollection of how long it's been there). The problems with TeX on the Sun-2 running version 3 of the software apparently have been taken care of in version 3.2 of the Sun operating system (but not before). - For the person who is looking for DVI-to-VDU. I don't think this has made it to the Unix TeX distribution tape either (the complaint was that it is not on the generic distribution tape). The distribution tapes tend to be pretty full and sometimes it takes time to find space enough to add new things to them. - Finally, for those readers who may be new, there is another mailing list called Unix-TeX@ward.cs.washington.edu that deals specifically with TeX on Unix. If you want to be included on this list, drop a note to unix-tex-request@ward.cs.washington.edu. Please be patient, though---there is a bit of a backlog for administrative requests. --Rick % %\bye %