summaryrefslogtreecommitdiff
path: root/support/escapeTeXt/README
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /support/escapeTeXt/README
Initial commit
Diffstat (limited to 'support/escapeTeXt/README')
-rw-r--r--support/escapeTeXt/README39
1 files changed, 39 insertions, 0 deletions
diff --git a/support/escapeTeXt/README b/support/escapeTeXt/README
new file mode 100644
index 0000000000..6b4fa277b6
--- /dev/null
+++ b/support/escapeTeXt/README
@@ -0,0 +1,39 @@
+README for: escapeTeXt.py
+
+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_.
+ ./escapeTeXt.py -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:
+ convertTeXt.py: Convert plain text so it may make it through LaTeX
+ convertTeXt.py [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 makeReport.py program the code
+ import escapeTeXt
+ :
+ s=getUserResponseFromDb()
+ result=escapeTeXt.escapetext(s).output()
+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