Kaydet (Commit) ddfbe89d authored tarafından Fred Drake's avatar Fred Drake

Update from trunk:

  - make \url force horizontal mode (so it works at the start of a line)
  - make \verbatiminput produce results that look like a verbatim
    environment
üst 0391d119
...@@ -175,24 +175,30 @@ ...@@ -175,24 +175,30 @@
\let\py@OldVerbatim=\verbatim \let\py@OldVerbatim=\verbatim
\let\py@OldEndVerbatim=\endverbatim \let\py@OldEndVerbatim=\endverbatim
\RequirePackage{verbatim} \RequirePackage{verbatim}
\let\py@OldVerbatimInput=\verbatiminput
% Variable used by begin code command % Variable used by begin code command
\newlength{\py@codewidth} \newlength{\py@codewidth}
\renewcommand{\verbatim}{% \renewcommand{\verbatim}{%
\setlength{\parindent}{1cm}% \begingroup%
% Calculate the text width for the minipage: \small%
\setlength{\py@codewidth}{\linewidth}% \begin{list}{}{\setlength{\leftmargin}{1cm}}
\addtolength{\py@codewidth}{-\parindent}% \item%
%
\par\indent%
\begin{minipage}[t]{\py@codewidth}%
\small%
\py@OldVerbatim% \py@OldVerbatim%
} }
\renewcommand{\endverbatim}{% \renewcommand{\endverbatim}{%
\py@OldEndVerbatim% \py@OldEndVerbatim%
\end{minipage}% \end{list}%
\endgroup
}
\renewcommand{\verbatiminput}[1]{%
{\small%
\begin{list}{}{\setlength{\leftmargin}{1cm}}
\item%
\py@OldVerbatimInput{#1}%
\end{list}
}%
} }
% This does a similar thing for the {alltt} environment: % This does a similar thing for the {alltt} environment:
...@@ -796,6 +802,7 @@ ...@@ -796,6 +802,7 @@
% but only if we actually used hyperref: % but only if we actually used hyperref:
\ifpdf \ifpdf
\newcommand{\url}[1]{{% \newcommand{\url}[1]{{%
\noindent%
\pdfstartlink attr{/Border [0 0 0]} user{/S /URI /URI (#1)}% \pdfstartlink attr{/Border [0 0 0]} user{/S /URI /URI (#1)}%
\py@LinkColor% color of the link text \py@LinkColor% color of the link text
\small\sf #1% \small\sf #1%
......
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