易碎的 tcolorbox 和 Underfull \vbox 存在问题

易碎的 tcolorbox 和 Underfull \vbox 存在问题

如何修复 Underfull \vbox 以及为什么在 breakable tcolorbox 之后文本颜色是白色的?这些问题是在某些软件包更新后出现的,tcolorbox 就是其中之一。在进行这些更新之前,使用相同的代码,一切都运行正常。

\documentclass[a4paper, 11pt]{book}

\usepackage[top=3.5cm,
            headheight=1.5cm,
            headsep=1cm,
            bottom=3cm,
            footskip=1.5cm,
            left=2cm,
            right=2cm,
            heightrounded]{geometry}
\usepackage[most]{tcolorbox}
\usepackage{setspace}
\usepackage{blindtext}

\frenchspacing
\onehalfspacing
\setlength{\parindent}{0pt}

\newtcolorbox{test}{
    empty, breakable, top=0mm, bottom=0mm, left=9mm,
    fonttitle=\large\bfseries, coltitle=black, title=mybox,
    subtitle style=empty,
    borderline west={0.5mm}{5mm}{black!50},
}

\newenvironment{mybox}{
    \begin{test}
}{\end{test} \par\bigskip}

\begin{document}

\begin{mybox}
    \blindtext[4]
\end{mybox}

{\bfseries\color{red} problem 1: Underfull vbox (badness 10000) has occured while output is active}

\begin{mybox}
    \blindtext[2]
\end{mybox}

{\bfseries\color{blue} after box text is fine}

\begin{mybox}
    \blindtext
\end{mybox}

{\bfseries\color{blue} after box text is fine}

\begin{mybox}
    \blindtext
\end{mybox}

{\bfseries\color{orange} problem 2: after breakable box textcolor is white and doesn't show}

\begin{mybox}
    \blindtext
\end{mybox}

{\bfseries\color{blue} after box text is fine}

\end{document}

在此处输入图片描述

在此处输入图片描述

在此处输入图片描述

相关内容