\documentclass[11pt]{article}
\usepackage{t1enc,a4,epsfig,moreverb,float,hyper}

\newcommand{\poistovedoksesta}[1]{}\newcommand{\vedos}[1]{#1}       %vedos
\renewcommand{\poistovedoksesta}[1]{#1}\renewcommand{\vedos}[1]{}

\setlength{\parindent}{0pt}
\setlength{\textwidth}{160mm}
\setlength{\parskip}{2ex}
\setlength{\oddsidemargin}{0cm}
\setlength{\evensidemargin}{0cm}
\setlength{\textheight}{24cm}
\setlength{\topmargin}{-15mm}

\newcommand{\tiedosto}[1]{\texttt{#1}}
\providecommand{\url}[1]{\texttt{<URL #1>}}
\providecommand{\lb}{\linebreak[3]}
\providecommand{\vino}{/\lb}
\newcommand{\V}[1]{\mathbf{#1}}
\providecommand{\MF}{Metafont}
\newcommand{\dvi}{DVI} 
\newcommand{\te}{Techexplorer}
\newcommand{\enstex}{\tiedosto{ens.tex}}
\newcommand{\enssty}{\tiedosto{ens.sty}}
\newcommand{\ensstytex}{\tiedosto{ens-sty.tex}}
\newcommand{\latexpaketti}[1]{\textsf{#1}}
\newcommand{\bibotsikko}[1]{\emph{#1}}
\newcommand{\bibinternetotsikko}[1]{\emph{#1}}
\newcommand{\bibjutunotsikko}[1]{#1}
\newcommand{\biblehdennimi}[1]{\emph{#1}}
\newcommand{\bibctan}[1]{Available in \texttt{#1} on CTAN; for instance, 
  \url{ftp:\lb //ftp.\lb funet.\lb fi\vino pub\vino TeX\vino CTAN\vino #1}}

\hyphenation{Post-Script Ota-tieto}

\input{kbmakrot}


\begin{document}

\poistovedoksesta{\thispagestyle{empty}
\vspace*{\fill}
\begin{center}
{\LARGE Mat-1.139 Matematiikan erikoistyöt\\[2ex]
 Converting the Mathematical Encyclopaedia \\
 for use in Microsoft Windows}

\vspace{4ex}{\large 
Kenrick Bingham\footnote{
  Helsinki University of Technology, Institute of Mathematics,
  P.O.Box 1100, FIN-02015 HUT, Finland, \\
  \url{http://www.hut.fi/\~{}kenny/},
  e-mail {\tt Kenrick.Bingham@hut.fi}
}  \\
41857A, Tf
\vspace{2ex} 

May 30, 1997
}

\end{center}
\vfill\vfill
\pagebreak}

\poistovedoksesta{\tableofcontents \pagebreak}
\vedos{\hfill \tanaan}

\section{Introduction}

The Mathematical Encyclopaedia is a hypertext reference book on
mathematics, intended for use by both high school and first to second
year undergraduate university students. It is a part of HypeMAT, a
package for computer-aided mathematics education, developed at the
Institute of Mathematics at the Helsinki University of Technology.
The text in the Encyclopaedia has been formatted using the \LaTeX\ 
document preparation system \cite{lamport:latex,companion,knuth:texbook}, 
and the hypertext properties have been implemented using tools created 
in the HyperTeX project \cite{hypertex-faq,lanl,nyjm}. 
The Encyclopaedia is distributed as a \dvi\ file with the
hypertext properties stored as special codes normally ignored by
non-hypertext-capable \dvi\ viewers and drivers.  The hypertext
properties become available when the \dvi\ file is read using a viewer
with hypertext capabilities, such as Xhdvi, which is the one chosen
for use in HypeMAT. 

Hypertext capable \dvi\ viewers are, however, available only on Unix
and NeXT platforms. Because MS-Windows is by far the most popular
operating system among potential users of HypeMAT and the
Encyclopaedia, it would be useful to find a way to read the
Encyclopaedia on this platform, too. \cite{ms}

Writing an entire hypertext-capable \dvi\ viewer
could well be wasteful and inefficient
if other solutions were available. A more appropriate approach
would be to convert the Encyclopaedia into another format, platform
independent if possible, that could be read by applications available
on the MS-Windows platform. Investigating these possibilities was the
objective of this study. Two alternatives appeared promising: one
based on the IBM Techexplorer program, and the other on Adobe's
Portable Document Format (PDF).

IBM Techexplorer is a WWW browser plug-in program that accepts raw
\TeX\ or \LaTeX\ code as its input. It formats the text and displays
it in the browser's window.  Hypertext links and labels can be
included by adding Techexplorer's proprietary commands. The program
is in its development stage and only available for use on a relatively
limited range of platforms and with one particular WWW browser.

Since Techexplorer supports only a fairly limited set
of \LaTeX\ features, some editing will be necessary in order
to view the Encyclopaedia with Techexplorer.

The Portable Document Format is designed, as the name suggests, 
to be a platform-independent way of representing formatted documents. 
Readers are available free of charge for all of the most
widely used operating systems --- MS-Windows, Unix/X-windows,
Macintosh and NeXT --- and the format is relatively well known.

The conversion into PDF is done in three steps. First, the \LaTeX\ file is run
to produce a \dvi\ file, just as when Xhdvi was used to view the
\dvi\ file. Subsequently, the \dvi\ file is turned into a PostScript
file, which is finally converted into PDF using Adobe's Acrobat
Distiller software.  The hypertext information is preserved in the
intermediate stages in forms that are normally ignored by conventional
drivers and viewers without hypertext capabilities.

A sample of the over 400 page Encyclopaedia was selected and converted
both for Techexplorer and into PDF. The conversions were done in such
a way that the ``variable costs'' were kept low, \emph{i.e.} 
converting the entire Encyclopaedia later could be done with little
extra work. In the course of the study, the procedure for conversion
into PDF turned out to be so automatic and independent of the content
of the document that the whole Encyclopaedia was converted.



\section{Starting point}

\subsection{HypeMAT}

The HypeMAT package for computer-aided mathematics education
currently consists of two major components: the Mathematical
Encyclopaedia and the Problem Collection \cite{riikka:gradu}. 
The Encyclopaedia can be
read with the Xhdvi program on a computer running a Unix operating
system. The same holds for the Problem Collection, which is
implemented using MetaCard software \cite{metacard}. 
Both of these programs, Xhdvi and
MetaCard, are distributed free of charge. In addition, if Mathematica
\cite{mathematica, mathematica-www} 
has been purchased, it can be used as a tool when solving the problems. 
HypeMAT has been developed by Simo K. Kivelä\footnote{%
  Helsinki University of Technology, Institute of Mathematics,
  P.O.Box 1100, FIN-02015 HUT, Finland, 
  \url{http:\lb //www.\lb math.\lb hut.\lb fi\vino staff\vino
       kivela.\lb html.\lb en},
  e-mail \texttt{Simo.Kivela@hut.fi}
}, Riikka Nurmiainen\footnote{%
  Helsinki University of Technology, Institute of Mathematics,
  P.O.Box 1100, FIN-02015 HUT, Finland, 
  \url{http:\lb //www.\lb math.\lb hut.\lb fi\vino staff\vino 
       rnurmiai.\lb html.\lb en},
  e-mail \texttt{Riikka.Nurmiainen@hut.fi}
}, Anna Loimulahti,
%}, Anna Loimulahti\footnote{%
%  Helsinki University of Technology,
%  Laboratory of Information Processing Science,
%  P.O.Box 1100, FIN-02015 HUT, Finland, 
%  \url{http:\lb //www.\lb cs.\lb hut.\lb fi\vino \~{}anna/},
%  e-mail \texttt{Anna.Loimulahti@hut.fi}
%},
and Markko Jantunen\footnote{%
  Helsinki University of Technology, Computing Centre,
  P.O.Box 1100, FIN-02015 HUT, Finland, 
  \url{http:\lb //www.\lb hut.\lb fi\vino \~{}markko/},
  e-mail \texttt{Markko.Jantunen@hut.fi}
}.
  

The HypeMAT package is distributed as an easy-to-install version
including executables for Linux, a freely distributed Unix
implementation. Linux has been chosen because the majority of the potential
users of HypeMAT, namely most high schools, have PC computers with 
MS-Windows operating systems, and if they must install a new operating
system to be able to use HypeMAT, they would probably rather choose
a freely distributed one. \cite{doctorlinux,runninglinux,ldp}

Although Linux is available free of charge, the need to install and
administer an additional operating system may be a serious obstacle to
to the use of HypeMAT. Since MetaCard and Mathematica are available
for use on a variety of platforms, including MS-Windows, finding a way to
read the Encyclopaedia in a MS-Windows environment could greatly
increase the ease of both installation and use of the whole HypeMAT
package.



\subsection{Representing Hypertext in \TeX\ and \LaTeX}

In the HyperTeX project, a standard for representing hypertext
in \dvi\ (Device Independent) files was created, 
using \TeX's \verb-\special- commands.
In general, the arguments of these commands are included verbatim 
in the \dvi\ file, allowing features not covered by the \dvi\ format
to be realised. These features are, by definition, device dependent,
and it is up to the designer of the particular \dvi\ viewer or driver 
to decide how to handle them. \cite{hypertex-faq, lanl, nyjm}

According to the HyperTeX convention, hypertext information is
coded using basic HTML (Hypertext Markup Language) tags \cite{html}.
A label is assigned to the current location within the document
by inserting a
\begin{quotation}
  \verb-\special{<a name="-\emph{label}\verb-">}-
\end{quotation}
command. A link to a specific location, defined by a 
URL (Universal Resource Locator), is implemented by inserting a
\begin{quotation}
  \verb-\special{<a href="-\emph{URL}\verb-">}-  
\end{quotation}
command before the element --- usually a section of text --- constituting
the link, and a 
\begin{quotation}
  \verb-\special{</a>}-  
\end{quotation}
command after it. If the link refers to a location within the same
document, defined as \emph{label}, its URL can be given in the simple, 
relative form \verb-#-\emph{label}.

Of course, in order to turn these embedded special commands into
hypertext links, a \dvi\ viewer capable of processing them correctly
is needed, too. Two such viewers have been developed in the HyperTeX
project: one called Xhdvi, for Unix platforms,\footnote{%
  Xhdvi, written by Arthur P. Smith, is based on the widely
  used Xdvi viewer by Paul Vojta. \cite{xdvi}}
the other HyperTeXview, for the NeXT platform.\footnote{%
  HyperTeXview is written by Dmitri Linde 
  (\texttt{dmitri@physics.stanford.edu}) 
  and significantly extended by Mark D. Doyle 
  (\url{http://nqcd.lanl.gov/people/doyle/doyle.html}, 
  \texttt{doyle@aps.org}).}

Unfortunately, the progress of the HyperTeX project has slowed down 
significantly after many people involved in it changed jobs. 
Since May of 1996, nothing has been reported on the mailing list
\texttt{hypertex-announce@aps.org} \cite{hypermail}. 
Development of the Xhdvi viewer stopped after version 0.8a, 
which was released on the 22nd of May, 1995.
There is apparently little hope that a hypertext-capable \dvi\ viewer
will be available on the MS-Windows platform in the near future.
Therefore, if \TeX\ based hypertext documents are to be viewed on the
MS-Windows platform, other solutions need to be found.\footnote{%
  More information concerning HyperTeX can be found on the
  HyperTeX WWW pages \cite{nyjm,lanl}.
  The computer \texttt{snorri.chem.washington.edu}, mentioned in many
  of the documents, does not run a Xhdvi ftp server anymore.  
  However, Xhdvi and other software and macro packages are available
  from the Comprehensive \TeX\ Archive Network (CTAN, see for instance
  \url{http:\lb //www.\lb tex.\lb ac.\lb uk\vino tex-archive/} or, 
  in Finland, 
  \url{http:\lb //ftp.\lb funet.\lb fi\vino pub\vino TeX\vino CTAN/}).
  \label{ctan}} 



\subsection{Structure of the Encyclopaedia}

The Encyclopaedia consists of 88 \emph{articles}, each of which is
subdivided into one or more \emph{modules}, which are each a couple of
screenfuls of text. Articles are stored in separate \LaTeX\
\texttt{.tex} files.

The \LaTeX\ files are processed by running \LaTeX\ on the file
\enstex. This file simply loads the required packages and inputs the
files that contain the articles. The packages are (more or less)
standard \LaTeX\ packages except for \enssty, which defines the
special commands used throughout the articles for formatting the text
and adding hypertext information. These commands include the
following: \label{ensstycommanddescriptions}

\begin{itemize}
  
\item \verb-\htmladdname{-\emph{key}\verb-}-: 
  Defines a hypertext label, \emph{i.e.} names the location so that
  it can be referenced; similar to HTML's 
  \verb-<A NAME=-\emph{key}\verb->-.
  
\item \verb-\htmladdsmashlink{-\emph{text}\verb-}{-\emph{key}\verb-}-:
  Typesets \emph{text}, adding a link to location \emph{key} defined
  by \verb-\htmladdname-, corresponding to HTML's 
  \verb-<A HREF=-\emph{key}\verb->-\emph{text}\verb-</A>-.
  In other words, defines \emph{text} as a hypertext anchor
  for the link to \emph{key}.
  
\item \verb-\linkkialleviivaus{-\emph{text}\verb-}{-\emph{key}\verb-}-:
  Typesets \emph{text} underlined, adding a link to the location
  with the label \emph{key}. Uses \verb-\htmladdshashlink-.

\item \verb-\LINK-, \verb-\HLINK-, \verb-\KLINK-, \verb-\KHLINK-
  (with various arguments):
  Typeset some text, add a framed box containing some other text 
  into the right hand side margin and create a link from the framed box
  to a hypertext label defined by \verb-\htmladdname-.
  The different variants are for single- and multiline boxes
  and for different processing of keys.
  Most of the Encyclopaedia's links are made using these commands.

\item \verb-\Sivunumerot{-\emph{page}\verb-}{-\emph{total}\verb-}-:
  Sets the page number to \emph{page} and the total number of pages to
  \emph{total}. They are stored in the variables \verb-sivuno- and
  \verb-sivujenlkm- for later use.

\item \verb-\perusreunapalikat-:
  Adds elements that are repeated at the beginning and end of every
  module. These include page numbers and arrow buttons that can be
  used to move to the next or previous page within the article,
  or to the table of contents, index, or instructions of use.

\item \verb-\EsiTiedot{-\emph{prerequisites}\verb-}-,
  \verb-\KatsoMyos{-\emph{see-also}\verb-}-:
  Defines the prerequisites for reading the module and the modules 
  ``see also'' references, respectively. They are saved into
  \LaTeX's variables \verb-\EsiTiedNimi- and \verb-\KatsoMNimi-.

\item \verb-\Artikkeli{-\emph{articlename}\verb-}-,
  \verb-\Moduli{-\emph{modulename}\verb-}-:
  Mark the beginning of an article and a module, respectively.
  The names \emph{articlename} and \emph{modulename} are stored
  in \LaTeX's \verb-ArtNimi- and \verb-ModuliNimi- variables
  for later use. They are also defined as hypertext labels
  for the beginning of the article or module.
  
  At the beginning of each module, a new page is started, and the
  names of the article and module, the prerequisites, and the 
  ``see also'' references are printed at the top of the page, 
  together with other repeated elements, produced by the command
  \verb-\perusreunapalikat-. In addition, a hypertext label of the
  form \emph{articlename}\verb-:-\emph{page} is created.

\item \verb-\Kuva[-\emph{filename}\verb-]{-\emph{explanation}\verb-}-:
  Inputs the file \emph{filename}\verb-.tex- that is supposed to contain
  a picture in some form, most often a EPS (Encapsulated PostScript) 
  file included using the \latexpaketti{psfig} package \cite{psfig-paketti} 
  and optionally 
  enhanced with some \LaTeX\ elements using the \verb-picture- environment.
  The strigs \emph{explanation} and \emph{filename} are written to
  a file that will provide a list of figures. 
  If the \emph{filename} argument is missing, a remark about this
  is printed instead.
 
  When the article files are processed by \LaTeX, the pictures are not
  embedded into the resulting \dvi\ file, but only the names of the files
  that containt the pictures.

\item \verb-\Animaatio-: Future expansion for including animations.
  
\end{itemize}

Most of the hypertext links are in the middle of the text. They are
designed to provide further information and answers to questions that
arise when reading the Encyclopaedia. They are implemented by adding a
\verb-\LINK- command or one of its variants to appropriate words in
the text.  As a result, these words are printed as they are, but a
framed box is created in the margin. This box contains the
title of the related part of text, as defined by the \verb-\Artikkeli-
and \verb-\Moduli- commands, and has a link to it. 
This way of having the links in the margin is advantageous
compared to having the word underlined in the middle of the text, as in, 
for instance, most WWW pages, because it does interrupt reading the text.

Underlined words are, however, used as anchors for some hypertext links;
namely the prerequisites and ``see also'' references at the beginning
of each module. This is reasonable, because here the only function of
the text is to serve as anchors for the links.



\subsection{Requirements for the Conversion}

In the field of typesetting and formatting text that includes
mathematical notation, \TeX\ is, together with its extension \LaTeX,
one of the very best programs.
Therefore, a \TeX\ based system should probably be used
for formatting of the Encyclopaedia on-screen, although
several other solutions have been proposed, based \emph{i.a.}
on HTML and Mathematica. 
\cite{steinberger:emj, bump:math-and-hypertext, pollack:math-and-html, 
  wolfram:html-math}

The users of the current Unix and Xhdvi based versions of HypeMAT
should preferable not be left without support. A back conversion from the new
format --- which is to be chosen according to the knowledge acquired
in this study --- into the current one may not be possible. Therefore,
the conversion should be made into an automated process, allowing the
Encyclopaedia to be developed further in the current format and
converted into the new format, as needed.



\subsection{Sample for conversion}

Following these guidelines, a sample of the Encyclopaedia was selected,
consisting of five articles, 18 modules in all. 
The articles were chosen in such a way that many of the hypertext links
would refer to within the sample, and that it would contain pictures.
The chosen articles were the ones in the files \verb-vektori.tex-,
\verb-vektalg.tex-, \verb-piste.tex-, \verb-suora.tex-, and \verb-taso.tex-.

This sample was converted both for IBM Techexplorer and into PDF.



\section{IBM Techexplorer}

\subsection{The Techexplorer Program}

\subsubsection{Plug-in for \TeX\ and \LaTeX\ Files}

IBM Techexplorer is a WWW browser plug-in program developed by IBM,
used to display \TeX\ and \LaTeX\ documents on the Web \cite{techexplorer}.
When the browser, with Techexplorer installed, 
receives a document whose type is
\texttt{application/x-tex}, \texttt{application/x-latex},
or \texttt{application/x-tech\-ex\-plor\-er}, it launches Techexplorer,
which processes the document. The output of Techexplorer is
displayed in the browser's window.

The version of Techexplorer used in this study was 1.2; 
first the beta version, then the officially released one. 
At least at this stage, Techexplorer is only available for the 
Windows 95 and Windows NT operating systems, and it can only be
plugged into either Netscape Navigator version 2.01 or higher
or Microsoft Internet Explorer version 3.0 or hihger. \cite{ms, netscape}

Techexplorer does not distinguish between \TeX\ and \LaTeX\ documents.
This may seem quite astounding for \TeX\ and \LaTeX\ users, since
the structures of \TeX\ and \LaTeX\ documents are quite different.
However, treating them equally eliminates the ambiguity caused
by the fact that servers sending files to the WWW usually
indentify the file's content type simply from the file name extension,
which is \texttt{.tex} for both \TeX\ and \LaTeX\ documents.
Because of this, in the rest of this section,
the word \TeX\ should be understood to refer to both plain \TeX\
and \LaTeX.

\TeX\ is a relatively large electronic typesetting system.
It provides ways of using variables, defining subprograms (or macros),
including files and ready-made macro packages,
switching fonts and using control structures.
Processing a \TeX\ file is, therefore, much like compiling a program,
and it often requires access to many auxiliary files that may be
set up in various directories. 

Techexplorer's promise of doing all this in a easy-to-install,
automatically running WWW browser plug-in sounds ambitious.
It is no surprise that the features supported are quite limited,
and that the result displayed differs from that produced by a 
full-scale \TeX\ system. For a list of supported commands,
see \cite{techexplorer-ug}.


\subsubsection{File Access}

Accessing files is, evidently, one of the fields in which problems 
can be expected to be run into, when using Techexplorer. \TeX\ documents
often refer to external files, like macro packages, pictures or 
simply text files with more \TeX\ code to be included in the document.

Techexplorer supports the \verb-\input{-\emph{filename}\verb-}- command for
including external files. It asks for \emph{filename}\verb-.tex- 
from the server, and ---
supposing the file is found in the same directory as the file
containing the \verb-\input- command, and it has appropriate permissions 
--- inserts it into the current position.

Unfortunately, there are other file access commands, too, like
\verb-\usepackage-, and determining in which directories the
files are searched for, is not always that simple.  
In a conventional, single-site \TeX\ system, files are usually searched for
in many directories, and different types of files are searched in
different sets of directories. These directories differ from
installation to installation, and they may depend on earlier commands
in the \TeX\ file, either implicitly (for instance, after loading a
package that specifies which file should be used for a certain purpose) or
explicitly (if the path names are generated by commands in the \TeX\ file).

When the files are processed by Techexplorer, inputting files
is distributed between the client side (Techexplorer) and the
server side, which causes difficulties. 
Techexplorer generates the file and path name, converts it to
an URL and asks for it. 
Since the server is assumed to be a normal HTTP server,
with no special \TeX\ capabilities, it can do no more than 
search for the file in the directory specified in the URL.
Because there is no ``standard \TeX\ installation'', but
available packages and their locations vary from system to system,
Techexplorer cannot know which directory holds the files.

It is, therefore, understandable that \verb-\input- has been chosen 
to be the only supported command for reading in auxiliary files, 
because it is normally used only for reading files from the
same directory as the master file, or files with explicit path names.%
\footnote{%
  In addition, Techexplorer provides a variant
  \texttt{\string\inputonce}
  which causes the file to be read in only if it has not been read in
  at an earlier stage of processing the document. This can be useful
  for suppressing transfer of input files that only contain macro
  definitions, if they are mentioned more than once in the master \TeX\ file
  and files read in by other \texttt{\string\input} commands.
}


\subsubsection{Fonts and Pictures}

Because of \TeX's background as a typesetting system, and not a word
processing program, great attention is paid to fonts. 
In a typical \TeX\ installation, hundreds if not thousands of different 
combinations of sizes, shapes, weights, widths, and families are available,
each with unique character shape and spacing.
Special symbols needed in mathematical formulae and conventions used
when typesetting them are built-in.
The accurate control thus achieved enables high quality output.

In the MS-Windows environment, different font techniques are normally used.
The default fonts used in \TeX, called Computer Modern fonts \cite{knuth:cm},
are consequently not available in Windows, and neither in Techexplorer.
Therefore, other methods for displaying the formulae have been chosen:
\begin{enumerate}
\item The Monotype Math fonts shipped with Lotus WordPro and 
  Lotus SmartSuite. IBM claims this set to be 100\% complete for 
  the ``basic TeX and LaTeX'' symbols.

\item The Lucida Bright Math fonts that are part of the 
  Microsoft TrueType Font Pack (This set is 90\% complete).

\item The WordPerfect Math and IconicSymbols fonts (90\% complete).
  \label{item:wp-fonts} 

\item The standard Microsoft Windows Symbol and WingDings fonts 
  (70\% complete). \label{item:win-fonts}
\end{enumerate}

The first three alternatives rely on fonts possibly installed on the
computer together with other software; the fonts are not distributed
with Techexplorer. The fourth alternative uses fonts included in
the normal Windows installation, so they should always be available.
Alternatives \ref{item:wp-fonts} and \ref{item:win-fonts} were tested. 

Pictures in BMP, DIB, GIF, JPG, and PCX formats can be included, 
using the proprietary \verb-\includegraphics- command. 
All of these are bitmap formats, which display in the same
size regardless of the size of the font chosen for the surrounding text.



\subsection{Conversion for Techexplorer}

\subsubsection{\tt ens.tex}

When the sample was converted for Techexplorer, 
its main structure was not changed. 
Also Techexplorer accesses Encyclopaedia through the master file \enstex\ 
that was cleaned up a bit. 
For the original and converted \enstex\ files, see sections 
\ref{enstex-original} and \ref{enstex-te}.

References to unneeded packages were removed, and the \verb-\write-
commands, used for creating lists of figures and references, were removed. 
The \verb-\include- and \verb-\includeonly- commands were changed
to \verb-\input- commands, and \verb-\usepackage{ens}- was changed
to \verb|\input{ens-sty}|.


\subsubsection{\tt ens.sty}

Because the style file \enssty\ is an essential part of the structure 
of the Encyclopaedia, but Techexplorer does not support 
loading macro packages using the \verb-\usepackage- command,
the style file \enssty\ was renamed to to \ensstytex\ so that it
can be read in using the \verb-\input- command.
The contents of the file was changed substantially.

The original \enssty\ file begins by loading certain packages
and setting the paper size and margins.
These commands were removed, because functionality provided by
the packages was not used in the sample, and paper size is an irrelevant
concept in Techexplorer.

The command \verb-\textsc-, which is used in \LaTeX\ to typeset text in
\textsc{small caps}, is not supported by Techexplorer. 
Because it is used in the Encyclopaedia's articles, it is defined  
in the Techexplorer version to be identical to \verb-\textsl- 
and thus cause the text to be displayed \textsl{slanted}.

The next change was to remove some \verb-\newtoks-, \verb-\newcount-,
and \verb-\newcounter- commands, because they are not supported 
by Techexplorer, and as hypertext links are implemented differently
in \te, they are not needed, either.

Definitions of the commands \verb-\Sivunumerot-, \verb-\Avain-,
\verb-\SivunLoppu-, and \verb-\Animaatio- 
(see section \ref{ensstycommanddescriptions} for descriptions of
the commands) were changed to empty,
as these commands turned out to be unnecessary with \te:
\verb-\Avain- was only used for generating the list of references,
and \verb-\Animaatio- is a future expansion for including animations.
\verb-\Sivunumerot- and \verb-\SivunLoppu- are used to divide
the Encyclopaedia into pages, but with \te, the entire Encyclopaedia
can be displayed as one, very long page, and page breaks are not needed.
For the same reason, the commands \verb-\perusreunapalikat- and
and \verb-\nuolilinkit-, the latter being a subroutine used by the former, 
were removed.

In the definition of the image inclusion command \verb-\Kuva-, a special
problem was caused by optional arguments, \te\ not supporting them.
Originally, \verb-\Kuva- took two arguments, one of which was optional. 
When both arguments are present, the command was in the form 
\begin{quotation}
  \verb-\Kuva[-\emph{file}\verb-]{-\emph{description}\verb-}-
\end{quotation} 
where \emph{file} is the name of the image file to be included and
\emph{description} is a short descriptive text that is only
written to an auxiliary list of figures. For \te, this command
had to be defined as only having mandatory arguments,
so in the form above, the first argument would be ``\verb-[-'',
the second one ``\emph{file}'', the third one ``\verb-]-'',
and the fourth one ``\emph{description}''.
Fortunately, the command was never used in the articles with
only one argument.

As \te\ only supports graphics in bitmap formats, and if the images
were converted into bitmaps, the relative size of the images would be 
very much dependent on the resolution of the surrounding text, this
command was chosen to be changed to only display the text 
``\emph{(Kuva)}'' (meaning ``picture''). This was done by defining:
\begin{verbatim}
  \newcommand{\Kuva}[4]{\emph{(Kuva)}}
\end{verbatim}
In the future, if later versions of \te\ support PostScript graphics
or another vector graphics format that the images can be converted to,
they can be included by defining:
\begin{verbatim}
  \newcommand{\Kuva}[4]{\includegraphics{#2}}
\end{verbatim}

Hypertext commands were changed, most obviously, too. The low-level
\verb-\htmladdnormallink-, \verb-\htmladdsmashlink-, and
\verb-\htmladdname- were changed to use \te's internal 
\verb-\labelLink- and \verb-\label- commands.
The higher-level commands \verb-\linkkialleviivaus-, \verb-\linkkilaatikko-,
\verb-\korkealinkkilaatikko-, and \verb-\LINK- together with its variants,
were all made to simply display the text and produce a link to the
specified location, the \verb-\marginpar- command being unsupported by \te.
For \verb-\linkkialleviivaus-, this was done because 
\te\ displays links in colour, and underlining was thus not
necessary to show the existence of a link
--- as it is in the original black-and-white form of the Encyclopaedia ---
and unnecessary underlining is considered bad typographical style.

The commands \verb-\Artikkeli-, \verb-\Moduli-, \verb-\EsiTiedot-,
and \verb-\KatsoMyos- were significantly simplified. Suppressing page breaks
took away the need of tracking page numbers within an article,
which was fortunate, \te\ not supporting counters.
The names of articles, modules, prerequisites, and ``see also'' references 
were no longer needed to be repeated at the beginning of each page,
so they were changed to be displayed when the respective commands
were executed. This was necessary, because using \te, 
they could not be stored in variables.
Defining the article and module names as hypertext labels 
and creating links to the prerequisites and ``see also'' references
were done right away.


\subsubsection{Further Work to Be Done}

The main structure of the Encyclopaedia was converted for reading
with \te, as described above. 
However, because of \te's limited support for \TeX\ commands, 
several individual commands used in the article files should be either 
changed or redefined, for instance in \ensstytex. 
The result of one of these soorly supported commands, 
appearing in the sample, is shown in figure \ref{fig:te-display}. 
Here, the \LaTeX\ code:
\begin{verbatim}
  \V{a}\times\V{b} =
  \begin{array}[t]{cccccc}
    & a_x b_x \V{i}\times\V{i} &+& a_x b_y \V{i}\times\V{j}
  &+& a_x b_z \V{i}\times\V{k}\\
   +& a_y b_x \V{j}\times\V{i} &+& a_y b_y \V{j}\times\V{j}
  &+& a_y b_z \V{j}\times\V{k}\\
   +& a_z b_x \V{k}\times\V{i} &+& a_z b_y \V{k}\times\V{j}
  &+& a_z b_z \V{k}\times\V{k}
\end{array}
\end{verbatim}
should produce the following output:
\[
\V{a}\times\V{b} =
\begin{array}[t]{cccccc}
  & a_x b_x \V{i}\times\V{i} &+& a_x b_y \V{i}\times\V{j}
&+& a_x b_z \V{i}\times\V{k}\\
 +& a_y b_x \V{j}\times\V{i} &+& a_y b_y \V{j}\times\V{j}
&+& a_y b_z \V{j}\times\V{k}\\
 +& a_z b_x \V{k}\times\V{i} &+& a_z b_y \V{k}\times\V{j}
&+& a_z b_z \V{k}\times\V{k}
\end{array}
\]
However, as \te\ does not support the optional argument \verb-[t]-
in \verb-\begin{array}-, it takes ``\verb-[-'' for the
mandatory argument, in this case \verb-{cccccc}-, 
that specifies the alignment of the columns in the array,
does not understand it, and replaces it with the default alignment:
centering for all columns.
Consequently, ``\verb-t]{cccccc}-'', interpreted as being
part of the array's contents, is displayed in the leftmost cell 
in the first row of the array, and the array is not top-aligned
with $\V{a}\times\V{b}$, as it should.

Taking care of all these unsupported commands will have to be done by hand,
separately for each individual anomaly.

\pagebreak
\section{PDF}
The Portable Document Format (PDF) is a format designed for viewing 
documents on different platforms. It has been developed as a proprietary 
standard by Adobe Systems, Incorporated, but has gained some wider
popularity, too. \cite{adobe}

\subsection{Background in PostScript}
PDF is based on the PostScript page description language, 
which was also developed by Adobe, and has subsequently become
a \emph{de facto} standard. \cite{adobe:psblue, adobe:psred}

PostScript was designed as a device and resolution independent 
page description language for driving printers. A PostScript file
is processed by a PostScript interpreter as a program
that first defines appropriate subprograms, and then tells the
printer what to do to produce the output. 
For viewing PostScript files on-screen, emulator programs have been 
written. PostScript is quite often chosen as the format for distributing
documents in electronic format. 
NeXT computers even use a hardware PostScript processor 
for displaying graphics.

Viewing documents on-screen is, however, somewhat different from
printing them. 
Because a PostScript file only tells how to print the whole document,
in order to display a particular page, the PostScript file must be, 
in general, processed in its entirety, and the desired page
must be captured from the output.
The reader of a document will most often want to change pages
and move up and down on one page in a nonlinear order,
so to avoid processing the PostScript file again and again,
information about the output pages must be stored in some form.
The reader may also want to look at other sections of the document,
referred to by the text, which is something where hypertext links
would very useful. 

The Portable Document Format provides solutions to these problems.
It has more structure, allowing pages to be handled individually,
and supports hypertext references both to within the document and
to arbitrary external URL's. Other new features in PDF, 
compared to PostScript, 
include attaching notes to a formatted PDF document, and allowing or 
denying different types of access to a document ---
reading, printing, changing, etc.
PDF files are, therefore, quite suitable for on-screen viewing,
and provide a possible solution for viewing the Encyclopaedia on
a MS-Windows computer.

The increased amount of structure in PDF documents is also used in
Adobe's PostScript Extreme architecture (formerly known as Supra), 
which uses parallel Raster image processors
(RIP's) to increase printing speed. 
In high-speed printing, ripping is generally the most time-consuming phase. 
Using several parallel RIP units can cut down this time substantially, 
because the job can be divided into independent subtasks. 
\cite{hardcopy:supra, adobe:psextreme, adobe:psextreme_and_pdf, 
  adobe:supra_whitepaper}

PDF uses syntax and commands similar to PostScript, and the underlying
imaging model is the same in both languages. 

Because of PDF's similarities with PostScript, an obvious method of
producing a PDF file, in addition to creating one directly,
is conversion from an existing PostScript file.
This can be done using Adobe's Distiller program, which is
part of the commercial Acrobat software package. 
The newest versions of a freely distributed program, Ghostscript,
also allow creating PDF files, but only using
a very limited set of fonts. \cite{ghost}

In many environments, including the one that was used for writing 
the Encyclopaedia, printing a \TeX\ document is done using PostScript.
Therefore, it seemed to be a natural way to proceed to first print
the Encyclopaedia into a PostScript file and then turn 
the PostScript file into PDF, using Distiller.
Ghostscript could not be used, because of the special fonts needed
in the Encyclopaedia's mathematical formulae.



\subsection{Fonts}

In the system that was used, fonts are normally handled as follows,
when printing a \TeX\ document. 
The \dvi\ driver Dvips determines the resolution
of the printer to be used and creates appropriate bitmaps for the
fonts used in the document, using \MF \cite{knuth:tex_and_metafont, knuth:mf}.
These bitmap fonts, known as PostScript type 3 fonts, 
are included into the PostScript file.

This is appropriate, if the PostScript file is only going to be printed
on the printer. However, if the file is going to be printed using
a different resolution, the result achieved by using these bitmap fonts
is not optimal. 
%
% In a typical situation, the bitmap font would be at 300 dot per inch (dpi) 
% and the printer's resolution 600 dpi, so the resolution of the printout 
% would be only 300 dpi.
%
If the file is converted into PDF for on-screen viewing at varying 
resolutions, bitmap fonts normally give still much worse results.
This is due to the fact that screen resolutions are lower than printer
resolutions, and moreover, they are not multiples of 300 dpi,
which is the resolution often used by printers.

To avoid these problems, PostScript type 1 fonts, which are vector
fonts, must be used \cite{adobe:pstypeone}. 
For distributing the Encyclopaedia to be possible 
without copyright problems, public domain fonts would be desirable.

Basic type 1 fonts are available free of charge,
including Times, Helvetica, Courier and Symbol, but such
normal text fonts are not sufficient for typesetting  mathematical formulae.
For this reason, \TeX\ uses its own fonts, called Computer Modern fonts 
\cite{knuth:cm}, whose format is not compatible with PostScript.
Fortunately, several PostScript type 1 renditions of Computer Modern fonts 
have been developed.
Commercial solutions are available from Blue Sky Research \cite{bluesky} 
and Y\&Y, Inc. \cite{yandy}, but there are public domain fonts, too,
created by Basil K. Malysev \cite{bakoma, paradissa}.
Malysev's fonts, called BaKoMa and Paradissa, 
were chosen for the work in this study.

Another problem was, however, caused by combining mathematical formulae
and the letters Ä and Ö used in Finnish.
On the computer system that was used, Computer Modern (CM) fonts are not
used for typesetting text containing Ä and Ö, but DC fonts, which
are extensions of CM. Unfortunately, the BaKoMa and Paradissa collections do
not cover DC fonts.
This problem was avoided by choosing Times to be used for normal
text (including Ä and Ö characters) and Computer Modern for mathematical
formulae.


\subsection{Conversion into PDF}

\subsubsection{Conversion of {\tt ens.tex} and {\tt ens.sty}}

Turning the Encyclopaedia into a PDF file could be done
with quite little changes to the files \enssty\ and \enstex.

The font used for normal text was changed to Times simply by
inserting ``\verb-\usepackage{times}-'' at the beginning
of the file \enstex.

The hypertext commands defined in \enssty\ were
changed to use the commands defined in Michael Mehlich's\footnote{%
  E-mail \texttt{mehlich@informatik.uni-muenchen.de}
}
\latexpaketti{hyper} package \cite{hyper-paketti}.
The reason for this was not that the original, explicitly written
commands would have caused any particular problems, 
but simply that it seemed reasonable to move to use supported macro packages, 
which might already have dealt with some problems
potentially coming up in the future.
Versions 2.8 and 3.0a were used; 
defining hypertext labels with the earlier version's 
\verb-\blindhyperanchor- command resulted
in a \dvi\ file that could not be properly processed by Dvips.
The \latexpaketti{hyperref} package written by
Sebastian Rahtz\footnote{E-mail \texttt{s.rahtz@elsevier.co.uk}} 
and Yannis Haralambous could have been tried instead of 
\latexpaketti{hyper} \cite{hyperref-paketti}.

These changes affected the lowest-level commands 
\verb-\htmladdnormallink-,
\verb-\htmladdsmashlink-, and \verb-\htmladdname-,
which were altered to use the \verb-\hyperreference- and 
\verb-\blindhyperanchor- commands.
Because the special character ``\verb-#-'' preceding the hypertext labels 
was not needed in the definitions
of the hypertext commands any more, the definition of the command 
\verb-\risuaita-, previously used for this purpose, was removed.
Also, the \latexpaketti{hyper} package was loaded
at the beginning of \enssty\ using the \verb-\RequirePackage- command.

Because the table of contents, index, and instructions of use
were not part of the sample chosen for the conversion,
the commands that create links to them were removed from the 
definition of the command \verb-\perusreunapalikat-
that is used to add the elements that are repeated at the top of each page.

References to articles outside the sample were manually removed
from the text. For the prerequisites and ``see also'' references,
they were removed by simply redefining the \verb-\ETKM- command,
used to format these references and create links for them.
This way, the labels of the these 
references are simply typeset after each reference.
That the hypertext links work correctly can be seen 
from the links in the text.

The files converted for PDF can be seen in appendix \ref{files-pdf}.


\subsubsection{Processing the Files}

The file \enstex\ shown in Appendix \ref{files-pdf} was processed,
as usual, with the command ``\verb-latex ens-''.

For turning the resulting \dvi\ file into PostScript,
a newer version of Dvips, 5.62, was compiled,
because the version 5.58f normally used on the system does not offer
the option of embedding hypertext information \cite{dvips,dvipsh,dvipsp}.
Because of problems with configuring the complex directory structure 
of the font files normally used on the system, 
symbolic links to necessary font files were created all in 
only a few directories. 
The BaKoMa fonts were installed into the same directory as
the Dvips program.

The \dvi\ file was converted into PostScript with the command:
\begin{verbatim}
  dvips -z -O 0in,-0.0022mm
\end{verbatim}
The \verb.-z. option tells Dvips to include the hypertext information
in a form recognized by Distiller. This option was undocumented,
but could, fortunately, very easily be determined from the source code.

For some reason, the hypertext anchors appeared, by default, about an inch
too low on a 15'' the screen. 
The option \verb.-O. was used to fix this problem by moving the origin 
on the page. The real reason of the problem was not investigated,
as a new version of Dvips will most probably be professionally
installed in the near future.

Because the page size in the \dvi\ file was taller than the default A4,
the page size should have been changed at this stage, too.
However, this was not done, because in the future, the Encyclopaedia
will be changed to use A4 size pages, which will also allow it to
be printed on paper, if needed, with the hypertext links replaced 
by page number references. 

The resulting PostScript file \tiedosto{ens.\lb ps},
with all fonts now embedded in type 1 format, 
was converted into PDF using Distiller for Windows.



\section{Conclusions}

As the World Wide Web is a hypertext media growing very quickly
in popularity, it would in some sense be the ideal way of
distributing the Encyclopaedia, if only a successful way of 
embedding mathematical formulae into Web documents was found.
Most Finnish high schools already have or are going to get an 
Internet connection in the near future, too.

Techexplorer brings one answer to the obvious need of representing
mathematical formulae on the Web. Unfortunately, the implementation
is not very successful in the sense that \TeX\ or \LaTeX\
documents must be edited substantially, if they are to be
displayed correctly using Techexplorer, as the study showed
for the Encyclopaedia. 

The overall appearance of the output is not as neat
as it is when formatted with \TeX.
The output quality is, of course, partly a matter of taste, 
but at least the spacing of characters was clearly more uneven when
displayed by Techexplorer than when typeset with \TeX.
A sample of the Encyclopaedia can be seen 
as originally typeset by \TeX\ (figure \ref{fig:tex-print}),
as displayed by Techexplorer
using Windows and WordPerfect fonts (figure \ref{fig:te-display}),
and as displayed and printed by Adobe Acrobat Reader 
(figures \ref{fig:pdf-display} and \ref{fig:pdf-print}).
Version 1.2 of Techexplorer does not support printing.

Breaking lines with Scandinavian characters does not work in Techexplorer,
as can be seen in the word ``päde'', at the end the fifth visible line
in figure \ref{fig:te-display} (a).

During the time that Techexplorer waits for the article files and 
receives them,
the window in which the the text is displayed responds very slowly
to any user input, including scrolling. Even with the relatively small
sample of six articles, this hinders reading the text. With
the full 88 articles and pictures, using the Encyclopaedia will probably be
still much slower. Depending on the way Techexplorer stores and caches 
large documents, this delay may occur either only when bringing up
the Encyclopaedia, or every time that the user wants to jump 
to another location.

A solution might be to divide the text into
separate files that are not all read at the same time.
This would require changing the \verb-\labelLink- commands to
\verb-\docLink- commands, which refer to hypertext labels in other files,
and managing names of the article files. 
Depending on the caching techniques used in the browsers and
available to the plug-in, jumping between files may require loading
the file unnecessarily again and again, causing unwanted delays.

Splitting the longer articles into shorter pages, to make a large proportion
fit onto the screen at one time and to make them load more quickly,
would also require major changes. The current process of
dividing articles into modules is based on the entire article being
processed at once. Also, \TeX\ uses variables when defining hypertext labels
for subsequent modules, and Techexplorer does not support
the use of variables.

The Techexplorer program is only available for Windows 95 and Windows NT
platforms, and it can only be plugged into Netscape and Internet Explorer
WWW browsers.
Although this would be a sensible solution for most high schools,
Unix systems are in wider use in universities, which form another 
group of potential users.
The platform-independent philosophy behind the Portable Document Format,
also working in practice, makes PDF a more flexible choice,
with respect to different audiences. 

Pictures play quite an important in the Encyclopaedia, too,
and they are all in vector graphics form, namely PostScript.
Since PDF is based on PostScript, it can handle PostScript graphics
very well, which makes the situation about optimal for PDF.
Techexplorer, on the contrary, only supports bitmap image formats,
which is undesirable, because the relative sizes of bitmap pictures
would vary according to the size selected for the surrounding text.

The current versions of Techexplorer still lack some obvious features,
like printing. Before Techexplorer can be expected to be considered
as a useful solution for viewing the Encyclopaedia, 
some work is still required.
Unfortunately, there is no guarantee that this work will be carried out. 
If it is, more and more features will become
available as the the program is developed further,
but old ones may cease to function in the way that they used to.
Updating the Encyclopaedia to take advantage of the new features and
to work after possible changes to old ones will require some efforts,
perhaps at several stages when new versions of Techexplorer become available.
Techexplorer's end user licenses also terminate at specific dates, 
and if IBM discontinues the development of the program,
it may become impossible to distribute readers for the Encyclopaedia,
and all the work spent adapting the Encyclopaedia for Techexplorer 
will be wasted.

For these reasons, developing the Encyclopaedia to be displayed
using Techexplorer is not advisable. 
Conversion into PDF, on the contrary, appears to be a very suitable solution.

In the Portable Document Format file, the typesetting has been
taken care by \TeX. Therefore, the text quality is as good as
can be achieved using \TeX. Using different fonts for the body text
and for mathematical formulae can be disturbing, though.
If desired, commercial type 1 renditions of Computer Modern fonts,
supporting the Ä and Ö characters \cite{yandy} 
or commercial type 1 fonts including sufficient mathematical
characters\footnote{%
  An example of a set of type 1 fonts equipped with mathematical symbols
  is LucidaBright combined with LucidaNewMath, 
  available from Y\&Y\cite{yandy}.
}
could be purchased, provided that the licenses allow 
distributing the fonts also in type 1 form; some licenses require
that when products where the fonts have been used are distributed,
only bitmap versions of the fonts be included.
The possibility of distributing type 1 fonts may change, 
if the Encyclopaedia will some day be made into a commercial product.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\appendix

\pagebreak
\section{Sample of the Encyclopaedia in the Different Formats}
\label{samples}

\restylefloat{figure}
\poistovedoksesta{
\begin{figure}[H]
  \begin{center}
    \epsfig{file=ens-otos.eps, height=18cm}
    \caption{Original sample typeset by \LaTeX.}
    \label{fig:tex-print}
  \end{center}
\end{figure}

\pagebreak

\begin{figure}[H]
  \begin{center}
    \begin{tabular}{cc}
    (a) & \epsfig{file=te-winf.eps, height=10cm} \\[2ex]
    (b) & \epsfig{file=te-wpf.eps, height=10cm}
    \end{tabular}
    \caption{Sample displayed by Techexplorer,
     using standard Windows fonts (a), and WordPerfect fonts (b).}
    \label{fig:te-display}
  \end{center}
\end{figure}

\pagebreak

\begin{figure}[H]
  \begin{center}
    \epsfig{file=pdf-display.eps, height=14cm}
    \caption{Sample in PDF displayed by Adobe Acrobat Reader.}
    \label{fig:pdf-display}
  \end{center}
\end{figure}

\begin{figure}[H]
  \begin{center}
    \epsfig{file=pdf-print.eps, height=18cm}
    \vspace{6ex}
    \caption{Sample in PDF printed by Adobe Acrobat Reader.}
    \label{fig:pdf-print}
  \end{center}
\end{figure}

\pagebreak
}

\section{Files Converted for Techexplorer and PDF}
\label{files}

The files are also available electronically at
\url{http://www.math.hut.fi/\~{}kenny/opi/etyo2}.

\subsection{Original files} \label{files-original}
\subsubsection{Original {\tt ens.tex}} \label{enstex-original}
\poistovedoksesta{\verbatiminput{enstex-original}}

\poistovedoksesta{\pagebreak}
\subsubsection{Original {\tt ens.sty}} \label{enssty-original}
\poistovedoksesta{\verbatiminput{enssty-original}}

\poistovedoksesta{\pagebreak}
\subsection{Files Converted for Techexplorer} \label{files-te}
\subsubsection{{\tt ens.tex} Converted for Techexplorer}
\label{enstex-te}
\poistovedoksesta{\verbatiminput{enstex-te}}

\poistovedoksesta{\vspace{1ex}}
\subsubsection{{\tt ens.sty} Converted for Techexplorer} 
\label{enssty-te}
Because Techexplorer does not know how to ask for macro packages
with a \texttt{.sty} extension, \enssty\ was renamed to \ensstytex\
and, of course, modified to comply with Techexplorer's requirements.

\poistovedoksesta{\verbatiminput{ensstytex-te}}

%\poistovedoksesta{\pagebreak}
\poistovedoksesta{\vspace{1ex}}
\subsection{Files Converted for PDF} \label{files-pdf}
\subsubsection{{\tt ens.tex} Converted for PDF} \label{enstex-pdf}
The only change was adding the line
\begin{verbatim}
  \usepackage{times}
\end{verbatim}
after line 11:
\begin{verbatim}
  \pssilent                            % Ei turhia ilmoituksia kuvista
\end{verbatim}

\pagebreak
\subsubsection{{\tt ens.sty} Converted for PDF} \label{enssty-pdf}
Only the following changes were made:

\begin{enumerate}

\item
  The line
\begin{verbatim}
  \RequirePackage{hyper}
\end{verbatim}
  was added after the other \verb-\RequirePackage- commands.

\item 
  The line
\begin{verbatim}
  \edef\risuaita{\string#}
\end{verbatim}
  was removed.
  
\item
  The low-level HTML commands on the lines
\begin{verbatim}
  \newcommand{\htmladdnormallink}[2]
    {\special{html:<a href="#2"\suurempikuin}#1\special{html:</a>}}
  \newcommand{\htmladdsmashlink}[2]
    {\special{html:<a href="#2"\suurempikuin}\protect\smash[b]{#1}%
    \special{html:</a>}}
  \newcommand{\htmladdname}[1]
    {\special{html:<a name="#1"\suurempikuin}\special{html:</a>}}
\end{verbatim}
  were changed to use commands defined in the \latexpaketti{hyper} package.
  The new forms are:
\begin{verbatim}
  \newcommand{\htmladdnormallink}[2]{\hyperreference{#2}{#1}}
  \newcommand{\htmladdsmashlink}[2]{\hyperreference{#2}%
    {\protect\smash[b]{#1}}}
  \newcommand{\htmladdname}[1]{\blindhyperanchor{#1}}
\end{verbatim}

\item
  The lines
\begin{verbatim}
  \marginpar{\linkkilaatikko{Sisällys}{\risuaita Sisällys}}%
  \marginpar{\linkkilaatikko{Hakemisto}{\risuaita Hakemisto}}%
  \marginpar{\linkkilaatikko{Ohjeet}{\risuaita Ohjeet}}%
\end{verbatim}
  at the end of the definition of \verb-\perusreunapalikat- were removed.

\item
  The line
\begin{verbatim}
  \newcommand{\ETKM}[2]{\linkkialleviivaus{\mbox{#1}}{#2}}
\end{verbatim}
  was changed to:
\begin{verbatim}
  \newcommand{\ETKM}{}
\end{verbatim}

% \item
%   The definition of \verb-\Avain- on the line
% \begin{verbatim}
%   \newcommand{\Avain}[1]{\write14{\quad\quad #1 ^^J}}
% \end{verbatim}
%   was changed to the empty form:
% \begin{verbatim}
%   \newcommand{\Avain}[1]{}
% \end{verbatim}

\end{enumerate}

After the conversion, the file is as follows:
\poistovedoksesta{\verbatiminput{enssty-pdf}}




\pagebreak
\addcontentsline{toc}{section}{Bibliographical References}

%\bibliography{etyo2}
%\bibliographystyle{plain}

\renewcommand{\refname}{Bibliographical References}
\begin{thebibliography}{B:Mmm99}

\bibitem[B:Ado85]{adobe:psblue}
  Adobe Systems Incorporated.
  \bibotsikko{PostScript Language Tutorial and Cookbook}.
  Addison-Wesley, Reading, Massachusetts, U.S.A.,
  1985.

\bibitem[B:Ado90a]{adobe:pstypeone}
  Adobe Systems Incorporated.
  \bibotsikko{Adobe Type 1 Font Format}.
  Addison-Wesley, Reading, Massachusetts, U.S.A.,
  1990.

\bibitem[B:Ado90b]{adobe:psred}
  Adobe Systems Incorporated.
  \bibotsikko{PostScript Language Reference Manual}.
  Addison-Wesley, Reading, Massachusetts, U.S.A.,
  1990.

\bibitem[B:Doc96]{doctorlinux}
  \bibotsikko{Doctor Linux}.
  Fourth Edition.
  Red Hat Software/Linux Systems,
  3203 Yorktown Ave, Suite 123 Durham, NC 27713, U.S.A..
  June, 1996.
  ISBN 1-888172-61-4.

\bibitem[B:GMS94]{companion}
  Michel Goossens, Frank Mittelbach, and Alexander Samarin.
  \bibotsikko{The \LaTeX\ Companion}.
  Addison-Wesley, Reading, Massachusetts, U.S.A.,
  1994.
  ISBN 0-201-54199-8.

\bibitem[B:HCO96]{hardcopy:supra}
  \bibjutunotsikko{Adobe Rolls Out 'Supra' Production Printing Architecture
    --- Seybold Seminars Boston 1996}
  \biblehdennimi{The Hard Copy Observer}.
  March, 1996.
  \url{http:\lb //www.\lb adobe.\lb com\vino prodindex\vino
    postscript\vino PDFS\vino supranews.pdf}.

\bibitem[B:Jok95]{riikka:gradu}
  Riikka Jokinen.
  \bibotsikko{Hypermedia ja matematiikan opetus}.
  Master's thesis. 
  University of Helsinki, Finland,
  November, 1995.
  In Finnish.

\bibitem[B:Ker96]{kerttula}
  Esa Kerttula.
  \bibotsikko{Multimedialla tiedon valtatielle 
           --- teknologiat, sovellukset, trendit}.
  Liikenneministeriö, Edita, Helsinki, Finland,
  1996.
  ISBN 951-37-1881-6.
  In Finnish.

\bibitem[B:Knu79]{knuth:tex_and_metafont}
  Donald E. Knuth.
  \bibotsikko{\TeX and METAFONT. New Directions in Typeressing}.
  American Mathematical Society.
  Digital Press, Bedford, Massachusetts, U.S.A.,
  1979.
  ISBN 0-962376-02-9.

\bibitem[B:Knu86a]{knuth:cm}
  Donald E. Knuth.
  \bibotsikko{Computer Modern Typefaces. (Computers \& Typesetting / E)}.
  Addison-Wesley, Reading, Massachusetts, U.S.A., 
  1986. 
  ISBN 0-201-13438-1.

\bibitem[B:Knu86b]{knuth:mf}
  Donald E. Knuth.
  \bibotsikko{\MF: The Program. (Computers \& Typesetting / D)}.
  Addison-Wesley, Reading, Massachusetts, U.S.A., 
  1986. 
  ISBN 0-201-13446-2.

\bibitem[B:Knu90]{knuth:texbook}
  Donald E. Knuth.
  \bibotsikko{The \TeX book}.
  Addison-Wesley, Reading, Massachusetts, U.S.A., 
  1990. 
  ISBN 0-201-13448-9.

\bibitem[B:Lam94]{lamport:latex}
  Leslie Lamport. 
  \bibotsikko{\LaTeX --- A Document Preparation System.
           User's Guide and Reference Manual}.
  Second Edition.  
  Addison-Wesley, Reading, Massachusetts, U.S.A.,
  1994.

\bibitem[B:Saa97]{saarelma97:ktkt}
  Hannu Saarelma.
  \bibotsikko{Kuvan- ja Tekstinkäsittelytekniikka.}
  Oppikirja numero 578.
  Otatieto Oy, Helsinki, Finland,
  March, 1997.
  ISBN 951-672-247-4.
  In Finnish.

\bibitem[B:Ste96]{steinberger:emj}
  Mark Steinberger.
  \bibjutunotsikko{Electronic Mathematics Journals}.
  \biblehdennimi{Notices of the American Mathematical Society},
  43:13--16, 
  1996.
  \url{http:\lb //math.albany.edu:\lb 8800\vino \~{}mark\vino ej.html}.

\bibitem[B:WeK96]{runninglinux}
  Matt Welsh and Lar Kaufman.
  \bibotsikko{Running Linux}.
  Second Edition.
  O'Reilly \& Associates,
  101 Morris St. Sebastopol, CA 95472, U.S.A.,
  August, 1996.
  ISBN 1-56592-151-8.

\bibitem[B:Wol91]{mathematica}
  Stephen Wolfram
  \bibotsikko{Mathematica --- A System for Doing Mathematics by Computer}.
  Second Edition.
  The Advanced Book Program,
  Addison-Wesley, Redwood City, California, U.S.A.,
  1991.
  ISBN 0-201-51502-4.

\end{thebibliography}

\addcontentsline{toc}{section}{Internet References}
\renewcommand{\refname}{Internet References}

\begin{thebibliography}{I:MMMMMM}

\bibitem[I:Ad]{adobe}
  \bibinternetotsikko{Adobe Systems Incorporated}.
  \url{http:\lb //www.\lb adobe.\lb com/}.

\bibitem[I:AdEPDF]{adobe:psextreme_and_pdf}
  Steve Hannaford.
  \bibinternetotsikko{Adobe PostScript Extreme and PDF}.
  Reprinted from Adobe Magazine.
  \url{http:\lb //www.\lb adobe.\lb com\vino newsfeatures\vino 
    pstextreme\vino main.html}.

\bibitem[I:AdExt]{adobe:psextreme}
  \bibinternetotsikko{Adobe PostScript Extreme ---
    Adobe's Portable Document Format-based Architecture 
    for High-Volume, High-Speed Printing Systems}.
  \url{http:\lb //www.\lb adobe.\lb com\vino prodindex\vino
    postscript\vino PDFS\vino Extreme.pdf}.

\bibitem[I:AdSWP]{adobe:supra_whitepaper}
  \bibinternetotsikko{Adobe Supra ---
    Adobe's High-Performance Raster Image Processor (RIP) 
    Architecture for Production Printing Systems. White Paper}.
  February, 1996.
  \url{http:\lb //www.\lb adobe.\lb com\vino prodindex\vino
    postscript\vino PDFS\vino suprawp.pdf}.

\bibitem[I:Bak]{bakoma}
  Basil K. Malysev.
  \bibinternetotsikko{BaKoMa}.
  PostScript type 1 renditions of Computer Modern fonts.
  \bibctan{fonts\vino cm\vino ps-type1\vino bakoma/}.

\bibitem[I:BS]{bluesky}
  \bibinternetotsikko{Blue Sky Research}.
  \url{http:\lb //www.\lb bluesky.\lb com/}.

\bibitem[I:Bum]{bump:math-and-hypertext}
  Daniel Bump.
  \bibinternetotsikko{Math and Hypertext}.
  November, 1996.
  \url{http:\lb //match.\lb stanford.\lb edu\vino bump\vino mathhtml.\lb html}.

\bibitem[I:Dvips]{dvips}
  Tomas Rokicki.
  \bibinternetotsikko{Dvips}.
  Version 5.62.
  \bibctan{dviware\vino dvips/}.

\bibitem[I:DvipsP]{dvipsp}
  Thomas Rokicki.
  \bibinternetotsikko{Dvips: A \TeX\ Driver}.
  \bibctan{dviware\vino dvips\vino dvips.\lb ps.\lb gz}.

\bibitem[I:DvipsH]{dvipsh}
  \bibinternetotsikko{Dvips: A DVI-to-PostScript Translator}.
  Based on `dvips.tex' by Tomas Rokicki; see \cite{dvipsp}.
  \url{http:\lb //www.\lb cs.\lb utah.\lb edu\vino csinfo\vino texinfo\vino
    dvips\vino dvips.\lb html}.

\bibitem[I:GS]{ghost}
  Russell Lang.
  \bibinternetotsikko{Ghostscript, Ghostview and GSview}.
  February 26, 1997.
  \url{http://www.cs.wisc.edu/~ghost/}.

\bibitem[I:HTFAQ]{hypertex-faq}
  Arthur P. Smith. 
  \bibinternetotsikko{HyperTeX FAQ}.
  Version 0.03.
  June 25, 1995.
  \url{http:\lb //math.albany.edu:\lb 8800\vino hm\vino emj\vino 
    sieb-\lb tools\vino HyperTeX\_FAQ.\lb June95.\lb txt}.

\bibitem[I:HTML]{html}
  Dave Raggett, Arnaud Le Hors, Dan Connolly.
  \bibinternetotsikko{HyperText Markup Language (HTML): 
    Working and Background Materials}.
  The World Wide Web Consortium (W3C).
  \url{http:\lb //www.\lb w3.\lb org\vino pub\vino WWW/\vino MarkUp/}.

\bibitem[I:Hyp]{hyper-paketti}
  Michael Mehlich. 
  The \latexpaketti{hyper} macro package for \LaTeX.
  Version 3.0a.
  November 1, 1995.
  \bibctan{macros\vino latex\vino contrib\vino supported\vino hyper/}.

\bibitem[I:HypR]{hyperref-paketti}
  Sebastian Rahtz, Yannis Haralambous.
  The \latexpaketti{hyperref} macro package for \LaTeX.
  May 9, 1996.
  \bibctan{macros\vino latex\vino contrib\vino supported\vino hyperref/}.

\bibitem[I:HypM]{hypermail}
  \bibinternetotsikko{Mailing List Archives on math.albany.edu}.
  Includes mailing list archives from 9 Nov 1994 to 27 Nov 1996
  for, \emph{i.a.}, the following mailing lists: \texttt{hypertex@\lb
    snorri.\lb chem.\lb washington.\lb edu} (discontinued),
  \texttt{hypertex-\lb announce@\lb aps.\lb org},
  \texttt{hypertex-dev@\lb snorri.\lb chem.\lb washington.\lb edu}
  (discontinued), \texttt{hypertex-dev@\lb aps.\lb org}.
  \url{http:\lb //math.albany.edu:\lb 8800\vino hm\vino archs.\lb html}.

\bibitem[I:Lanl]{lanl}
  Paul Ginsparg.
  \bibinternetotsikko{HyperTeX}.
  Los Alamos National Laboratory WWW page.
  \url{http:\lb //xxx.lanl.gov\vino hypertex/}.

\bibitem[I:LDP]{ldp}
  Greg Hankins.
  \bibinternetotsikko{The Linux Documentation Project: Homepage}.
  1997.
  \url{http:\lb //sunsite.\lb unc.\lb edu\vino mdw\vino linux.\lb html}.

\bibitem[I:MC]{metacard}
  \bibinternetotsikko{MetaCard Home Page}.
  MetaCard Corporation,
  4710 Shoup pl. Boulder, CO 80303, U.S.A.,
  phone (+1 303) 447 3936, fax (+1 303) 499 9855.
  1996.
  \url{http:\lb //www.\lb metacard.\lb com/}.

\bibitem[I:MS]{ms}
  \bibinternetotsikko{Welcome To Microsoft}.
  Microsoft Corporation.
  \url{http:\lb //www.\lb microsoft.\lb com/}.

\bibitem[I:Ndvi]{ndvi}
  K. Peeters.
  \bibinternetotsikko{nDVI --- a DVI viewer plugin for Netscape (Unix)}.
  \url{http:\lb //norma.\lb nikhef.nl\vino \~{}t16\vino ndvi\_doc.\lb html}.
  March, 1997.

\bibitem[I:NS]{netscape}
  \bibinternetotsikko{Welcome to Netscape}.
  Netscape Communications Corporation.
  \url{http:\lb //www.\lb netscape.\lb com/}.

\bibitem[I:NYJM]{nyjm}
  \bibinternetotsikko{HyperTeX}.
  New York Journal of Mathematics WWW page.
  \url{http:\lb //nyjm.albany.edu:\lb 8000\vino hyper.html}.

\bibitem[I:Par]{paradissa}
  Basil K. Malysev.
  \bibinternetotsikko{Paradissa}.
  PostScript type 1 renditions of Computer Modern fonts.
  \bibctan{fonts\vino cm\vino ps-type1\vino paradissa/}.

\bibitem[I:PDFC]{ginsparg:pdf-comments}
  Paul Ginsparg.
  \bibinternetotsikko{Comments on pdf}.
  October 25, 1994.
  \url{http:\lb //xxx.lanl.gov\vino hypertext\vino pdfcomments.\lb txt}.

\bibitem[I:Pol]{pollack:math-and-html}
  Paul Pollack.
  \bibinternetotsikko{Math and HTML}.
  1996.
  \url{http:\lb //home1.gte.net\vino paulp\vino math-\lb www.htm}.

\bibitem[I:Psf]{psfig-paketti}
  The \latexpaketti{psfig} macro package for \LaTeX.
  \bibctan{graphics\vino psfig/}.

\bibitem[I:TE]{techexplorer}
  \bibinternetotsikko{IBM techexplorer product page for V1.2}.
  IBM Corporation.
  \url{http:\lb //www.\lb ics.\lb raleigh.\lb ibm.\lb com\vino ics\vino 
       techexp.\lb htm}.

\bibitem[I:TEUG]{techexplorer-ug}
  \bibinternetotsikko{IBM techexplorer Hypermedia Browser V1.2 User's Guide}.
  IBM Corporation,
  1996.
  \url{http:\lb //www.ics.raleigh.ibm.com\vino pub\vino techug.\lb html}.

\bibitem[I:Whi]{whitehouse:tex-dvips-pdf}
  Kendall Whitehouse.
  \bibinternetotsikko{Creating quality Adobe PDF files from TeX with DVIPS}.
  Adobe Systems Incorporated.
  Technical Solutions Database, FaxYI number 131303.
  1996.
  \url{http:\lb //www.adobe.com\vino supportservice\vino custsupport\vino 
    SOLUTIONS\vino 3a26.htm}.

\bibitem[I:Wol]{mathematica-www}
  \bibinternetotsikko{Wolfram Research: Makers of Mathematica}.
  \url{http:\lb //www.\lb mathematica.\lb com/}.

\bibitem[I:WolHM]{wolfram:html-math}
  Bruce Smith.
  \bibinternetotsikko{HTML-Math proposal}.
  May 31, 1996.
  Proposal from Wolfram Research to the w3c-math working group.
  \url{http:\lb //www.ams.org\vino html-\lb math\vino wolfram-\lb 
       proposal-\lb 960531.\lb html}.

\bibitem[I:Xdvi]{xdvi}
  Paul Vojta.
  \bibinternetotsikko{xdvi and gsftopk}.
  1997.
  \url{http:\lb //math.\lb berkeley.\lb edu\vino \~{}vojta\vino xdvi.html}.

\bibitem[I:YaY]{yandy}
  \bibinternetotsikko{Y\&Y Inc Home Page}.
  \url{http:\lb //www.\lb yandy.\lb com/}.


\end{thebibliography}



\end{document}

