Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 557fe75 commit 00f712eCopy full SHA for 00f712e
1 file changed
Doc/texinputs/python.sty
@@ -175,6 +175,7 @@
175
\let\py@OldVerbatim=\verbatim
176
\let\py@OldEndVerbatim=\endverbatim
177
\RequirePackage{verbatim}
178
+\let\py@OldVerbatimInput=\verbatiminput
179
180
% Variable used by begin code command
181
\newlength{\py@codewidth}
@@ -194,6 +195,19 @@
194
195
\py@OldEndVerbatim%
196
\end{minipage}%
197
}
198
+\renewcommand{\verbatiminput}[1]{%
199
+ {\setlength{\parindent}{1cm}%
200
+ % Calculate the text width for the minipage:
201
+ \setlength{\py@codewidth}{\linewidth}%
202
+ \addtolength{\py@codewidth}{-\parindent}%
203
+ %
204
+ \small%
205
+ \begin{list}{}{\setlength{\leftmargin}{1cm}}
206
+ \item%
207
+ \py@OldVerbatimInput{#1}%
208
+ \end{list}
209
+ }%
210
+}
211
212
% This does a similar thing for the {alltt} environment:
213
\RequirePackage{alltt}
0 commit comments