Kaydet (Commit) db65a6ce authored tarafından Guido van Rossum's avatar Guido van Rossum

* 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.
üst 7a2dba2a
This diff is collapsed.
This diff is collapsed.
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
\author{ \author{
Guido van Rossum \\ Guido van Rossum \\
Dept. CST, CWI, Kruislaan 413 \\ Dept. CST, CWI, P.O. Box 94079 \\
1098 SJ Amsterdam, The Netherlands \\ 1090 GB Amsterdam, The Netherlands \\
E-mail: {\tt guido@cwi.nl} E-mail: {\tt guido@cwi.nl}
} }
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
\author{ \author{
Guido van Rossum \\ Guido van Rossum \\
Dept. CST, CWI, Kruislaan 413 \\ Dept. CST, CWI, P.O. Box 94079 \\
1098 SJ Amsterdam, The Netherlands \\ 1090 GB Amsterdam, The Netherlands \\
E-mail: {\tt guido@cwi.nl} E-mail: {\tt guido@cwi.nl}
} }
......
...@@ -6,8 +6,8 @@ Interactively Testing Remote Servers Using the Python Programming Language ...@@ -6,8 +6,8 @@ Interactively Testing Remote Servers Using the Python Programming Language
\author{ \author{
Guido van Rossum \\ Guido van Rossum \\
CWI, dept. CST; Kruislaan 413 \\ Dept. CST, CWI, P.O. Box 94079 \\
1098 SJ Amsterdam, The Netherlands \\ 1090 GB Amsterdam, The Netherlands \\
E-mail: {\tt guido@cwi.nl} E-mail: {\tt guido@cwi.nl}
\and \and
Jelke de Boer \\ Jelke de Boer \\
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
\author{ \author{
Guido van Rossum \\ Guido van Rossum \\
Dept. CST, CWI, Kruislaan 413 \\ Dept. CST, CWI, P.O. Box 94079 \\
1098 SJ Amsterdam, The Netherlands \\ 1090 GB Amsterdam, The Netherlands \\
E-mail: {\tt guido@cwi.nl} E-mail: {\tt guido@cwi.nl}
} }
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
\author{ \author{
Guido van Rossum \\ Guido van Rossum \\
Dept. CST, CWI, Kruislaan 413 \\ Dept. CST, CWI, P.O. Box 94079 \\
1098 SJ Amsterdam, The Netherlands \\ 1090 GB Amsterdam, The Netherlands \\
E-mail: {\tt guido@cwi.nl} E-mail: {\tt guido@cwi.nl}
} }
......
import os import os
import sys import sys
import regex import regex
import regsub
import string import string
import getopt import getopt
...@@ -31,6 +32,9 @@ def process(fi, fo): ...@@ -31,6 +32,9 @@ def process(fi, fo):
if fmt: if fmt:
nextline = '\n' nextline = '\n'
line = fmt % string.strip(line) line = fmt % string.strip(line)
if '(' in line:
line = regsub.gsub('[a-zA-Z0-9_]+()',
'{\\\\tt \\0}', line)
elif inverbatim: elif inverbatim:
if blank.match(line) >= 0 and \ if blank.match(line) >= 0 and \
indented.match(nextline) < 0: indented.match(nextline) < 0:
...@@ -43,6 +47,9 @@ def process(fi, fo): ...@@ -43,6 +47,9 @@ def process(fi, fo):
fo.write('\\begin{verbatim}\n') fo.write('\\begin{verbatim}\n')
if inverbatim: if inverbatim:
line = string.expandtabs(line, 4) line = string.expandtabs(line, 4)
elif not fmt and '(' in line:
line = regsub.gsub('[a-zA-Z0-9_]+()',
'\\\\code{\\0}', line)
fo.write(line) fo.write(line)
#main() #main()
......
import os import os
import sys import sys
import regex import regex
import regsub
import string import string
import getopt import getopt
...@@ -31,6 +32,9 @@ def process(fi, fo): ...@@ -31,6 +32,9 @@ def process(fi, fo):
if fmt: if fmt:
nextline = '\n' nextline = '\n'
line = fmt % string.strip(line) line = fmt % string.strip(line)
if '(' in line:
line = regsub.gsub('[a-zA-Z0-9_]+()',
'{\\\\tt \\0}', line)
elif inverbatim: elif inverbatim:
if blank.match(line) >= 0 and \ if blank.match(line) >= 0 and \
indented.match(nextline) < 0: indented.match(nextline) < 0:
...@@ -43,6 +47,9 @@ def process(fi, fo): ...@@ -43,6 +47,9 @@ def process(fi, fo):
fo.write('\\begin{verbatim}\n') fo.write('\\begin{verbatim}\n')
if inverbatim: if inverbatim:
line = string.expandtabs(line, 4) line = string.expandtabs(line, 4)
elif not fmt and '(' in line:
line = regsub.gsub('[a-zA-Z0-9_]+()',
'\\\\code{\\0}', line)
fo.write(line) fo.write(line)
#main() #main()
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
\author{ \author{
Guido van Rossum \\ Guido van Rossum \\
Dept. CST, CWI, Kruislaan 413 \\ Dept. CST, CWI, P.O. Box 94079 \\
1098 SJ Amsterdam, The Netherlands \\ 1090 GB Amsterdam, The Netherlands \\
E-mail: {\tt guido@cwi.nl} E-mail: {\tt guido@cwi.nl}
} }
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
\author{ \author{
Guido van Rossum \\ Guido van Rossum \\
Dept. CST, CWI, Kruislaan 413 \\ Dept. CST, CWI, P.O. Box 94079 \\
1098 SJ Amsterdam, The Netherlands \\ 1090 GB Amsterdam, The Netherlands \\
E-mail: {\tt guido@cwi.nl} E-mail: {\tt guido@cwi.nl}
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment