fancybox 的 bug:彩色跨页环境使框架变成彩色

fancybox 的 bug:彩色跨页环境使框架变成彩色
\documentclass{article}

\usepackage[papersize={75mm,100mm},
margin=20pt]{geometry}


\usepackage{enumitem,xcolor,lipsum}
\usepackage{fancybox}
\fancypage{%
\setlength{\fboxsep}{12pt}%
\setlength{\fboxrule}{0.4pt}%
\setlength{\shadowsize}{0pt}%
\shadowbox}{}

\renewenvironment{quote}{\begin{enumerate}
[leftmargin=0pt,itemindent=\parindent]\item[]\color{red}}{\end{enumerate}}


\begin{document}
\lipsum[1-2]
\begin{quote}
abc\\abc\\abc\\abc\\abc
\end{quote}

\end{document}

我怎样才能消除这种影响?

答案1

由于在这种情况下\fancypage命令不是非常想要tikz,这是和的替代解决方案eso-pic

代替

\usepackage{fancybox}
\fancypage{%
\setlength{\fboxsep}{12pt}%
\setlength{\fboxrule}{0.4pt}%
\setlength{\shadowsize}{0pt}%
\shadowbox}{}

\usepackage{tikzpagenodes}
\usetikzlibrary{calc}
\usepackage{eso-pic}

\AddToShipoutPictureBG{%
\begin{tikzpicture}[overlay,remember picture]
\draw[line width=0.4pt,black]
      ($ (current page.north east) + (0mm,-5mm) $)--
      ($ (current page.north west) + (4mm,-5mm) $)--
      ($ (current page.south west) + (4mm,0mm) $);
\end{tikzpicture}
}

梅威瑟:

\documentclass{article}

\usepackage[papersize={75mm,100mm},
margin=20pt]{geometry}


\usepackage{enumitem,xcolor,lipsum}

\usepackage{tikzpagenodes}
\usetikzlibrary{calc}
\usepackage{eso-pic}

\AddToShipoutPictureBG{%
\begin{tikzpicture}[overlay,remember picture]
\draw[line width=0.4pt,black]
      ($ (current page.north east) + (0mm,-5mm) $)--
      ($ (current page.north west) + (4mm,-5mm) $)--
      ($ (current page.south west) + (4mm,0mm) $);
\end{tikzpicture}
}

\renewenvironment{quote}{\begin{enumerate}
[leftmargin=0pt,itemindent=\parindent]\item[]\color{red}}{\end{enumerate}}


\begin{document}
\lipsum[1-2]
\begin{quote}
abc\\abc\\abc\\abc\\abc
\end{quote}

\end{document} 

输出:

在此处输入图片描述

相关内容