[comp.text] TeXhax Digest V88 #70

TeXhax@Score.Stanford.EDU (TeXhax Digest) (08/06/88)

TeXhax Digest   Friday, August  5, 1988   Volume 88 : Issue 70

Moderator: Malcolm Brown

Today's Topics:

               Look at cat'codes while defining a macro
                          Cyrillic Fonts...
         RE: Problems combining \tt, \obeyspaces, and \halign
                        Re: Cyrillic Fonts...
                X11 previewer, PS previewer and VorTeX
                       BibTeX 98 vs. BibTeX 99
              comparison of TeX-to-C and Web-to-C wanted
               Improved `Page Layout in LaTeX' program
                   Re: LaTeX question (\textheight)
                             Re: Endnotes
               re: re: Standardizing on PostScript TFM
                  Question concerning Hershey fonts
                      Re: Problems with problems
                          Metafont question
                          \proclaim & \folio
       TeX memory limits : support for virtual memory systems.
                     Electronic Font for Pictures
                        Re: \proclaim & \folio
                           LaTeX's \oval's
                 BiBTeX's selection of "widest label"
               Re: BiBTeX's selection of "widest label"

----------------------------------------------------------------------

Date:    Tue Jul 26 13:47:39 MET 1988
From: XITIJSCH%DDATHD21.BITNET@Forsythe.Stanford.EDU
Subject: Look at cat'codes while defining a macro

Recently there have been questions about the definition of macros; these
questions can be traced back to difficulties with the handling of category
codes (e.g. Peter Flynn's \oldstyle numbers [#58] or Steve Buyske's
`Rest of line' problem [#65]). Perhaps a more fundamental brief note can
help to clarify those problems.

Each character is attributed by a category code (short catcode).  This
catcode determines the functionality of a character, e.g. if it can be
part of a control sequence name etc.  You can look at chapter 7 in the
TeXbook where the catcodes are listed alltogether.  Technically spoken, the
catcodes determine the way TeX does the split of the input into tokens,
i.e. his lexical analysis.  The ability to redefine the catcodes is
therefore the ability to redefine the lexical analysis of TeX -- a
powerful, but dangerous, possibility.

If a macro shall be defined there are three phases where the catcodes must
be looked at.

 1.  The definition of the macro
     Here the definition will be scanned, i.e. tokenized, but (except with
     \edef or \xdef) not interpreted. Because each token is defined through
     its name or its catcode, the catcodes for all charactes which should
     be treated special must be set.  This does not only hold for the
     characters inside the body of the macro (i.e. the replacement text)
     but also to special characters delimiting parameters (like the ~~M in
     Steve's problem).
        E.g., this was the first error of Peter. The digits are no active
     characters during the tokenization -- and the \def will complain an
     error later because it must be followed by a token which is either an
     active character or a control sequence name.  Jim Walker illustrated
     this in his answer to Steve's problem [#67], where he \catcode'd the
     ~~M to \active (with \obeyspaces) during the definition of \innertest.
        To get a clean description, the whole definition should be inserted
     in a group; where the catcodes are arranged locally and the macro
     definition is done globally.  As a precaution all characters which are
     \catcode'd to \active should be \global\let to a meaningful character
     before the end of the group so that they are defined in every case if
     the handling of a \write (in the asynchronous output routine!) takes
     place.

 2.  The reading of the parameters
     First the parameters will be tokenized and then they will be inserted
     (in tokenized form!) in the replacement text. Therefore first all
     needed special characters must be established and afterwards the
     argument can be read.  This is usually done by using two macros, the
     first sets up a new group, establishs all special catcodes, and calls
     the second macro which scans its argument(s), expands to its
     replacement text, and closes the group (see, e.g., for Jim's solution).
     This must be done with Peter's macros, too, which now reads like

        \let\digiti=1                  % define shorthands for nonactive digits
        ...
        \begingroup
           \catcode`\1=\active         % catcode digits to active
           ...                         % this is needed for the def of \setsc
           \gdef\csc{%                 % the user sees only \csc{#1}
              \bgroup                  % set up the group and the catcodes
                 \catcode`\1\active
                 ...
                 \setsc
              }
           \gdef\setsc#1{%             % define the digits, set the param,
                 \def1{{}$\fam1 \digiti${}}% % {} for not creating $$
                 ...
                 \sc #1%
              \egroup
              }
           \global\let1=\digiti        % in case active 1 appears in a \write
           ...
        \endgroup

     Please note that this is just an example, not a fully developed macro.
     In the definition of the digits it must be tested if we are in math
     mode, \mathsurround must be set, of course the other digits (0, 2--9)
     must be defined, part of the macros should be private, etc. It must be
     decided if the macro \csc should have parameters -- perhaps a
     declaration is of more use but then \hskip 1em will not work any more.
     Please note the usage of \fam1, too. \oldstyle is not defined
     everywhere (LaTeX...), and the type size must be made changeable, as it
     would be done in a proper definition of \sc. (Macros of this kind should
     be designed to work at least with Plain and with LaTeX.)

 3.  The execution of the macro
     If the replacement takes place all catcodes must be in their desired
     state even if the parameters nevers contain this character.


Hope, this helps a few of the people which must write macros.

                  Joachim
   TH Darmstadt
   Institut f\"ur Theoretische Informatik
   Joachim Schrod
   Alexanderstr. 24            Bitnet: XITIJSCH@DDATHD21
                                  (Please try again if I don't answer ---
   D-6100 Darmstadt               our Bitnet connection is very instable...)
   West Germany

------------------------------

Date: 
From: Karl R. Wurst <WURST%CTSTATEU.BITNET@Forsythe.Stanford.EDU>
Subject:      Cyrillic Fonts...

        We have someone who wishes to use the Cyrillic fonts for TeX at
        our site.  When I began to build the fonts, I found that they are
        in MetaFont79 form.  I am looking for a solution to this problem.
        I would like to see any of the following (in order of preference):

        1.  Someone point me to a copy of the Cyrillic fonts translated
        to the current version of Metafont, so that I can build them for our
        printers.

        2.  Someone point me to a copy of MetaFont79 (for VMS) so that I can
        build them.

        3.  Someone point me to a copy of the Cyrillic fonts, already built.

        If you can help me with any of the above solutions, it would be
        greatly appreciated.


                                                Karl R. Wurst
                                                Information Systems Department
                                                Central CT State University

------------------------------

Date:         Tue, 26 Jul 1988 14:19 EDT
From: Jim Walker <N410109%univscvm.BITNET@Forsythe.Stanford.EDU>
Subject:      RE: Problems combining \tt, \obeyspaces, and \halign

In TeXhax88 #67, Gavin Burnage asks about mysterious spaces appearing in
a table he was trying to typeset using \halign and \obeyspaces.
Actually, they're not so mysterious; the spaces are the leading spaces
that he typed to make his TeX code look nice.  Take them out, and the
problem disappears.  Even better, move the \obeyspaces into the
alignment template, just after the \strut.

 -- James W. Walker, Dept. of Math., Univ. of S. Carolina at Columbia

------------------------------

Mail-From: BEETON created at 26-Jul-88 13:46:59
Date: Tue 26 Jul 88 13:46:59-PDT
From: Barbara Beeton <BEETON@Score.Stanford.EDU>
Subject: Re: Cyrillic Fonts...

the cyrillic fonts originated at the american math society, where they
were developed for use in bibliographic citations in mathematical reviews.
the math society does not have the manpower to re-implement them in mf84
at present, but will consider serious offers of assistance.  the mf79
programs was written in sail, which runs only on dec-10s and -20s; since
the math society still has a running dec-20, the need for re-implementation
has not been overwhelming, yet.
	tfm and raster files for the existing cyrillic fonts for 300dpi
at magstep 0 exist in the directory <tex.amsfonts> at score.stanford.edu.
this, of course, is only a "starter set".  a more extensive set, through
magstep 5, and in other resolutions, is available on floppy disk from the
ams -- call the "tex library" at ams, 800-556-7774 or 401-272-9500, or
send a message to sse@math.ams.com to obtain details.
					-- bb

------------------------------

Date: Tue, 26 Jul 88 14:23:08 PDT
From: harrison@renoir.Berkeley.EDU (Michael Harrison)
Subject: X11 previewer, PS previewer and VorTeX

I started out to answer Micah Beck's request about an X11 dvi previewer,
but it is time to give an update on the VorTeX prioject.

The VorTeX project has dvi2x11, written by Steve Procter which has been 
operational
for a couple of weeks. 
This is a nice previewer similar to dvi2x but it is
not yet as fast as the latest version of dvi2x.
Some of you may have the old dvi2x which had not beeen optimized.
The latest one is very fast under X10.
We will probably release the X11 version soon if we find
no bugs.

There is a lot of new stuff to report on what has been happening on the
VorTeX project and perhaps this is not the place for a lengthy report.
Here is an abstarct.

VorTeX is running.  It passed the trip TeX some months ago as well as
what we call the trip^\ast test since an incremental formatter has to be able
to restart from an intermediate point.
More reverse mapping code needs to be added and we are doing it.

In addtion the often delayed PostScript interpreter will be release in the
next few weeks too.  This is becoming much more complete and has
commands not always implemented like setscreen.  This work is
mainly due to John Coker.

The macro packages have been enhanced to give better access and display
of bibliographic information and has hooks for more functionality.

We'll announce a major update on the software release very soon.
Stay tuned.

Credits:  This nice software has been written by a lot of talented
people.  Mainly by, Pehong Chen, John Coker, Ikuo Minakata,
Ethan Munson, and Steve Procter.

------------------------------

Date: Tue, 26 Jul 88 18:32:06 CDT
From: anita@astro.as.utexas.edu (Anita Cochran)
Subject: BibTeX 98 vs. BibTeX 99

We are currently running BibTeX (C Version) 0.98i.  I understand there
are some major improvements to BibTeX in version 0.99 but that 0.99 is
{\bf not} compatible with 0.98.  Since we have designed some style
files here (for the astronomy journals Astrophysical Journal and Icarus
if anyone is interested), we are reluctant to upgrade our BibTeX.

Could someone please outline the following:
   1) Advantages of BibTeX 0.99
   2) Differences in the bst files from 0.98 to 0.99
   3) Procedures for converting bst files from 0.98 to 0.99
   4) Anything else you think is needed for an informed choice between
      the two BibTeX programs

Thanks in advance.

 Anita Cochran  uucp:  {noao, ut-sally, ut-emx}!utastro!anita
                arpa:  anita@astro.as.utexas.edu  
                snail: Astronomy Dept., The Univ. of Texas, Austin, TX, 78712
                at&t:  (512) 471-1471

------------------------------

Date: Tue, 26 Jul 88 18:36:32 CDT
From: anita@astro.as.utexas.edu (Anita Cochran)
Subject: comparison of TeX-to-C and Web-to-C wanted

We are running TeX version 2.9 created with the program TeX-to-c.  It
works very well and is {\bf much} faster and only slightly larger than
the version generated from web to pascal.  We are very pleased with it.
Now I see that there is a program web-to-c.  Does this supercede
the tex-to-c program?  Does it generate the same code?  Is it just
a renamed tex-to-c?  Is there any reason to get web-to-c and recompile
TeX and LaTeX?

 Anita Cochran  uucp:  {noao, ut-sally, ut-emx}!utastro!anita
                arpa:  anita@astro.as.utexas.edu  
                snail: Astronomy Dept., The Univ. of Texas, Austin, TX, 78712
                at&t:  (512) 471-1471

------------------------------

Date:     Wed, 27 Jul 88 15:50 B
From: <CGL%HGRRUG5.BITNET@Forsythe.Stanford.EDU>
Subject:  Improved `Page Layout in LaTeX' program

In Groningen Jan Luyten and myself have
improved the program

***Page Layout in LaTeX***
from Kent McPherson published in TUGBoat, 9, 1.

We consider it a useful program and therefor
offer the program machine readable.
We welcome comments.

%%% This 10K file is too long for digest distribution.  I've put a copy
%%% on the machine "score.stanford.edu" for FTPing.  Logon to score as
%%% "anonymous" and GET the file
%%%   <tex.texhax>mcpherson.txh
%%% A copy has also been forwarded to the listserver at tamvm1 for
%%% BITNET distribution.      Malcolm

------------------------------

Date:         Wed, 27 Jul 88 09:17:50 CDT
From: Don Hosek <U33297%UICVM.BITNET@Forsythe.Stanford.EDU>
Subject:      Re: LaTeX question (\textheight)

It seems to me that one easy way of doing this would be to have the
letterhead macro output an empty box then do a negative vertical skip
to increase the height of the first page (the empty box prevents
TeX from discarding glue at the beginning of a page--I think LaTeX
provides something like \vspace* to accomplish the same.


-dh

------------------------------

Date:         Wed, 27 Jul 88 09:22:34 CDT
From: Don Hosek <U33297%UICVM.BITNET@Forsythe.Stanford.EDU>
Subject:      Re: Endnotes

There is a macro for endnotes available for FTP from XHMEIA.CALTECH.EDU.
[[Since I'm pretty sure that UBVMS isn't on the internet, I'll send you
it over Bitnet.]]

-dh

------------------------------

Date:         Wed, 27 Jul 88 09:33:57 CDT
From: Don Hosek <U33297%UICVM.BITNET@Forsythe.Stanford.EDU>
Subject:      re: re: Standardizing on PostScript TFM

When versions of assorted fonts come out in MF format, one of two things
will happen: (1) The MF will be done by the original suppliers of the font
so that either the dimensions match what's currently present or what's
currently present will be changed to match the MF output; or (2) the font
will be done by somebody else, in which case the font ISN'T Times Roman
so it should be named something other than tmr.

-dh

------------------------------

Date: Wed, 27 Jul 88 08:53 PST
From: "Jim Seidman, Reanimator-in-training" <JSEIDMAN%HMCVAX.BITNET@Forsythe.Stanford.EDU>
Subject: Question concerning Hershey fonts

(Yes, I realize part 1 was actually 2 questions... so sue me.)  Does
anybody know of a program to covert Hersey fonts into METAFONT input?  If
not, does anybody know of a program to make TFM files for Hersey fonts,
or even an algorithm to do so?

------------------------------

Date:         Wed, 27 Jul 88 10:02:49 CDT
From: Don Hosek <U33297%UICVM.BITNET@Forsythe.Stanford.EDU>
Subject:      Re: Problems with problems

What you can do to access \theenum... in thecase where ... should be
either i, ii, iii, or iv depending on the value of \@enumdepth
is use something that looks like this:
  \csname theenum\romannumeral\@enumdepth\endcsname

A perusal of LaTeX.TeX will reveal countless examples of the same.

Whenever one wants to modify some aspect of LaTeX it helps to examine
LaTeX.TeX which is one of the best documented files I've ever seen.

-dh

------------------------------

Date: Tue, 26 Jul 88 19:24 GMT
From: IAN MURPHY <MURPHY_I%procyon.ie@Forsythe.Stanford.EDU>
Subject: Metafont question

I'm in the process of writing a TeX previewer on the GraphOn250
terminal which is a tek40xx/4100 emulator with extensions to
allow downloading of fonts and I'm having problems with
generating fonts for it with metafont.

I started off using ln03 files, which were almost four times too
big (cmr10 at mag=1 is 1/4in high onscreen), and used them until
i got stuff appearing onscreen, now i want to tidy things up by
creating correct size fonts so...

I modified the existing local.mf file which was setup for the
ln03 (we're a VAX/VMS site) to look like this

screen_rows:=780; screen_cols:=1024;
mode_def graphon =   % graphon mode: to generate fonts for the ln03
  lowres_;              % do as in lowres mode, except:
  pixels_per_inch:=100; % not 200
  blacker:=.1;          % not very much blacker
  fillin:=0;            % diagonals do not fill in
  enddef;
localfont:=graphon;

and I put this into my own directory. I then used

   mf "\mode=localfont; mag=1; input cmr10"

to create cmr10 at magstep 1...it didn't work. The above command
originally produced a file CMR10.300GF for the ln03 and with the
new local.mf it should (i think) have produced a new file
CMR10.somethingelseGF, instead i got CMR10.300GF again.
So.....
I copied all the files needed to create cmr10 into my own directory and
redefined MF_INPUTS: to point to my directory and got the same result
again.

What am I doing wrong??? I should be getting a different size GF
file, shouldn't I???

Also, does anybody have a program which 'changes' a .web file by
inserting the changes in the .ch file into the main .web file, if
you see what i mean, what i want is to end up with one .web file
and an empty .ch file.
Yea, I know it sorta defeats the purpose of web, but for programs
that are never going to be ported to other machines it makes life a
lot easier if you don't have to keep checking to see there is
going to be an attempt to change the text you're editing when you
tangle it.

Thanks,
Ian Murphy,
Procyon Informatics Ltd, Dublin,
Ireland.
'This line intentionally left justified                           '

------------------------------

Date: Wed, 27 Jul 88 19:05:28 PDT
From: darrell%cs@ucsd.edu (Darrell Long)
Subject: \proclaim & \folio

I just discovered that if a page break occurs in the middle of a \proclaim'd
paragraph, then \folio puts the page number out in slanted type.  Is this a
known "feature" ?

DL

------------------------------

Date:	28-JUL-1988 12:49:56 GMT +01:00
From:	MACALLSTR%vax1.physics.oxford.ac.uk@NSS.Cs.Ucl.AC.UK
Subject: TeX memory limits : support for virtual memory systems.

TeX limits its internal memory addressing by using a ( 16-bit ) halfword
 which restricts maximum memory to 65535 ! This is 'silly' on virtual memory
 systems such as VMS where such a restriction means that only a tiny fraction
 of available memory is normally used. I've encountered some TeX files which
 hit this limit and would like to increase it.
One solution might be to use a full word variable instead of the halfword
 variable for storing the maximum addressable memory. Perhaps that could be
 a mod for the next update of TeX?
Another solution could be to redefine the word size from, say, 32 bits to
 64 bits using the standard 'untangling of woven webs'. Although I've 
 successfully extended TeX's capacity in other ways using the CHANGE file,
 the 32 to 64 bit word change would be a major change requiring careful
 checking of many variable relationships and have not attempted it.
A third solution ( which perhaps should not even be contemplated as it
 might affect the portability of TeX to small systems ) for virtual memory
 systems would be to save processor time by NOT using internal packing of
 data structures and the first suggestion could then be implemented easily(?).
Perhaps someone has a successful CHANGE file for increasing TeX's memory
 capacity already?
John

------------------------------

Date:      Thu, 28 Jul 88 08:09:25 CDT
From:      "George A Christensen" <GA.TEX%ISUMVS.BITNET@CUNYVM.CUNY.EDU>
Subject: Electronic Font for Pictures

Has anyone developed a font of electronic components that could be
used with the Picture environment?  Doing them all with lines and
ovals takes too much memory and cpu time on our system.

------------------------------

Date: Thu 28 Jul 88 06:22:18-PDT
From: Barbara Beeton <BEETON@Score.Stanford.EDU>
Subject: Re: \proclaim & \folio

in plain.tex, \folio does not specify a font, nor should it.
but \footline, where \folio is used, does include \tenrm .  (see the
texbook, p 362.)  it is the responsibility of the user to make sure
this font gets set corrrectly.
					-- bb

------------------------------

Date: Thu, 28 Jul 88 10:08:35 EDT
From: weltyc@fs3.cs.rpi.edu (Christopher A. Welty)
Subject: LaTeX's \oval's

In TeXhax you aksed for a web change file for a really big tex (I
think you called it gross).  I, too, have been unable to create one
from the existing documentation, but would like one.  If you get any
response that isn't posted to texhax, I'd appreciate it if you'd let
me know.

Christopher Welty  ---  Asst. Director, RPI CS Labs
weltyc@cs.rpi.edu       ...!rutgers!nysernic!weltyc

------------------------------

Date: Thu, 28 Jul 88 16:02 EST
From: "Jerry Leichter (LEICHTER-JERRY@CS.YALE.EDU)"
Subject: BiBTeX's selection of "widest label"

How does BibTeX decide what the "widest label" in a bibliography is?  (This
is the label it will provide as an argument to \begin{thebibliography} in
the BBL file.)

I've got an example in which it chooses an inappropriate label.  In my case,
the "widest label" that BibTeX choses is "KEW{\etalchar{+}}85".  This breaks,
because I use an @preamble command to re-define \etalchar as nothing at all -
I find the mark distracting.  However, even if I left it alone, I suspect
the choice is incorrect, since I also have the label "ACGK88", which I'm
pretty sure is wider.

Just how is BibTeX chosing the apparent widest label?  Is there a way to
override it?

BTW, in case it isn't obvious, I'm using ALPHA bibliography style.

							-- Jerry

------------------------------

Mail-From: PATASHNIK created at 29-Jul-88 07:17:04
Date: Fri 29 Jul 88 07:17:04-PDT
From: Oren Patashnik <PATASHNIK@Score.Stanford.EDU>
Subject: Re: BiBTeX's selection of "widest label"

> How does BibTeX decide what the "widest label" in a bibliography is?  (This
> is the label it will provide as an argument to \begin{thebibliography} in
> the BBL file.)

It looks up the width of each character in the table of module 35.

> I've got an example in which it chooses an inappropriate label.  In my case,
> the "widest label" that BibTeX choses is "KEW{\etalchar{+}}85".  This breaks,
> because I use an @preamble command to re-define \etalchar as nothing at all -
> I find the mark distracting.  However, even if I left it alone, I suspect
> the choice is incorrect, since I also have the label "ACGK88", which I'm
> pretty sure is wider.

Nope, the choice is correct.  All digits are the same width, and the
`K' is common to both strings.  The `ACG' comes to 2257 units, but the
`EW+' comes to 2487 units (`W's are wide mothers).

When use you BibTeX, it doesn't know you're going to redefine
\etalchar, so it assumes you will really use the `+'.  The redefine
mechanism was included mainly to allow someone to use `*' or some
other character instead without having to change styles (the widths of
such single characters don't differ by enough to make a noticeable
difference).  It's my opinion, though, that if you want to remove the
character completely, you should probably change the style (.BST file).
I should probably say this in the documentation somewhere.

> Just how is BibTeX chosing the apparent widest label?  Is there a way to
> override it?

The most reasonable way to override the widest label, I think, is to
change the style (and then rename it, of course).  Alternatively, you
could edit the .BBL file.

	--Oren Patashnik

------------------------------


%%%
%%% Concerning subscriptions, address changes, unsubscribing:
%%%     BITNET: send a one-line mail message to LISTSERV@TAMVM1.BITNET:
%%%         SUBSCRIBE TEX-L <your name>    % to subscribe
%%%
%%%     All others: send mail to
%%%           texhax-request@score.stanford.edu
%%%     please send a valid arpanet address!!
%%%
%%%
%%% All submissions to: texhax@score.stanford.edu
%%%
%%% Back issues available for FTPing as:
%%%          machine:      directory:  filename:
%%%   [SCORE.STANFORD.EDU]<TEX.TEXHAX>TEXHAXnn.yy
%%%      nn = issue number
%%%      yy = last two digits of current year
%%%\bye
%%%

------------------------------

End of TeXhax Digest
**************************
-------