Comprehensive TeX Archive Network
Home Upload Browse

Direc­tory tex-archive/support/ltx2x

file: README for version 0.92 (November 1999) release of LTX2X ---
      A LaTeX to X Autotagger


    The LTX2X program, which is written in C, replaces LaTeX commands 
in a LaTeX document by user-defined strings. In essence, LaTeX tags can
be replaced by other kinds of document tags (e.g. HTML/SGML or RTF tags),
or can be removed altogether. The program also has an unsophisticated 
pretty-print capability.

    The replacement strings for the LaTeX commands are specified
in a command table file, which can be created simply via any text 
editor. For more advanced users an interpreter for the EXPRESS-A
programming language is also included. EXPRESS-A includes STRING, LIST
and ENTITY types as as primitives of the language, as well as the 
usual REAL, INTEGER and LOGICAL types. Regular expressions are also
an integral part of EXPRESS-A. The interpreter also includes an 
interactive source level debugger for EXPRESS-A.

    The supplied command tables include facilities for, among others:
o deTeXing and pretty-printing 
o Conversion from LaTeX tagging to HTML tagging

    The 100+ page user manual is supplied as LaTeX source, Postscript,
and in deTeXed and HTML forms, the latter two being automatically
generated by running LTX2X on the LaTeX source.

    LTX2X is compilable by at least the GNU gcc compiler.


    Files in this distribution are:
o README                     (this file)

o l2xlib.c and l2xlib.h      main program and library functions for LTX2X
o l2xlibtc.h                 keywords and their string representations
o l2xcom.h                   typedefs
o l2x.l                      lexer source to be processed by flex
o l2xlexyy.c                 lexer code after flex processing
o l2x.y                      parser source to be processed by bison
o l2xytab.c and l2xytab.h    parser code after bison processing
o l2xacts.c and l2xacts.h    standard action functions
o l2xusrlb.c and l2xusrlb.h  user-defined action functions
o srchenv.c and srchenv.h    C code for directory searching
o getopt.c and getpopt.h     C code for command line options
o strtypes.h                 header file for string proccessing

o l2xistup.c and l2xicmon.h  interface for the interpreter
o l2xirtne.c, l2xistd.c,     interpreter parsing routines
  l2xidecl.c, l2xistmt.c,
  l2xiexpr.c, l2xiprse.h
o l2xixutl.c l2xiexec.h      interpreter executor utility routines
o l2xixstd.c l2xixstm.c,     routines for interpreter executor module
o l2xirexp.c, l2xirexp.h     routines for processing regular expressions
o listsetc.c, listsetc.h     general list processing routines
o l2xiscan.c l2xiscan.h      interpreter lexing routines
o l2xisymt.c, l2xisymt.h     interpreter symbol table support
o l2xidbug.c                 source level debugger for the interpreter
o l2xierr.c, l2xierr.h       EXPRESS-A user focussed error handling
o l2xiidbg.c l2xiidbg.h,     diagnostics for interpreter developer
o licomsym.h                 general interpreter header file
o l2xidftc.h, l2xiertc.h,    keywords and their string representations
  l2xisctc.h, l2xisftc.h

o printct.c                  C program for command table printing and update

o man                        manpage
o makefile                   makefile for ltx2x
o ltx2html.sty               Package file for ltx2x LaTeX to HTML
o ltx2x.tex                  User manual in LaTeX format
o                   User manual in PostScript format
o ltx2x.html                 HTMLed version of ltx2x.tex
o ltx2x.txt                  deTeXed version of ltx2x.tex
o ltx2x.ct                   Dummy command table file
o bye.ct                     Example "Goodbye document" command table file
o remcom.ct                  Example decommenter command table file
o detex.ct                   Example deTeXing command table file
o l2h.ct                     Example command table for LaTeX to HTML conversion
o fun.ct                     Example EXPRESS-A code
and possibly
o ltx2x.tar.gz               Tared and Zipped archive of all the above

Changes in version 0.92 (November 1999)
o Added -h option to print usage
o Eliminated known warnings from gcc
o Changed makefile to handle (not) system supplied getopt
o Changed makefile to add printct installation


    ltx2x is written as a parser for LaTeX. The main source is 
in l2xlib.c. Source for the lexer is in l2x.l which has to be
processed by flex (or equivalent) and the parser is in l2x.y
which is intended to be processed by bison (or equivalent).
Support functions are in files l2xacts.c, l2xusrlb.c, srchenv.c
and getopt.c. After the lexer and parser files are processed,
all the code files must be compiled and linked to form the executable.

    The syntax of the command table has been extended and modified.
The printct program will convert a command table in the original
syntax to the new syntax.

Via Make

0. Read the manual

1. Edit the first part of makefile to match your system's configuration.

----- For the ltx2x program

   If you are feeling brave, do `make all'. Otherwise continue as below.  

2. Do `make' (processes lexer and parser and compiles and links the program)

3. (Optional) Set the environment variable LTX2XTABLES to the
   directories where command table files might be located

4. Test the program

5. Do `make install' (moves the binary into its final location)

6. Do `make manpage' (edits the manpage and copies it to its working location)

7. Do `make ctables' (copies the command tables to their working location)

8. Do `make doc' (copies the user manual sources to their final location)

9. Do `make clean' (deletes the object code, yacc output, and edited
   manpage files)

----- For the printct program, if desired and preferably after installing ltx2x

10. Do `make printct' to compile printct.c.

11. Do `make installprintct' to move the binary to its final destination.

12. Do `make cleanprintct' to delete printct binary and object files

By Hand

0. Read the manual.
   Steps 1 and/or 2 below are only required if changes have been made
to the files l2x.y and/or l2x.l, respectively.

1. Run bison on l2x.y. Rename to l2xytab.c and rename to l2xytab.h

2. Run flex on l2x.l. Rename lex.yy.c to l2xlexyy.c.

3. Compile all the .c files

4. Link the compiled code to form the final program binary

5. (Optional) Set the environment variable LTX2XTABLES to the
   directories where command table files might be located

6. Test the program

7. Move the binary to its final destination

8. Edit the manpage file and copy it to its working location, renaming 
   it appropriately

9. Copy the example .ct files to their working location

10. Copy the manual source filers to their final location

11. Compile printct.c and move the binary to its final destination

12. Remove intermediate files


    LTX2X has been written by Peter Wilson (ex The Catholic University 
of America and NIST). Development of the software upto and including
version 0.7 (November 1996) was funded by the United States Government 
and is not subject to copyright. This version is released under the
LaTeX Project Public License.

    Please send any comments to Peter Wilson at

29 November 1999


Name Size Date Notes
NOSUPPORT 2778 2001-07-02 07:20:00
README 7283 1999-12-01 12:46:00
bye.ct 523 1997-01-22 01:00:00
detex.ct 18335 1997-01-22 01:00:00
fun.ct 9392 1997-01-22 01:00:00
getopt.c 2915 1997-01-24 01:00:00
getopt.h 373 1997-01-24 01:00:00
html.sty 12492 1997-01-24 01:00:00
l2h.ct 33904 1997-01-22 01:00:00
l2x.l 42846 1997-01-22 01:00:00
l2x.y 28153 1997-01-22 01:00:00
l2xacts.c 17313 1997-01-24 01:00:00
l2xacts.h 497 1997-01-24 01:00:00
l2xcom.h 3101 1997-01-24 01:00:00
l2xicmon.h 1621 1997-01-24 01:00:00
l2xicpr.h 1281 1997-01-24 01:00:00
l2xidbug.c 34183 1997-01-24 01:00:00
l2xidecl.c 29228 1997-01-24 01:00:00
l2xidftc.h 399 1997-01-24 01:00:00
l2xierr.c 10066 1997-01-24 01:00:00
l2xierr.h 999 1997-01-24 01:00:00
l2xiertc.h 7966 1997-01-24 01:00:00
l2xiexec.h 2326 1997-01-24 01:00:00
l2xiexpr.c 24224 1997-01-24 01:00:00
l2xiidbg.c 8242 1997-01-24 01:00:00
l2xiidbg.h 974 1997-01-24 01:00:00
l2xiprse.h 1230 1997-01-24 01:00:00
l2xirexp.c 18737 1999-12-01 12:47:00
l2xirexp.h 612 1997-01-24 01:00:00
l2xirtne.c 22024 1997-01-24 01:00:00
l2xiscan.c 33935 1999-12-01 12:47:00
l2xiscan.h 513 1997-01-24 01:00:00
l2xisctc.h 9521 1997-01-24 01:00:00
l2xisdcl.c 12593 1997-01-24 01:00:00
l2xisftc.h 1158 1997-01-24 01:00:00
l2xistd.c 22136 1997-01-24 01:00:00
l2xistmt.c 21688 1997-01-24 01:00:00
l2xistup.c 14018 1997-01-24 01:00:00
l2xisymt.c 14410 1997-01-24 01:00:00
l2xisymt.h 5711 1997-01-24 01:00:00
l2xixref.c 5255 1997-01-24 01:00:00
l2xixstd.c 37837 1997-01-24 01:00:00
l2xixstm.c 27671 1997-01-24 01:00:00
l2xixutl.c 53688 1997-01-24 01:00:00
l2xixxpr.c 39290 1997-01-24 01:00:00
l2xlexyy.c 76036 1997-01-24 01:00:00
l2xlib.c 168848 1999-12-01 12:46:00
l2xlib.h 4028 1997-01-24 01:00:00
l2xlibtc.h 6323 1997-01-24 01:00:00
l2xusrlb.c 9914 1997-01-24 01:00:00
l2xusrlb.h 540 1997-01-24 01:00:00
l2xytab.c 328780 1997-01-24 01:00:00
l2xytab.h 2316 1997-01-24 01:00:00
licomsym.h 3035 1997-01-24 01:00:00
listsetc.c 9525 1997-01-24 01:00:00
listsetc.h 1489 1997-01-24 01:00:00
ltx2html.sty 1123 1997-01-22 01:00:00
ltx2x.ct 217 1997-01-22 01:00:00
ltx2x.html 256765 1997-01-22 01:00:00 942694 1997-01-22 01:00:00
ltx2x.tex 258396 1997-01-22 01:00:00
ltx2x.txt 221330 1997-01-22 01:00:00
makefile 7551 1999-12-01 12:46:00
man 5962 1997-01-22 01:00:00
printct.c 34309 1997-01-24 01:00:00
remcom.ct 2417 1997-01-22 01:00:00
srchenv.c 11050 1997-01-24 01:00:00
srchenv.h 203 1997-01-24 01:00:00
strtypes.h 320 1997-01-24 01:00:00
12796 2013-12-31 12:47:32 ==> /macros/la­tex/con­trib/url/url.sty

Down­load the con­tents of this pack­age in one zip archive (658.9k).

ltx2x – Re­place LaTeX com­mands in a doc­u­ment by user-de­fined strings

A pro­gram to re­place LaTeX com­mands by user-de­fined char­ac­ters. Typ­i­cal uses are for dε-TeXing and pretty-print­ing, or for re­plac­ing LaTeX com­mands by SGML, HTML or RTF tags, etc.

Li­censeThe LaTeX Project Public Li­cense
Main­tainerPeter R. Wil­son
Topics con­vert TeX-ish sources to some other markup (than HTML)
Guest Book Sitemap Contact 2014-04-25 06:02 CEST