% Changes.tex --- Changes to armTeX since release 2
% This file is written in LaTeX2e to provide an example of LaTeX input.

\documentclass[a4paper]{article}

% The inputenc package allows the use of special characters
% like ירס etc.
\usepackage[latin1]{inputenc}

% Define the \MF command which prints METAFONT in the special logo font.
\usepackage{mflogo}

% Define the \url|...| command for printing URLs
\usepackage{url}

\newcommand{\armtex}{arm\TeX}

\title{Changes to \armtex\ since release 2}
\author{Jakob Stoklund Olesen\\\url|stoklund@usa.net|}
\date{8. June 1998}

\begin{document}
\maketitle
This document describes the changes that were made to \armtex\ since the
second release from 1996 which was put together by Robin Watts and Bryan
Scattergood. The most important change is that this version supports
`\verb|/|' as an extension separator and fully recursive path searching. This allows the TDS to be used.

\section{Filetypes}
The filetypes (\&2a7--\&2ad) that \TeX\ and friends originally used were
not registered. (The \&ce5 type for \TeX\ files have been around for a long
time without being used). The following new filetypes have now been
properly registered with Pineapple:
\begin{center}
\begin{tabular}{rll|l}
Hex & Text     & Description         & Old type \\
\hline
\&ce5 & TeX      & \TeX\ input/output  & \&2a7 \\
\&aca & LaTeX    & \LaTeX\ input       & \&2a8 \\
\&ca0 & Metafont & \MF\ input          & \&2a9 \\
\&ca2 & GF       & Generic Font        & \&2aa \\
\&ca3 & PK       & Packed Font         & \&2ab \\
\&ca1 & TFM      & \TeX\ Font Metrics  & \&2ac \\
\&ac9 & VF       & Virtual Font        & \&2ad \\
\&ce4 & DVI      & Device Independent  & \&ce4 (no change)
\end{tabular}
\end{center}
A small BASIC program is provided which will convert the old filetypes to
new. It changes filetypes in the current directory and all the
subdirectories. Change directory to wherever you have your \TeX\ files and
say
\begin{quote}
\verb|SetTypes|
\end{quote}
in a task window.

Sprites for the old filetypes are still supplied but have been crossed over.
When you have changed the types of all the files on your hard disk
you can save a bit of memory by removing the line
\begin{quote}
\verb|IconSprites <TeX$Dir>.OldSprs|
\end{quote}
from \url|!TeX.!Boot|.

\section{The binaries}
Most of the code changes have happened in the supporting libraries which
means that they apply to all programs (\TeX, \MF, PKtoGF, \ldots). A few
are specific to the \TeX\ binary.
\begin{itemize}
\item
The WEB sources for \TeX\ and \MF\ have been updated to the latest
versions, \url|tex.web| 3.14159 and \url|mf.web| 2.718. This is not
important, only about 10 lines of code were changed. This just goes to show
how stable the sources are now.

\item
Support for files with `\verb|/|' extensions. If \TeX\ can't open
`\url|paper.tex|' it tries `\url|paper/tex|'. The extension used for output
files is determined by looking at the first file read: If it has a
`\verb|/|' extension, so will files written by
 \TeX. (Unless there happens to be a properly named directory).

\item
The current directory is stored when a program is invoked. This should
catch some errors that would occur if you changed the current directory
when running in a taskwindow.

\item
Fully recursive path searching is now supported. A path element in
\url|TeXInputs$Path| that ends with a double dot (\verb|..|) is searched
recursively to any level. A directory will only be used to look for input
files if either
\begin{enumerate}
\item it has subdirectories.
\item it contains files with an extension (files with `\verb|/|' in
their name).
\end{enumerate}
The input directories are scanned at startup and the directory list is
cached. To speed up this caching you can put a file called
`\url|!NoExpand|' in directories that only hold files and ``leaf
directories''. Then no further subdirectories will be searched. If you have a
directory containing lots of subdirectories which only has `\url|sty|' files,
this is a good idea. An even better idea would be to restructure the
directory to use `\verb|/|' extensions. This saves a lot of disc space as
each directory takes 2Kb.

If you have a directory of input files (not directories) and none of them
has a `\verb|/|' in their filename, the directory will be ignored. Just put
a file called `\url|dummy/tex|' (or any name containing a `\verb|/|') in the
directory.

Please note that this version does \emph{not} look for `\url|.sty|' files
without a suffix. The old version would also try to open the file named
`\url|article|' when asked for `\url|article.sty|'.

\item
The `cannot find default format' bug has been fixed. This happened when
virtex was invoked without specifying a format e.g., with
\begin{quote}
\verb|virtex story.tex|
\end{quote}

\item
When calling \verb|MakeTeXTFM| and \verb|MakeTeXTeX|, \verb|sh| is no
longer invoked i.e., \TeX\ simply says `\verb|MakeTeXTFM cmr10.tfm|' when
`\url|cmr10.tfm|' is missing.

\item
The behaviour when you ask for a file with no extension such as
`\verb|\input paper|' is more sensible. Here is how a file is searched
for:
\begin{enumerate}
\item
If there is no extension in the filename the default extension is added.

\item
In each directory on the search path, the filename is tried first with the
given extension delimiter and then the opposite one (`\verb|.|' is
exchanged with `\verb|/|').

\item
If the file still can't be found add the default extension and try again
(unless the extension has already been added).

\item
Call \verb|MakeTeXTeX| (or \verb|MakeTeXMF|) and try again.
\end{enumerate}

\item
A lot of time has been spent on improving the speed of path searches. This
shouldn't affect the way \TeX\ behaves although strange things may happen
if files with identical names appear in different directories. This only
happens between directories which have the same ancestor on
\verb|TeXInputs$Path|. For instance with the default values
\begin{quote}
\verb|Set texmf$Path <TeX$Dir>.LowMemory.,<TeX$Dir>.texmf.|\\
\verb|Set TeXInputs$Path texmf:tex..|
\end{quote}
subdirectories of \url|LowMemory.tex| will always be searched before
subdirectories of \url|texmf.tex|. The search order between subdirectories
of \url|texmf.tex| is undefined and indeed will change during a \TeX\ run.
\end{itemize}


\section{The directory structure}
Perhaps the biggest change in this distribution is that the TDS (\TeX\
Directory Structure) has been adopted. This is described in the paper
\url|texmf:doc.general.tds.tds/tex| with the notable difference that fonts
are still stored in Paul Field's \url|!TeXFonts| directory.

\end{document}
