l2x -- conversion from LaTeX to other formats\ Version 1.13

Henning Schulzrinne\ Columbia University\ New York, NY\ hgs@cs.columbia.edu
July 1, 2002


l2x is a general-purpose LaTeX converter. It consists of a parser written in C, which then calls Tcl functions for each LaTeXfunction. The Tcl functions return the translated value.


The newest version of this package is available via the web page. It is a gzip'ed tar file. You must have the Tcl libraries (version 7.5 or higher) installed, for example obtained from the Sun Tcl site. Edit the Makefile for the correct location of the Tcl library and include files and type make.


To translate the LaTeX file input.tex using the translator l2ms.tcl:
  l2x l2ms.tcl paper.tex

The application lf is a filter that removes blank lines and, with the -b flag specified, initial blank space on lines. It is intended for nroff conversion. The application pgstrip removes extra blank lines from the beginning of a page and is due to Jon Postel. The script fix.sh processes an RFC or Internet Draft, including the necessary stripping of backspaces and the conversion of FORMFEED to real formfeeds (control-L).

Currently, the following example translators are provided:

Convert input to a single HTML file.
Convert to nroff/troff -ms macros. Currently converts to a format suitable for FAQs and READMEs (no page breaks or page numbers), but that is readily changed.


Currently, only a subset of LaTeX commands is supported. Many are easy to add, but the following might require more work, albeit mostly limited to writing new Tcl functions:


To convert nroff output to plain ASCII, without underscores, use
  l2x l2ms.tcl foo.tex | nroff -ms | col | ul -tdumb > foo.txt

To generate IETF Internet Drafts, the following pipeline can be used:

l2x rtsp.tex | lf -b | pp.pl > rtsp.ms 
tbl < rtsp.ms | neqn | nroff -ms | col | ul -Tdumb | 
sed -e 's/]FF/]
                 /' | pgstrip -n5 > draft-ietf-mmusic-rtsp-03.txt


Copyright (c) 1994-1997 Henning Schulzrinne\ All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistribution for direct commercial gain requires prior permission.
  2. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  3. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  4. All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by Henning Schulzrinne.

    This software is provided by the author(s) "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.