如何減少shaded
序言中環境的垂直空間?這是代碼:
\documentclass[a4paper,12pt]{article}
\usepackage{color,xcolor}
\usepackage{framed}
\colorlet{shadecolor}{blue!11}
\begin{document}
text text text text text text text text text text text text text text text text text text text text text text text text text text text text texttext text text text text text text
\begin{shaded}
text text text text text text text text text text text text text text text text text text text text text text text text text text text text texttext text text text text text text
\end{shaded}
text text text text text text text text text text text text text text text text text text text text text text text text text text text text texttext text text text text text text
text text text text text text text text text text text text text text text text text text text text text text text text text text text text texttext text text text text text text
\end{document}
請不要定義新環境,只需更改shaded
環境的一些屬性。
答案1
題外話:不加載color
,只加載更現代的xcolor
.
framed
您可以透過重新定義-internal length來重新定義垂直空間OuterFrameSep
:
\documentclass[a4paper,12pt]{article}
\usepackage{xcolor}
\usepackage{framed}
\colorlet{shadecolor}{blue!11}
\setlength{\OuterFrameSep}{0pt}
\begin{document}
text text text text text text text text text text text text text text text text text text text text text text text text text text text text texttext text text text text text text
\begin{shaded}
text text text text text text text text text text text text text text text text text text text text text text text text text text text text texttext text text text text text text
\end{shaded}
text text text text text text text text text text text text text text text text text text text text text text text text text text text text texttext text text text text text text
text text text text text text text text text text text text text text text text text text text text text text text text text text text text texttext text text text text text text
\end{document}