% if it looks like one long line, canonize end of line delimiter -*- text -*-
% run this through LaTeX or L2A
\documentstyle[12pt]{article}
\pagenumbering{arabic}
\setlength{\parindent}{0em}
\setlength{\parskip}{1ex}
\setcounter{secnumdepth}{0}
\newcommand{\LtoA}{$L_{2}\cal A$}

\begin{document}
\title{\LtoA{} --- a LaTeX detergent}
\author{Gisle Hannemyr \\ Hannemyr Nye Medier AS}
\maketitle


\section{Introduction}

\LtoA\ is a filter to ``detexify'' texts.  That is, it attempts to
remove \LaTeX{} markup commands, leaving only the body of
text.  It is intended to be used when journal editors request plain
ASCII text for typesetting, or when you want to post a plain version
of a \LaTeX{} document on an electronic conference system.

The author's address is:

\begin{tabbing}
settab \= bogus line to set tabstops \= will generate diagnostic \kill
snail: \> Gisle Hannemyr	\\
       \> Hegermannsgt. 13c	\\
       \> N-0478 Oslo		\\
       \> Norway	\\
\\
email: \> gisle@hannemyr.no	\\
       \> gisle@ifi.uio.no	\\
\end{tabbing}


\section{Description}

\LtoA\ is a filter.  It reads from standard input and writes to
standard output.  Typical usage would be:

\begin{quote}
\verb+l2a < foobar.tex > foobar.txt+
\end{quote}

It accepts four switches:

{\tt -a} displays copyright etc.

{\tt -h} displays brief help

{\tt -n} uses Norwegian for texts etc.

{\tt -v} display version number



\section{Compilation}

The enclosed Makefile should be used to compile the program.  It is
only tested with SunOs 5.8.  Some bits in the Makefile indicates that
it also could compile on a Microsoft platform, but that no longer
works.

To test a newly compiled version of l2a, you can do {\tt make test}.
It will read this file (l2a.tex), and create a plain text file
(l2a.txt).  Note that \LtoA{} is {\em supposed} to emit one error
message during this test.  This is because \LtoA{} only recognizes a
subset of \LaTeX{}, and will emit error messages when it encounters
key-words it does not know.  \LtoA{} is not supposed to do a 100
percent job, only to save some tedious work.  Some manual polishing of
the output will always be required.

\section{Current state}

Some Norwegian bias is present in the source code.  In particular
some Scandinavian characters are translated to their counterparts
in the Norwegian/Danish version of the ISO 7-bit character set.

\LtoA{} works for my style of \LaTeX{} usage, but may barf when
fed other people's input.  Consider \LtoA{} as a
starting point: If you want to use it, then it is up to you to hack it
into shape for your style.  Btw.\ if you teach \LtoA{} new tricks, I
would like to get back a copy of your enhancements\ldots I maintain
the code and will add extensions sent me through email to future
versions.




\section{Diagnostics}

Unrecognized markup commands generate an error message on the screen.
This is normal, and do not indicate that the program is not
working properly.  Unrecognized markup commands
are also retained in the text, enclosed in a brackets looking
like this: {\tt @( )@}.  This style of bracketing was chosen so that
it should be simple to use a text editor to search the output file for
these commands and edit the context they appear in.


\section{Footnotes}

\LtoA{} does not recognize such advanced concepts as a
``page''.  To avoid having do deal with pages, it will transform
{\em footnotes} to {\em endnotes} (i.e.\ the footnotes are moved to
the end of file, and renumbered).  \LtoA{} will take care of the
renumbering.  It will insert numbers in angle brackets
(e.g.\ $\langle{}3\rangle{}$) to number the footnotes in the text.


\section{Tables, figures and captions}

Tables and figures are stripped from the text.  They are however
clearly outlined with lines like this\footnote{The text inserted is
actually dependent on which language you have selected.} in the text:

{ \small
\verb+<<=============== NB! Typeset as table. NB! ================>>+\\
\verb+<<=========== NB! Please insert figure here. NB! ===========>>+
}

This should make the missing bits stand out to the dullest of editors.

Captions for figures and tables are marked like this, with the actual
text of the caption on the next line.

{ \small
\verb+  --------------- Caption for figure or table: -------------+
}

A line like this is used to mark when end of the point where the table
or figure should be inserted.

{ \small
\verb+<<==========================================================>>+
}

Please equip the editor with scissors and glue and refer him/her to
the paper version typeset with \LaTeX{} to find the actual
figures and tables (or submit them on separate sheets of paper).


\section{Things for you to do:}

\LtoA{} is far from complete.  It is very weak as far as mathematical
mode are concerned (I don't write much mathematics).

However, I hope the current version still are of some use.  The lex
source is easy to maintain.  I suggest that users add the stuff they
need when they need it.

The most urgent thins on the ``to do'' list is functions to handle
included files, cross-references, citations and bibliographies.

\LtoA{} should also have an option to use an 8-bit character set
(ISO~8859/1) for accented characters.

Enjoy!

\end{document}

% EOF
