diff options
author | Fred Drake <fdrake@acm.org> | 2001-06-18 14:59:58 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-06-18 14:59:58 (GMT) |
commit | 66eed244152a019e2325cdf440fab20b0f288186 (patch) | |
tree | ca9308277f9ee2e22af54603dfc8cfec460770da /Doc | |
parent | 183a2f243768ffd15ff4324b317ba880da1094ef (diff) | |
download | cpython-66eed244152a019e2325cdf440fab20b0f288186.zip cpython-66eed244152a019e2325cdf440fab20b0f288186.tar.gz cpython-66eed244152a019e2325cdf440fab20b0f288186.tar.bz2 |
Add some information on the use of \verbatiminput to display sources from
an external file.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/doc/doc.tex | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Doc/doc/doc.tex b/Doc/doc/doc.tex index 2275797..c271e35 100644 --- a/Doc/doc/doc.tex +++ b/Doc/doc/doc.tex @@ -611,6 +611,21 @@ This \UNIX\ is also followed by a space. non-Python code and non-code displays. There should be no blank lines at the top or bottom of any \env{verbatim} display. + Longer displays of verbatim text may be included by storing the + example text in an external file containing only plain text. The + file may be included using the standard \macro{verbatiminput} + macro; this macro takes a single argument naming the file + containing the text. For example, to include the Python source + file \file{example.py}, use: + +\begin{verbatim} +\verbatiminput{example.py} +\end{verbatim} + + Use of \macro{verbatiminput} allows easier use of special editing + modes for the included file. The file should be placed in the + same directory as the \LaTeX{} files for the document. + The Python Documentation Special Interest Group has discussed a number of approaches to creating pretty-printed code displays and interactive sessions; see the Doc-SIG area on the Python Web site |