summaryrefslogtreecommitdiffstats
path: root/Doc/myformat.sty
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1991-01-25 13:28:15 (GMT)
committerGuido van Rossum <guido@python.org>1991-01-25 13:28:15 (GMT)
commit4c22cb2f311ba5c7ee0ad4986677874829f71dcf (patch)
treea7dbc1a31fd7b599cb49ca6aab17fd44d184e8cf /Doc/myformat.sty
parent5ce78f11fc60e4b9ed5bd45eb4bccd3472f4a0ca (diff)
downloadcpython-4c22cb2f311ba5c7ee0ad4986677874829f71dcf.zip
cpython-4c22cb2f311ba5c7ee0ad4986677874829f71dcf.tar.gz
cpython-4c22cb2f311ba5c7ee0ad4986677874829f71dcf.tar.bz2
Changed code environment into \bcode and \ecode macros.
Learned a lot about these things.
Diffstat (limited to 'Doc/myformat.sty')
-rw-r--r--Doc/myformat.sty41
1 files changed, 23 insertions, 18 deletions
diff --git a/Doc/myformat.sty b/Doc/myformat.sty
index a9acd81..7415c51 100644
--- a/Doc/myformat.sty
+++ b/Doc/myformat.sty
@@ -1,29 +1,34 @@
% Style parameters and macros used by all documents here
% Page lay-out parameters
-\textwidth = 150mm
+\textwidth = 160mm
\textheight = 240mm
\topmargin = -11mm
-\oddsidemargin = 5mm
-\evensidemargin = 5mm
-
-% Macros for e.g. and E.g. if you want them italicized:
-% \newcommand{\eg}{{\it e.g.}}
-% \newcommand{\Eg}{{\it E.g.}}
-% If you don't want them italicized:
-\newcommand{\eg}{e.g.}
-\newcommand{\Eg}{E.g.}
+\oddsidemargin = 0mm
+\evensidemargin = 0mm
+%\parindent = 0mm
% Frequently used system names
-\newcommand{\Python}{Python}
+\newcommand{\Python}{Python} % Sometimes I want this italicized
\newcommand{\UNIX}{U{\sc nix}}
-% Calculate the text width for the minipage in the code environment:
+% Variable used by begin code command
\newlength{\codewidth}
-\setlength{\codewidth}{\textwidth}
-\addtolength{\codewidth}{-\parindent}
-% Code environment. Use together with begin/end verbatim!
-\newenvironment{code}%
-{\vspace{10pt}\par\begin{minipage}{\codewidth}}% begin stuff
-{\end{minipage}\par\vspace{10pt}\noindent}% end stuff
+\newcommand{\bcode}{
+ % Calculate the text width for the minipage:
+ \setlength{\codewidth}{\linewidth}
+ \addtolength{\codewidth}{-\parindent}
+ %
+ \vspace{3mm}
+ \par
+ \indent
+ \begin{minipage}[t]{\codewidth}
+}
+
+\newcommand{\ecode}{
+ \end{minipage}
+ \vspace{3mm}
+ \par
+ \noindent
+}