summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
Diffstat (limited to 'Doc')
-rw-r--r--Doc/myformat.sty11
1 files changed, 8 insertions, 3 deletions
diff --git a/Doc/myformat.sty b/Doc/myformat.sty
index 623316e..a9acd81 100644
--- a/Doc/myformat.sty
+++ b/Doc/myformat.sty
@@ -18,7 +18,12 @@
\newcommand{\Python}{Python}
\newcommand{\UNIX}{U{\sc nix}}
-% Code environment (use together with verbatim!)
+% Calculate the text width for the minipage in the code environment:
+\newlength{\codewidth}
+\setlength{\codewidth}{\textwidth}
+\addtolength{\codewidth}{-\parindent}
+
+% Code environment. Use together with begin/end verbatim!
\newenvironment{code}%
-{\nopagebreak\begin{list}{\nopagebreak}{\nopagebreak}\nopagebreak}%
-{\nopagebreak\end{list}\nopagebreak}
+{\vspace{10pt}\par\begin{minipage}{\codewidth}}% begin stuff
+{\end{minipage}\par\vspace{10pt}\noindent}% end stuff