* ext.tex: did most of the tedious changes from plain ASCII text to LaTeX.

* text2latex.py: automatically put function names in \code{}.
* lib.tex, ref.tex, ext.tex, qua.tex, tut.tex: use new P.O.Box number in
  address.
This commit is contained in:
Guido van Rossum 1993-11-05 17:11:16 +00:00
parent 7a2dba2a00
commit db65a6ce55
11 changed files with 592 additions and 518 deletions

View file

@ -1,6 +1,7 @@
import os
import sys
import regex
import regsub
import string
import getopt
@ -31,6 +32,9 @@ def process(fi, fo):
if fmt:
nextline = '\n'
line = fmt % string.strip(line)
if '(' in line:
line = regsub.gsub('[a-zA-Z0-9_]+()',
'{\\\\tt \\0}', line)
elif inverbatim:
if blank.match(line) >= 0 and \
indented.match(nextline) < 0:
@ -43,6 +47,9 @@ def process(fi, fo):
fo.write('\\begin{verbatim}\n')
if inverbatim:
line = string.expandtabs(line, 4)
elif not fmt and '(' in line:
line = regsub.gsub('[a-zA-Z0-9_]+()',
'\\\\code{\\0}', line)
fo.write(line)
#main()