Settings Help
Comprehensive TeX Archive Network
Home Upload Browse

Direc­tory tex-archive/support/escapeTeXt


This Python program tries to turn plain text into something that can
get through LaTeX.  The motivating application is to put text gathered
in a web application into a report generated in LaTeX.

1) This program can be called from the command line.  These commands 
run Project Gutenberg's version of Jack London's _Call Of the Wild_.
  ./ -l -ocallw10.ltx < callw10.txt
  pdflatex callw10.ltx
  acroread callw10.pdf
The result is not pretty; the program makes no attempt to recognize 
sections, etc.  (For this, there are programs on the web specialized  
to do Gutenberg texts.)  But the text makes it through.

Here is the usage statement for the command line program: Convert plain text so it may make it through LaTeX [options] 
  where the options are
    -f filename (default None) file to read from; if None then stdin is used
    -o filename (default None) file to write to; if None then stdout is used
    -c Turn off the attempt to balance open and closed quotes
    -r Turn off the refinements (em dashes, en dashes ..)
    -l Add simple LaTeX header and footer 
    -v (default True) sets verbose output
    --help or -?  Give this usage statement

2) The routines can also be called from other Python programs.  Thus, in 
a program the code
  import escapeTeXt
gets as "result" the text that will then be printed into the LaTeX file.

Author: Jim Hefferon, based on txt2latex by Tristan Miller
Date: 2006-Aug-27


Name Size Date Notes
README 1597 2006-08-27 03:19:00 7636 2006-08-27 03:19:00 2936 2006-08-27 03:19:00

Down­load the com­plete con­tents of this di­rec­tory in one zip archive (4.6k).

es­capeTeXt – Make plain text safe for use in LaTeX

This pro­gram mas­sages plain text to make it more likely to safely pass through LaTeX.

It can be run from the com­mand line, so you can do drive-by LaTeXing. The in­ter­nal rou­tines can also be im­ported for use by other Python pro­grams, for in­stance one that makes doc­u­ments from text gath­ered on a web form.

Li­censeThe LaTeX Project Public Li­cense
Main­tainerJim Hef­feron
Topics gen­er­ate (La)TeX from other sorts of sources
Guest Book Sitemap Contact 2014-04-19 06:22 CEST