UKTeX V89 #32       Friday 8 September 1989

                           MF/INIMF etc. for the PC
                           new release of transfig
                                 Japanese TeX
                                japanese fonts
                            Trigonometry in \TeX !
                             TeX and readability
                            LaTeX bug or feature?
                                   DVItoVDU
                                   DYNA.STY

Editor Peter Abbott

I apologise in advance for any errors but I am pushed for time. 
TeXhaX 80 has arrived but is not yet redistributed.

Off to Karlsruhe on Monday so next weeks issue MAY be delayed.

Latest TeXhax in the Archive is #79
Latest TeXmag in the Archive is V3N3                      


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

Via: UK.AC.RUTHERFORD.MAIL; Tue, 5 Sep 89  12:45 BST
Received: from UKACRL by UK.AC.RL.IB (Mailer X1.25) with BSMTP id 7696; Tue, 05
          Sep 89 12:44:05 BS
Received: from EDVZ.Uni-Wien.AC.AT by UKACRL.BITNET (Mailer X1.25) with BSMTP
          id 8613; Tue, 05 Sep 89 12:44:04 B
Received: by AWIUNI11 (Mailer R2.01) id 9524; Tue, 05 Sep 89 13:45:16 MEZ
Date:     Tue, 05 Sep 89 13:38:13 MEZ
From:     Ewald JENISCH <A4421DAD@EARN.AWIUNI11>
Subject:  MF/INIMF etc. for the PC

Hi TeXlanders,
 
I am looking for PC-implementations of
 
    o  METAFONT(MF), INIMF
    o  TFtoPL
    o  PLtoTF
 
Has anybody ever heard of such a beastie?? Anything, public
domain, shareware or commercial will do.
 
Thanx
Ewald JENISCH
Institute of Statistics & Computer Science
Univ. of Vienna, Austria
E-Mail: A4421DAD@AWIUNI11.BITNET
 
PS: Please reply directly to my address, as the UKTeX digests sometimes
    doesn't come through ... seems that the gateways between BITNET and
    JANET are getting wild from time to time...

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

Via: UK.AC.SOTON.ECS; Sun, 3 Sep 89  14:07 BST
From: Sebastian Rahtz <spqr@uk.ac.soton.ecs>
Date: Sun, 3 Sep 89 14:12:42 BST
Message-Id: <21996.8909031312@hilliard.ecs.soton.ac.uk>
Subject: new release of transfig

The UK TeX archive has been updated with version 1.4b of the
`transfig' package, which is a series of translations from Fig code
into various TeX-useful forms. See

  [tex-archive.utils.transfig]

I append the release note. If you use Fig, and haven't updated your
translators recently, do so. There are some worthwhile changes.

Sebastian Rahtz
pp archive working party

---------------------------
from release note with Transfig 1.4b
---------------------

Differences from release 4a are mainly small fixes and improvements.

Two translations from other graphics representations to Fig code are in the
works: from Xpic intermediate code and from the Unix plot format.

One issue which I've  dealt with partially in Release 4b is how to estimate
the bounding box of a text object.  If the text includes formatting
commands (LaTex or Troff), there is no good way for fig2dev to know its size.
Thus, the bounding box can end up the wrong size, leading to incorrect figure
placement.

The current solution is to have the driver specify one of two options: include
or exclude the horizontal extent of a text object from the bounding box
calculation.  So PostScript for instance must always include it, whereas 
in LaTeX picture mode it is excluded.  This means that if the bounding box
is determined by a text object, the LaTeX driver may get it wrong.

Micah Beck
beck@cs.cornell.edu
Cornell Dept. of Computer Science

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

Via: UK.AC.SOTON.ECS; Sun, 3 Sep 89  14:37 BST
From: Sebastian Rahtz <spqr@uk.ac.soton.ecs>
Date: Sun, 3 Sep 89 14:42:25 BST
Message-Id: <22519.8909031342@hilliard.ecs.soton.ac.uk>
Subject: Japanese TeX

A version of TeX for typesetting Japanese is now in the UK TeX
archive, in a directory hierarchy under
 [tex-archive.langs.jtex]

This is the `miniJTeX' package, which means that it does NOT include a
complete set of Japanese fonts. Although some fonts are included, they
are not those referenced by the supplied macros, and you will have to
acquire your own set of a great many characters! (the documentations
tells you where to go for them).

I installed this package, intending to test it, but unfortunately
 a) I couldn't work out how to substitute the fonts I DID have
    on the system for the ones that macros wanted (my knowledge of
    Japanese is limited...)
 b) the replacement for LaTeX's `lplain' was corrupt (I'm chasing this
    up)

Best of luck
 
Sebastian Rahtz, Computer Science, Southampton

pp archive working party

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

Via: UK.AC.SOTON.ECS; Tue, 5 Sep 89  21:31 BST
From: Sebastian Rahtz <spqr@uk.ac.soton.ecs>
Date: Tue, 5 Sep 89 21:27:58 BST
Message-Id: <6210.8909052027@hilliard.ecs.soton.ac.uk>
Subject: japanese fonts

My announcement about Japanese TeX macros forgot to mention that
there are a set of fonts in the archive, but in .tfm and .pk
format only. These are Unix files, so VMS users will not find
them of much use by all accounts. They are in
 [.langs.jtex.tfm]
 [.langs.jtex.pk300]

the archive policy is NOT to store binary files like this which
can not be used on all machines, but since we have no source for
these files, and since the .tfms are no use without the .pk, I have
left the files as they arrived from Japan

Sebastian Rahtz

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

Via: UK.AC.RHBNC.VAXB; Wed, 6 Sep 89  18:36 BST
Date:		Wed,  6 SEP 89 18:36:43 BST
From:		CHAA006@UK.AC.RHBNC.VAXB
Subject:        Trigonometry in \TeX !
Sender:         JANET"CHAA006@UK.AC.RHBNC.VAXB" <CHAA006@UK.AC.RHBNC.VAXB>
Reply-to:       Philip Taylor (RHBNC) <P.Taylor@Uk.Ac.Rhbnc.Vaxb>
Originally-to:  $TEX-HAX,$EURO-TEX,$UK-TEX
Mailer:         Janet_Mailshr V3.4 (23-May-1989)

At TUG '89, Kees van der Laan asked about the implementation/availability of
trig. functions in TeX, and I promised to send him some code which I had
written.  Unfortunately I've lost Kees' address, but I hope that he reads one
of these three lists (Kees, are you there ?); anyhow, the routines may be of
use/interest to others, particularly those who want to perform geometric
transformations on embedded PostScript figures.  ** Phil. 

					Philip Taylor
			    Royal Holloway and Bedford New College.

= = = = = = = = = = = = = T R I G O N O M E T R Y . T E X = = = = = = = = = = = 

%%% Trigonometry.TeX:

%%% Routines to calculate the sine of an angle expressed in radians.
%%% So far as I can tell, the results are accurate to four places
%%% of decimals, for arguments in the range -pi/2 .. pi/2, except
%%% for `ridiculously small' arguments, which cannot be accurately represented.

%%% The routines for cosine and tangent are left to the reader ...

%%% After a call to \Sin (<angle>), the result is available for typesetting
%%% or boxing, and may also be extracted from the control-sequence \sine.

%%% Grouping is used to hide most things, but the following csnames are
%%% globally defined:

%%% \nodimen, \n@dimen, \product, \sine, \term, \t@rm, \Term

\newif \ifdebug %%% turn me on to see TeX hard at work ...

\def \term #1{{x^{#1} \over #1!}}
The power series expansion for $\sin$ is: 
$$ \sin x = x - \term3 + \term5 - \term7 + \cdots$$
\indent and for $\cos$ is:
$$ \cos x = 1 - \term2 + \term4 - \term6 + \cdots$$

\let \then = \relax
\chardef \letter = 11
\chardef \other = 12
\def \radian {pt }
\let \radians = \radian
\let \dimensionlessunit = \radian
\let \dimensionlessunits = \dimensionlessunit
\def \internalunit {sp }
\let \internalunits = \internalunit
\newif \ifstillconverging
\def \Message #1{\ifdebug \then \message {#1} \fi}

{ %%% Things that need abnormal catcodes %%%
	\catcode `\@ = \letter
	\gdef \nodimen {\expandafter \n@dimen \the \dimen}
	\gdef \term #1 #2 #3%
	       {\edef \t@ {\the #1}%%% freeze parameter 1 (count, by value)
		\edef \t@@ {\expandafter \n@dimen \the #2\radian}%
				   %%% freeze parameter 2 (dimen, by value)
		\t@rm {\t@} {\t@@} {#3}%
	       }
	\gdef \t@rm #1 #2 #3%
	       {{%
		\count 0 = 0
		\dimen 0 = 1 \dimensionlessunit
		\dimen 2 = #2\relax
		\Message {Calculating term #1 of \nodimen 2}%
		\loop
		\ifnum	\count 0 < #1
		\then	\advance \count 0 by 1
			\Message {Iteration \the \count 0 \space}%
			\Multiply \dimen 0 by {\dimen 2}%
			\Message {After multiplication, term = \nodimen 0}%
			\Divide \dimen 0 by {\count 0}%
			\Message {After division, term = \nodimen 0}%
		\repeat
		\Message {Final value for term #1 of 
				\nodimen 2 \space is \nodimen 0}%
		\xdef \Term {#3 = \nodimen 0 \radians}%
		\aftergroup \Term
	       }}
	\catcode `\p = \other
	\catcode `\t = \other
	\gdef \n@dimen #1pt{#1} %%% throw away the ``pt''
}

\def \Divide #1by #2{\divide #1 by #2} %%% just a synonym

\def \Multiply #1by #2%%% allows division of a dimen by a dimen
       {{%%% should really freeze parameter 2 (dimen, passed by value)
	\count 0 = #1\relax
	\count 2 = #2\relax
	\count 4 = 65536
	\Message {Before scaling, count 0 = \the \count 0 \space and
			count 2 = \the \count 2}%
	\ifnum	\count 0 > 32767 %%% do our best to avoid overflow
	\then	\divide \count 0 by 4
		\divide \count 4 by 4
	\else	\ifnum	\count 0 < -32767
		\then	\divide \count 0 by 4
			\divide \count 4 by 4
		\else
		\fi
	\fi
	\ifnum	\count 2 > 32767 %%% while retaining reasonable accuracy
	\then	\divide \count 2 by 4
		\divide \count 4 by 4
	\else	\ifnum	\count 2 < -32767
		\then	\divide \count 2 by 4
			\divide \count 4 by 4
		\else
		\fi
	\fi
	\multiply \count 0 by \count 2
	\divide \count 0 by \count 4
	\xdef \product {#1 = \the \count 0 \internalunits}%
	\aftergroup \product
       }}

\def \Sin (#1)%
       {{%
	\dimen 0 = #1 \radian
	\dimen 2 = 3.1415926535897963 \radian %%% a well-known constant
	\divide	\dimen 2 by 2 %%% we only deal with -pi/2 : pi/2
	\ifdim	\dimen 0 > \dimen 2
	\then	\message {Sin: argument (\nodimen 0) too large 
						--- use range reduction}%
		\xdef \sine {<undefined>}%
	\else	\ifdim	\dimen 0 < - \dimen 2
		\then	\message {Sin: argument (\nodimen 0) too large 
						--- use range reduction}%
			\xdef \sine {<undefined>}%
		\else	\Message {Sin: calculating Sin of \nodimen 0}%
			\count 0 = 1 %%% see power-series expansion for sine
			\dimen 2 = 1 \radian %%% ditto
			\dimen 4 = 0 \radian %%% ditto
			\loop
				\ifnum	\dimen 2 = 0 %%% then we've done
				\then	\stillconvergingfalse 
				\else	\stillconvergingtrue
				\fi
				\ifstillconverging %%% then calculate next term
				\then	\term {\count 0} {\dimen 0} {\dimen 2}%
					\advance \count 0 by 2
					\count 2 = \count 0
					\divide \count 2 by 2
					\ifodd	\count 2 %%% signs alternate
					\then	\advance \dimen 4 by \dimen 2
					\else	\advance \dimen 4 by -\dimen 2
					\fi
			\repeat		
			\xdef \sine {\nodimen 4}%
		\fi
	\fi
	\aftergroup \sine
       }}

%%% What follows is just a demonstration of the \Sin function

$$
\def \rule {\noalign {\hrule}}
\def \SIN (#1){&#1&&\Sin (#1)&\cr\noalign{\message {The sine of #1 is \sine}}}
\mathcode `\- = 32768 %%% just a bodge to improve alignment
\let \minus = -
\begingroup 
\catcode `\- = \active
\gdef -{\llap{\minus}}
\endgroup
\vbox {\offinterlineskip
\halign
{\vrule #& \qquad \hfil $#$ & \vrule # & \qquad $#$ \hfil & \vrule # \strut \cr
	\rule
	&\omit {\hfil $x$ \hfil} && \omit {\hfil $\sin x$ \hfil} & \cr
	\rule
	\SIN (-1.6)
	\SIN (-1.5)
	\SIN (-1.4)
	\SIN (-1.3)
	\SIN (-1.2)
	\SIN (-1.1)
	\SIN (-1.0)
	\SIN (-0.9)
	\SIN (-0.8)
	\SIN (-0.7)
	\SIN (-0.6)
	\SIN (-0.5)
	\SIN (-0.4)
	\SIN (-0.3)
	\SIN (-0.2)
	\SIN (-0.1)
	\SIN (-0.01)
	\SIN (-0.001)
	\SIN (-0.0001)
	\SIN (0)
	\SIN (0.0001)
	\SIN (0.001)
	\SIN (0.01)
	\SIN (0.1)
	\SIN (0.2)
	\SIN (0.3)
	\SIN (0.4)
	\SIN (0.5)
	\SIN (0.6)
	\SIN (0.7)
	\SIN (0.8)
	\SIN (0.9)
	\SIN (1.0)
	\SIN (1.1)
	\SIN (1.2)
	\SIN (1.3)
	\SIN (1.4)
	\SIN (1.5)
	\SIN (1.6)
	\rule}
}
$$
\end

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

Via: UK.AC.SHEFFIELD.PRIMEA; Thu, 7 Sep 89   9:53 BST
Date:         Thu, 07 Sep 89 09:56:48
From:         Mike Piff  <PM1MJP @ SHEFFIELD.PRIMEA>
Subject:      TeX and readability

A thought about readability, and a difficult problem for TeX hackers...

How do you force TeX not to start two consecutive lines of a paragraph
with the same word?

- ---
From:  Dr M. J. Piff,
       Department of Pure Mathematics, University of Sheffield,
       The Hicks Building, Hounsfield Road, SHEFFIELD S3 7RH, England.
       Telephone SHEFFIELD(0742) 768555 Extension 4431.
       JANET address: PM1MJP@UK.AC.SHEF.PA  or PM1MJP@UK.AC.SHEF.IBM
- ----------------------------------------------------------------------------

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

Via: [000052600001.SPCP.FTP.MAIL.ISOCEPT]; Thu, 7 Sep 89  15:14 BST
Date:     Thu, 07 Sep 89 15:18:50 BST
From:     Jon Warbrick <C20222@UK.AC.POLY-SOUTH-WEST.PRIME-A>
Subject:  LaTeX bug or feature?

This file:

   \documentstyle{article}
   \begin{document}
   \include{part1}
   \addtocontents{toc}{\protect\newpage}
   \include{part2}
   \end{document}

when processed by LaTeX produces the following .AUX file:

   \relax
   \@input{part1.aux}
   \@input{part2.aux}
   \@writefile{toc}{\string\newpage\space }

Notice how the \@writefile generated by the \addtocontents comes after
the part2.aux file is input rather than before as you might expect.
As a result, when the .aux files are processed at the end of the job
the table of contents entries for part2 appear in the .toc file
*BEFORE* the \newpage rather than after as was intended.

This happens because, in the definition of \include, the write to the
.aux file is proceded by an \immediate but in the definition of
\addtocontents there there isn't one.  As far as I can see there
should either be an \immediate in both or in neither.  A work around
is to move the \addtocontents into part2.tex, but is this something
that can or should be fixed?

Jon.

----------------------------------------------------------------------
Jon Warbrick, Computing Service,          Plymouth (0752) 233913 (ddi)
Polytechnic South West, --.
Drake Circus,             `-->  Polytechnic South West was formed from
Plymouth PL4 8AA UK.            Plymouth Polytechnic on 1st April 1989

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

Via: UK.CO.IST.UPPER; Tue, 5 Sep 89  17:08 BST
Subject: DVItoVDU
Date: Mon, 4 Sep 89 16:49:09 WET DST
From: iwm@uk.ac.ic.doc
Sender: iwm@uk.ac.ic.doc
Message-ID:  <8909041649.aa03644@tgould.doc.ic.ac.uk>

I am trying to run get DVIToVDU running on a Vt100 or Vt200 using the 
Pascal versions from the Archives and find that in several places output lines 
are overlaid: one line is displayed and the next one on top. Using a debugger 
I find that the same row number is passed to the screen driver. I had
to make several changes to get the program working on Berkeley Pascal which
refuses to index strings from 0 and has signed characters, and wonder if I
introduced some bug. Has anybody else had any eperience with these ?

Another question: the Modula-2 version causes our MOCKA compiler (sun3) to fail
with a range check, our systems people think that it is something to do with
the length and/or number of modules imported. Any MOCKA users tried this 
program ? It's our main teaching compiler and the first program I try it rolls
over and dies !

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

Via: UK.AC.POLY-EAST-LONDON; Fri, 8 Sep 89   9:09 BST
Date:     Fri, 08 Sep 89 09:11:44 GMT
From:     A42JR@UK.AC.NE-LONDON-POLY
Subject:  DYNA.STY

A user here has received a document from Germany in  LaTeX  format.   It
uses  the BOOK.STY, but also looks for DYNA.STY.  I can find no trace of
this either from our distribution tape, or in the  Aston  archive.   Has
anyone ever heard of this?

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

!!
!!   Files of interest 
!!      [tex-archive]000aston.readme           [tex-archive]000directory.list
!!      [tex-archive]000directory_dates.list   [tex-archive]000directory.size
!!      [tex-archive]000last30days.files
!!
!! Editor - I have a tape labelled TeX 2.99 LaTeX 2.09 Metafont 1.7
!! Unix 4.2/3BSD & System V. Tar 1600 bpi blocked 20 1 file dated 
!! 25 July 1989 (from washington.edu). 
!!
!!  FTP access site               uk.ac.aston.tex
!!             username           public
!!             password           public
!!
!! I have the facility to copy this tape for anyone who sends the following
!! 1 2400 tape with return labels AND RETURN postage. (2.50 pounds sterling 
!! for UK users, payable to `Aston University') Outside UK please ask me.
!! UK users send 4.25 for two tapes or 6.60 for three tapes. 
!! Send to
!!
!! P Abbott
!! Computing Service
!! Aston University
!! Aston Triangle
!! Birmingham B4 7ET
!!
!! A VMS backup of the archive requires 2 (two ) 2400' tapes at 6250bpi.
!! Remaining details as above.
!!  
!! Exabyte tape drive with Video 8 cassettes.
!! 
!! Same formats available as 1/2in tapes.  We use the following tapes
!! SONY Video 8 cassette  P5 90MP, MAXCELL Video 8 cassette P5-90
!! TDK Video 8 cassette P5-90MPB
!! Postage 35p UK (stamp please), 1 pound sterling Europe, other areas 2 pounds
!!
!! OzTeX - Send 10 UNFORMATTED (800k) disks with return postage.
!!
!!  Replies/submissions to            info-tex@uk.ac.aston   please
!!  distribution changes to   info-tex-request@uk.ac.aston   please 
!! 
!!   end of issue