Remove odd margin calculation in verbatim command that leads to overfull hbox warnings and inconsistent indentation of literal blocks within lists and quotes.

This commit is contained in:
Georg Brandl 2011-01-06 18:41:44 +01:00
parent 0908c23ef0
commit 9448d33d75

View File

@ -138,15 +138,11 @@
% Play with vspace to be able to keep the indentation. % Play with vspace to be able to keep the indentation.
\newlength\distancetoright \newlength\distancetoright
\newlength\leftsidespace
\def\mycolorbox#1{% \def\mycolorbox#1{%
\setlength\leftsidespace{\@totalleftmargin}%
\setlength\distancetoright{\linewidth}% \setlength\distancetoright{\linewidth}%
\advance\distancetoright -\@totalleftmargin % \advance\distancetoright -\@totalleftmargin %
\noindent\hspace*{\@totalleftmargin}%
\fcolorbox{VerbatimBorderColor}{VerbatimColor}{% \fcolorbox{VerbatimBorderColor}{VerbatimColor}{%
\begin{minipage}{\distancetoright}% \begin{minipage}{\distancetoright}%
\noindent\hspace*{-\leftsidespace}%
#1 #1
\end{minipage}% \end{minipage}%
}% }%
@ -480,4 +476,4 @@
\raggedright \raggedright
} }
{\endlist} {\endlist}
}{} }{}