mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
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:
parent
0908c23ef0
commit
9448d33d75
@ -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}
|
||||||
}{}
|
}{}
|
||||||
|
Loading…
Reference in New Issue
Block a user