我正在使用csquote
引用块包,并将其放在tcolorboxenvironment
包内tcolorbox
。当涉及到分页符时,我发现一些字体样式不一致,在我的情况下,它是字体颜色而不是itshape
:
我认为这是由tcolorboxenvironment
设置引起的。
我的代码:
\documentclass{article}
\usepackage{lipsum}
\usepackage[T1]{fontenc}
\usepackage{csquotes}
\renewcommand{\mkbegdispquote}[2]{\itshape\color{gray}}
\usepackage[most]{tcolorbox}
\usepackage{changepage}
\usepackage{ragged2e}
\tcolorboxenvironment{note}{blanker, breakable, parbox=false, before
skip=16pt,after skip=16pt, borderline
west={2mm}{0mm}{gray}, top=5pt, bottom=5pt, before upper={\parindent=25pt},
right=1\parindent, }
\newenvironment{note}
{\begin{adjustwidth}{20pt}{0mm}}
{\end{adjustwidth}}
\begin{document}
\begin{note}
Quote block:
\begin{displayquote}
\lipsum[1]
\end{displayquote}
\end{note}
\begin{note}
Quote block:
\begin{displayquote}
\lipsum[1]
\lipsum[1]
\lipsum[1]
\end{displayquote}
\end{note}
Quote block:
\begin{displayquote}
\lipsum[1]
\lipsum[1]
\lipsum[1]
\end{displayquote}
\end{document}
答案1
我不知道您的代码的解决方案是什么,但您可以定义一个tcolorbox
与您的引文类似的几何图形,而无需额外的包。在这种情况下,每个片段的颜色都是相等的。
以下代码显示的内容与原始引文类似,但几何形状可能需要进行一些调整。
\documentclass{article}
\usepackage{lipsum}
\usepackage[T1]{fontenc}
%\usepackage{csquotes}
% \renewcommand{\mkbegdispquote}[2]{\itshape\color{gray}}
\usepackage[most]{tcolorbox}
%\usepackage{changepage}
%\usepackage{ragged2e}
%\tcolorboxenvironment{note}{blanker, breakable, parbox=false, before
%skip=16pt,after skip=16pt, borderline
%west={2mm}{0mm}{gray}, top=5pt, bottom=5pt, before upper={\parindent=25pt},
%right=1\parindent, }
%\newenvironment{note}
%{\begin{adjustwidth}{20pt}{0pt}}
%{\end{adjustwidth}}
\newtcolorbox{borderquote}[1][]{%
enhanced, breakable,
blanker, borderline west={2mm}{0mm}{gray},
top=5pt, bottom=5pt,
before skip=16pt, after skip=16pt,
fontupper=\itshape,
colupper=gray,
title={Quote block:},
coltitle=black,
left=14mm,
right=14mm,
lefttitle=5mm,
toptitle=2mm
}
\begin{document}
\lipsum[1]
\begin{borderquote}
\lipsum[1-3]
\end{borderquote}
\end{document}
答案2
使用该选项use color stack
(我使用红色来获得更好的屏幕截图):
\documentclass{article}
\usepackage{lipsum}
\usepackage[T1]{fontenc}
\usepackage{csquotes}
\renewcommand{\mkbegdispquote}[2]{\itshape\color{red}}
\usepackage[most]{tcolorbox}
\usepackage{changepage}
\usepackage{ragged2e}
\tcolorboxenvironment{note}{blanker, breakable, parbox=false, before
skip=16pt,after skip=16pt, borderline
west={2mm}{0mm}{gray}, top=5pt, bottom=5pt, before upper={\parindent=25pt},
right=1\parindent,use color stack }
\newenvironment{note}
{\begin{adjustwidth}{20pt}{0mm}}
{\end{adjustwidth}}
\begin{document}
\begin{note}
Quote block:
\begin{displayquote}
\lipsum[1]
\end{displayquote}
\end{note}
\begin{note}
Quote block:
\begin{displayquote}
\lipsum[1]
\lipsum[1]
\lipsum[1]
\end{displayquote}
\end{note}
Quote block:
\begin{displayquote}
\lipsum[1]
\lipsum[1]
\lipsum[1]
\end{displayquote}
\end{document}