[comp.text.tex] TeXhax Digest V90 #56

TeXhax@cs.washington.edu (TeXhax Digest) (08/20/90)

TeXhax Digest    Monday,  August 20, 1990  Volume 90 : Issue 56

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:         

                   help with indenting paragraphs
                      TeX most recent version
                Announcing a California TeX Users Group
              PostScript printers with certain attributes
                       Networking TeX files.
                         TeX on Apple IIGS
                            nroff to TeX
            Help with doublecolumns of names with addresses
                    macros for line numbering
                    Problem with WSLIPA fonts
                TeX file corruption over networks
        want enumerate labels to include nested numbers, too

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

Date: Wed, 18 Jul 90 17:21:25 EDT
From: mernst@theory.lcs.mit.edu (Michael Ernst)
Subject: help with indenting paragraphs
Keywords: LaTeX, paragraph, indent

> There are two (similar) things that I'd like to be able to do,
> but my TeXnique isn't up to figuring out how.
> 
> (1) specifying some text that will be inserted
> at the beginning of every line of the next paragraph.  E.g.,
> 
> \linebegin{foo}
> blah blah blah
> ...
> blah blah blah
> 
> would yield
> 
> fooblah blah blah
> foo...
> fooblah blah blah
> 
> (2) specifying some text such that the beginning of every line
> of the next paragraph will be indented by as much space as
> that text would take up if it appeared at the beginning of the line
> (i.e., something like \linebegin{\phantom{foo}}).

My solution to the first problem is based on a line numbering macro by
"drstrip@sandia-2.arpa"; I've enclosed my modification and the original as
well.  It requires that the paragraph to be \linebeginned be an argument to
the macro.  If this is a nuisance, then you can use the same (plain TeX)
mechanisms (e.g., \prevgraf) to set this up for a larger body of text.  To
do a single paragraph, you could probably use \everypar to do some work for
you: it would \linebegin the previous paragraph, then redefine itself to
not do so any longer.  I haven't thought this through.  The code may look
scary at first, but if you follow it in the TeXbook, it's not so bad.

The second problem can be solved as you suggest, but it seems that it would
be more sensible to simply change the width of the paragraph being set (for
instance, as the display environments do).

					-Michael Ernst
					 mernst@theory.lcs.mit.edu 

%---------------- cut here for solution to problem 1 ----------------

% -*- Mode: TeX -*- 
% for LaTeX
\documentstyle{article} % 10pt if not specified

\begin{document} 

% Originally by drstrip@sandia-2.arpa
% Modified by Michael Ernst, mernst@theory.lcs.mit.edu

%The macro takeapart breaks up the current list by grabbing, in sequence,
%the lastbox, the lastskip, (then unskipping to remove it from the list)
%then the lastpenalty (and unpenalty'ing to remove it from the list). The
%parts are then reassembled into a working list, with the prefix
%prepended to the box. The unvbox is to keep the pieces at the same level.
\def\takeapart{\setbox16=\lastbox\dimen15=\lastskip\unskip\count16=\lastpenalty
\unpenalty
\global\setbox15=\vbox{\penalty\count16\vskip\dimen15%
\hbox{\unhcopy17\box16}\unvbox15}
\advance\count15 by -1}

%The operation of this macro is fairly simple if you accept that 
%takeapart works. We format the paragraph, then save its length in 
%lines. Using that as a counter, we loop, calling takeapart to
%move the lines from the original paragraph to the current box. We
%finish by unboxing, so that the paragraph appears on the page list
%as if nothing had been done to it.
\def\linebegin#1#2{
\setbox17=\hbox{#1}
\setbox10=\vbox{\hsize 5in #2\par
\count15=\prevgraf
\setbox15=\vbox{}
\loop \takeapart \ifnum \count15 >1 \relax \repeat}
\unvbox15}

\linebegin{foo}{Many \TeX\ users have requested a capability to number lines in
a paragraph (or some other unit of text). Here is such a macro. It works by
taking apart the vertical list produced by the linebreaking routine, one
line at a time, prepending the line with a number, and stacking the lines
back up again. Because it takes the glue into account, the line numbers stay
correct even for irregularly space lines, such as occur when {\Huge LARGE 
FONTS} are used in the middle of a paragraph. Since the macro uses the line
count from $\backslash$prevgraf, a display in the middle of a paragraph will
cause the macro to fail. Since the macro unboxes its contents before adding
them back to the list, \TeX\ can break pages in the middle of a line numbered
paragraph. It would be a relatively small change to have numbers continue
from paragraph to paragraph. I must admit, I'm not sure how to restart
numbers at the top of the page. A change to the output routine, of course,
to reset the counter, but by then numbers have been assigned to lines that
may appear on a page. Perhaps that box will have to be taken apart again,
but I'm not sure how.}

\end{document}

%---------------- cut here for original linenumbers macro ----------------

Date: 31 Mar 88 12:41:00 MST
From: <drstrip@sandia-2.arpa>
Subject: line numbering tex output - a partial solution

On several occasions the question has been asked to how to force TeX to number 
output. Here is  a simple macro that works for simple cases.

\font\svntnrm=cmr17

%The macro takeapart breaks up the current list by grabbing, in sequence,
%the lastbox, the lastskip, (then unskipping to remove it from the list)
%then the lastpenalty (and unpenalty'ing to remove it from the list). The
%parts are then reassembled into a working list, with the line number
%prepended to the box. The unvbox is to keep the pieces at the same level.
%this macro also takes care of decrementing the line number counter.
\def\takeapart{\setbox16=\lastbox\dimen15=\lastskip\unskip\count16=\lastpenalty
\unpenalty
\global\setbox15=\vbox{\penalty\count16\vskip\dimen15%
\hbox{\hbox to \wd17{\hfil\sevenrm\the\count15}\hskip 2em\box16}\unvbox15}
\advance\count15 by -1}

%The operation of this macro is fairly simple if you accept that 
%takeapart works. We format the paragraph, then save its length in 
%lines. Using that as a counter, we loop, calling takeapart to
%move the lines from the original paragraph to the current box. We
%finish by unboxing, so that the paragraph appears on the page list
%as if nothing had been done to it.
\def\linenumbers#1{
\setbox17=\hbox{\sevenrm 99}
\setbox10=\vbox{\hsize 5in #1\par
\count15=\prevgraf
\setbox15=\vbox{}
\loop \takeapart \ifnum \count15 >1 \relax \repeat}
\unvbox15}

\linenumbers{Many \TeX\ users have requested a capability to number lines in
a paragraph (or some other unit of text). Here is such a macro. It works by
taking apart the vertical list produced by the linebreaking routine, one
line at a time, prepending the line with a number, and stacking the lines
back up again. Because it takes the glue into account, the line numbers stay
correct even for irregularly space lines, such as occur when {\svntnrm LARGE 
FONTS} are used in the middle of a paragraph. Since the macro uses the line
count from $\backslash$prevgraf, a display in the middle of a paragraph will
cause the macro to fail. Since the macro unboxes its contents before adding
them back to the list, \TeX\ can break pages in the middle of a line numbered
paragraph. It would be a relatively small change to have numbers continue
from paragraph to paragraph. I must admit, I'm not sure how to restart
numbers at the top of the page. A change to the output routine, of course,
to reset the counter, but by then numbers have been assigned to lines that
may appear on a page. Perhaps that box will have to be taken apart again,
but I'm not sure how.}
\end

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

Date: Tue, 17 Jul 90 17:58:50 NZS
From: dobcsany@maths.aukuni.ac.nz
Subject: TeX most recent version
Keywords: TeX, versions

Hi TeX People,

I am a newcomer in the TeX world, but unfortunately my first meeting 
with  this wonderful world was not really successful. The story is that 
I had ordered the most recent version of TeX with some books from Maria 
Code the only distributor I knew. I got an "ASCII Standard Dist. Tape 
TeX version 2.9" and a "Font Library in VAX/VMS format". It is my fault, 
because I wasn't circumspect enough, when I made the order. I have a Sun 
SPARCStation with Sun UNIX OS Release 4.0.3c, and I am afraid of that I 
can't install this stuff.

Where can I find TeX for the above configuration?

Could you, please help me, and explain what I need to do ? (I am 
beginner !!!)

Thanks
          Peter Dobcsanyi     e-mail: dobcsanyi@math.aukuni.ac.nz

          Math. Dept.
          University of Auckland
          Auckland
          Private Bag
          New Zealand

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

Date: Tue, 10 Jul 1990 20:37 PDT
From: Don Hosek <DHOSEK@HMCVAX.CLAREMONT.EDU>
Subject: Announcing a California TeX Users Group
Keywords: TeX Users Group, California

Are you interested in joining a California TeX Users Group? One
is being formed as you read this...

What it will do--

  The California group will have frequent meetings and workshops
  to help promote the intelligent use of TeX and the spread of
  TeX into new areas. An inaugural meeting is planned for some
  weekend in the next few months (the date and location are to be
  announced) and at least two workshops will be offered in
  conjunction with the meeting. We will also be setting up
  channels for the exchange of local documentation and software
  as well as helping TUG with any activities it might hold in
  California.

What to do if you're interested--

  First, let me know. Send me a mail message with:
    o Your name
    o Your postal address
    o Your e-mail address
    o Your phone number

  If you can, volunteer to help. Can your site serve as a host
  for meetings or workshops? (we're still looking for a site for
  the first meeting) Can you teach any workshops? Do you have
  any suggestions for what a California TeX group should/could
  do? Can you think of anything you can do that's not listed
  here?


Looking forward to hearing from everybody...

 -Don Hosek
 Quixote
 440F Grinnell 
 Claremont, CA 91711
 714-625-0147
 dhosek@ymir.claremont.edu

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

Date: Tue, 10 Jul 90 18:01:43 IST
From: "Jacques J. Goldberg" <PHR00JG@TECHNION>
Subject: PostScript printers with certain attributes
Keywords: PostScript, printer

One of my Colleagues asks me, and I therefore ask you:

Is there anything on the market that would:
1-be hundred per cent compatible with the Apple LaserWriter as regards the
internal processor? The machine is used for research  on chaos and the
graphs are generated by a PostScript program loaded into  the machine.
The compatibility must thus be complete.
2-have about double linear resolution ( approx 500-600 dpi)?
3-have a faster PostScript processor even if nominal  print speed is the
same?
4-be supported by some DVIdriver a la dvialw?

We do not demand that it be cheaper than the ALW.
                                                 Jacques Goldberg

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

Date:  Tue, 10 Jul 90 17:36:05 IST
From: "Jacques J. Goldberg" <PHR00JG@TECHNION>
Subject:  Networking TeX files.
Keywords: TeX, networks

Comments to a recent note about moving TeX files across networks show
that I did not express myself properly.
I did *NOT* suggest to systematically write error prone characters using their
numerical codes to begin with nor to end with, but to apply to outgoing
files a filter replacing such characters by their corresponding \charxxx
for the duration of the trip, and to apply to the incoming file the
complementary filter restoring the original file, free from network corruption.

I agree and apologize for a serious omission in my mail: I completely forgot
the IBM/MVS system -- an other sign of advanced senility, in view of past
Joy-of-JCL days!
                                          Jacques J. Goldberg

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

Date: Mon, 9 Jul 90 14:08:36 EDT
From: Albert Chin <albert@mamia>
Subject: TeX on Apple IIGS
Keywords: TeX, Apple

Just thought I'd let you know how this project was coming along. So
far, Tangle 4.0 and Weave 4.1 have been ported to the Apple IIGS in C.
Our Pascal compiler could not handle the arrays over 64K so I ported
it all to C using a Pascal to C translator.

I am currently working on the changefile for TEX.WEB and should have it
running within the next month. I will post you then and let you know. 
Metafont will then be converted and the TeX community will know. Please 
do not post this message until then.

Thanks,

albert chin ... mthvax!mamia!albert

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

Date: Mon, 9 Jul 90 21:15:29 EDT
From: Mike Conlon <mconlon@holly.stat.ufl.edu>
Subject: nroff to TeX
Keywords: TeX, nroff

Is there an nroff to TeX converter? I sure would like to incorporate
manual pages into TeX documents.

Mike Conlon
Dept. of Statistics
University of Florida
mconlon@bstat.stat.ufl.edu

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

Date: Mon, 9 Jul 90 12:15:31 cdt
From: carlson%csfsa@cs.umn.edu (Bryan Carlson)
Subject: Help with doublecolumns of names with addresses
Keywords: TeX, doublecolumns

I am doing an alumni directory for our department in TeX.  It 
contains running double-columns of names with addresses.  What
I would like is for TeX to take the first name that appears
on each page and put at the top or in a header.  Knuth's TeXbook
says this is difficult to do but possible but his explanation
using marks is just too hard for me to follow.  Can anyone
help?  If you can help, get in touch with me.
(carlson%csfsa.cs.umn.edu@umnacvx.bitnet) 

Thanks, 

Bryan Carlson

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

Date: Mon, 09 Jul 90 11:12:14 +0100
From: "D.Wujastyk" <ucgadkw@ucl.ac.uk>
Subject: macros for line numbering
Keywords: macros, line numbering

In answer to your query in TeXhax 90.51, about macros for formatting a
critical edition, I should like to bring EDMAC to your attention.  This
is a set of macros written by John Lavagnino (lav@brandeis.bitnet) with
additions by me, for doing exactly what you want.  EDMAC works out the
line numbers, attaches them every 5 lines (or whatever you choose), and
permits notes in the text to be printed as a proper critical apparatus,
i.e., variant readings are referenced by line number (not superscript
footnote numbers) and the footnotes may be formatted in a paragraph,
with notes run-on.  Several layers of notes are catered for, for
testimonia, explanatory notes, and so on.  There are other features.

If you are interested in pursuing this (it's all free), send me a 3.5in
DOS diskette, and your address, and I'll send you the stuff.

EDMAC has been stable for a year or two, but is currently undergoing
major revision by John.  If you want to join the discussion about this
revision, join the discussion group by sending the message "subscribe
edmac John Kesich" to mailbase@newcastle.ac.uk.  You will receive
further information automatically.

Best wishes,

Dominik


 Dominik Wujastyk,         | Janet:                       D.Wujastyk@uk.ac.ucl 
 Wellcome Institute for    | Bitnet/Earn/Ean/Uucp:        D.Wujastyk@ucl.ac.uk
  the History of Medicine, | Internet/Arpa/Csnet:        dow@wjh12.harvard.edu
 183 Euston Road,          |           or:   D.Wujastyk%ucl@nsfnet-relay.ac.uk
 London NW1 2BN, England.  | Phone no.:                 +44 71 383-4252 ext.24  
-------------------------------------------------------------------------------

Date: Mon, 9 Jul 90 11:30 MET
From: "Johannes L. Braams" <JL_Braams@pttrnl.nl>
Subject: Problem with WSLIPA fonts
Keywords: WSLIPA fonts


    Hi,

        I have copied the Washington University IPA fonts from one of the
        fileservers (LISTSERV@DHDURZ1 to be precise) but get some errors
        generating the slanted versions, WSLIPA8-WSLIPA17. The following
        sequence of errors occured when running METAFONT on WSLIPA8.MF:
  ...
> 0 ENE 1 NNE 2 3 (ENE ESE SSE) SSW 0 (SSE ESE)
! Strange path (turning number is zero).
<to be read again>
                   ;
l.34 filldraw z5r--z6l--z6r--z5l---cycle;
                                           % middle tip
?
[24]
> 0 ENE 1 NNE 2 3 (ENE ESE SSE) SSW 0 (SSE ESE)
! Strange path (turning number is zero).
<to be read again>
                   ;
l.67 filldraw z5r--z6l--z6r--z5l---cycle;
                                           % middle tip
?
[25]
> 0 ENE 1 NNE 2 3 (ENE ESE SSE) SSW 0 (SSE ESE)
! Strange path (turning number is zero).
<to be read again>
                   ;
l.103 filldraw z5r--z6l--z6r--z5l---cycle;
                                                            % middle tip
?
[26]
> 0 ENE 1 NNE 2 3 (ENE ESE SSE) SSW 0 (SSE ESE)
! Strange path (turning number is zero).
<to be read again>
                   ;
l.149 filldraw z5r--z6l--z6r--z5l---cycle;
                                            % middle tip
?
[27] [83] [41] [50] [51] [89] [91] [62] [63] [33] [32] [31] [2] [9] [67]
    ...
        When running METAFONT on the other sizes (9 10, 11, 12, 17) the same
        errors occured (not always all).
        Comparing the resultant font with bitmaps we obtained from WSU
        using testfont.tex revailed no (visible) differences.

        I'm no METAFONT expert, what should I do? The fonts look good,
        but getting errors worries me a little.

    Regards,

        Johannes Braams

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

Date: Sun, 8 Jul 90 22:05:55 cdt
From: Maschler MEDS <maschler@max.kellogg.nwu.edu>
Subject: TeX file corruption over networks
Keywords: TeX, file, corruption

There has been recently some discussion concerning a safe transfer
of TeX files over networks (Jacques Goldberg TeXhax #48, Chris Thompson
TeXhax #51). Here is a safe way to transfer such files, and in fact, even 
binary files:

Run your file through a program called xxencode. It will convert all the 
bytes into ascii {\it letters}. Send the resulting file. Your partner
at the other node can then xxdecode the file and get the original.
(The more familiar programs uuencode/uudecode are not good enough, since 
they employ non-letter ascii codes on which there is no accepted
agreement.)

One way to obtain these files is from Simtel (or various Listserves,
or various Trickles). 
In Simtel it is located in PD1:<MSDOS.ARC-LBR>. One good version is:
QXXNCD and QXXDCD. I do not remember the exect archive name.
This is a fast and reliable pair.

Michael Maschler

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

Date: Tue, 3 Jul 90 10:48:43 CDT
From: phil@pex.eecs.nwu.edu (William LeFebvre)
Subject: want enumerate labels to include nested numbers, too
Keywords: LaTeX, enumerate labels, nested numbers

I was able to tell him how to do this, but I wanted to forward this
to the "toughies" list to se if anyone knew of a style option that
is already designed to do what he wants.

Here is the message.

Date:         Mon, 02 Jul 90 15:01:39 +0300
From: Steve Manch <RAMANCH%WEIZMANN.BITNET@forsythe.stanford.edu>
To: LaTex-help@sumex-aim.stanford.edu

Gentlemen:
  I frequently used the  following style in conjunction
with enumerate: 2.1, 2.2.. after the enumerated item.
Presently after using \begin{enumerate}\item \item..
I do the following: \def\labelitemi{2.1} and then
\beginitemize \item ..  having to redefine \labelitemi each time.
  Is is possible to make a style that would do the
equivalent (make a decimal extension of a given
enumerated item automatically?


Here is some clarification:

He wants:

\begin{enumerate}
  \item ...
  \item ...
  \begin{enumerate}
    \item ...
    \item ...
  \end{enumerate}
\end{enumerate}

to produce:

    1.  ...
    2.  ...
        2.1.  ...
        2.2.  ...


The following \renewcommands in the preamble will do it for level 2:

\renewcommand{\labelenumii}{\theenumi.\theenumii.}
\renewcommand{\theenumii}{\arabic{enumii}}

Levels 3 and 4 are left as exercises....  :-)

Does anyone know of an already existing style option that will do
this for him?  I looked on clarkson and couldn't find anything.

		William LeFebvre
		Computing Facilities Manager and Analyst
		Department of Electrical Engineering and Computer Science
		Northwestern University
		<phil@eecs.nwu.edu>

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

%%% Further information about the TeXhax Digest, the TeX
%%% Users Group, and the latest software versions is available
%%% in every tenth issue of the TeXhax Digest.
%%%
%%% Concerning subscriptions, address changes, unsubscribing:
%%%
%%%  BITNET: send a one-line mail message to LISTSERV@xxx
%%%         SUBSCRIBE TEX-L <your name>    % to subscribe
%%%      or UNSUBSCRIBE TEX-L
%%%
%%% Internet: send a similar one line mail message to
%%%           TeXhax-request@cs.washington.edu
%%% JANET users may choose to use
%%%           texhax-request@uk.ac.nsf
%%% 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
%%%
%%%\bye
%%%

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