1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
|
% run this through LaTeX or L2A -*- text -*-
\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 \\ Norwegian Computing Center}
\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}
UUCP: \= C=no;PRMD=uninett;O=nr;S=Hannemyr;G=Gisle \= (X.400 SA format) \kill
\> Gisle Hannemyr \\
\> Norwegian Computing Center \\
\> P.O.\ 114 Blindern \\
\> N-0314 Oslo 3 \\
\> Norway \\
\\
EAN: \> C=no;PRMD=uninett;O=nr;S=Hannemyr;G=Gisle \> (X.400 SA) \\
\> gisle.hannemyr@nr.no \> (RFC-822 ) \\
Inet: \> gisle@ifi.uio.no \\
UUCP: \> ...!mcsun!ifi!gisle \\
\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 three switches:
{\tt -a} displays copyright etc.
{\tt -h} displays brief help
{\tt -n} uses Norwegian for texts etc.
\section{Current state}
\LtoA{} handles a subset \LaTeX{}. Most if the missing things I
plan to add when I need them, but there are some features of \LaTeX{}
(e.g.\ the $\backslash$kill function) that I can not see how can
be handled with lex. Some manual polishing of the output will always
be required.
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 proably barf when fed
other people's input. Consider the current state of \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 plan to post \LtoA{} on the net in the near future. The current
% version is a sort of ``beta'' release I mail to people who have shown
% some interest in it. Any feedback you can give on the current version
% will be appreciated.
\section{Diagnostics}
Unrecognized markup commands generate an error message on the screen.
They 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*{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.
Finally, I nurse a secret dream of having \LtoA{} generate
{\em WordPerfect} or {\em Word} files preserving italics etc.
Enjoy!
\end{document}
% EOF
|