如何减少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
您可以通过重新定义内部长度来重新定义垂直空间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}