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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
|
.TH LTX2X 1 "21 January 1997"
.SH NAME
ltx2x \- replaces LaTeX commands by user-defined strings, such as HTML tags
.SH SYNOPSIS
.B ltx2x
[
.I options
]
.IR infile
.IR outfile
.br
.SH DESCRIPTION
The program
.B ltx2x
takes a LaTeX source file
.I infile
and replaces LaTeX commands by user-defined strings. For each command
strings may be inserted at the start and end of the command and between
any parameters that the command might take. Note that
.I infile
must be the complete name of the LaTeX source file
including the extension (e.g., root.tex).
The result is written to file
.IR outfile.
.PP
The user-defined replacement strings are specified in a
.I command table file
which is read at runtime. This file is a formatted text
file which can be edited by any text editor. Example command table
files are provided for at least de-TeXing a LaTeX
document and for conversion from LaTeX to HTML tags
so that the document can be read via a WWW browser.
.PP
.B Ltx2x
will not recognize the LaTeX \\include and \\input commands
as requiring the inclusion of another LaTeX file, so all
the LaTeX source to be processed should be in a single file.
(A program such as
.B flatten
can be used to generate a single LaTeX file from multiple sources.)
.PP
.B Ltx2x automatically produces an error log file called
.I ltx2x.err
and a listing of the command table as processed is
automatically generated as file
.I ltx2xct.lis
Either of these files can be examined with a text editor after each run.
.PP
Ltx2x also includes an interpreter and a source level debugger for the
EXPRESS-A programming language which is based on the ISO standard
ISO 10303-11:1994 "Industrial automation systems and integration ---
Product data representation and exchange --- Part 11: Description
methods: The EXPRESS language reference manual", and also
Douglas Schenck and Peter Wilson, "Information Modeling the
EXPRESS Way", Oxford University Press, 1994 (ISBN 0-19-508714-3).
.PP
The program
.B printct
can be used to pretty-print a command table file, and this will
also update any old command table file to the current syntax.
.PP
For more information see the manual: Peter Wilson,
"LTX2X: A LaTeX to X Auto-tagger",
the source for which should be in directory DOCUMENTDIR
in various formats. In fact it is highly desirable that you read
the manual before running the program --- it gives full details
of the syntax and capabilities of command tables, and advice
on how to extend the program when the provided capabilities are
insufficient.
.SH OPTIONS
.TP
.B -c
By default,
.B ltx2x
ignores all LaTeX comments in the
.IR infile.
This option causes
.B ltx2x
to write the comments to the output
.IR outfile.
.TP
.B -f ctname
By default the command table is read from file
.I ltx2x.ct.
This option will cause the command table to be read from file
.I ctname
instead.
.TP
.B -i num
Print interpreter diagnostic information to the error file
.I ltx2x.err.
The value of
.I num
should be between 1 and 9 inclusive, with larger numbers producing
increasing amounts of diagnostic information.
.TP
.B -l num
Print diagnostic information to the error file
.I ltx2x.err.
The value of
.I num
should be between 1 and 9 inclusive, with larger numbers producing
increasing amounts of diagnostic information.
.TP
.B -p num
This option requests
.B ltx2x to pretty-print the output file (at least as far as it
is able to).
.I num
is the desired maximum number of characters per output line.
.TP
.B -t
Generate diagnostics related to processing the command table file.
.TP
.B -w
By default,
.B ltx2x
outputs source white space to the output file just as it reads it.
This option causes it to collapse any amount of contiguous
white space to a single space. The
.B -p
option includes this option.
.TP
.B -y
Like the
.B -l
option but only produces parser related diagnostics. (This is currently
a null option, but may be implemented in a future release.)
.TP
.B -C
If the
.B -i
option is used, then this option cancels diagnostic printing for the
interpreter's parser module.
.TP
.B -D character
The
.I character
the operating system uses for catenating directory names when
forming a pathname.
The default is the slash (/) character.
.TP
.B -E
If the
.B -i
option is used, then this option cancels diagnostic printing for the
interpreter's runtime executor module.
.TP
.B -P characters
The
.I characters
the operating system uses when seperating pathnames in a list of
pathnames. The default characters are space ( ), colon (:) and
semi-colon (;). The space is always set as one of the
.IR characters.
.TP
.B -S
This option enables the intractive source level debugger for the
EXPRESS-A interpreter.
.SH ENVIRONMENT
.B Ltx2x
searches for command table files in the directories in the paths defined by
the LTX2XTABLES environment variable. If this variable is not
set then it only searches in the current directory. Note that
.I infile
is always assumed to be located in the current directory.
.SH FILES
.I ltx2x.ct
--- Skeleton command table file for interactive command file inclusion.
.PP
.I bye.ct
--- Command table file for replacing a document with "Goodbye document".
.PP
.I detex.ct
--- Skeleton command table file for deTeXing a LaTeX document.
.PP
.I remcom.ct
--- Skeleton command table file for removing comments from a LaTeX document.
.PP
.I l2h.ct
--- Command table for conversion from LaTeX to HTML.
.PP
.I fun.ct
--- Examples of EXPRESS-A code.
.PP
These example command table files should be in directory CTDIR.
.SH SOURCES
Complete source files and documentation for
.B ltx2x
are maintained on the NIST SOLIS (STEP On Line Information Service)
system in directory pub/subject/sc4/editing/latex/programs/ltx2x. SOLIS is
accessible via:
.br
Anonymous ftp to ftp.cme.nist.gov
.br
the URL http://www.nist.gov/sc4
.SH SEE ALSO
.BR latex(1), flatten(1)
.SH AUTHOR
Peter Wilson, Catholic University of America and the National
Institute of Standards and Technology (pwilson@cme.nist.gov).
|