You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a long-known issue that TeX drops spaces (and penalties) at the start of a vertical list (such as generated by minipage) but only if that list ist totaly empty. Things that produce invisible "whatsits" like color change that state and therefore a minipage starting with, say, a list, suddenly sees some vertical space at the top coming from \parskip being added and not dropped by TeX.
Minimal example showing the bug
\RequirePackage{latexbug} % <--should be always the first line (see CONTRIBUTING)!\documentclass{article}
\usepackage{hyperref,color} % sample other code can have the same effect\begin{document}
\fbox{%\begin{minipage}{10cm}% % no issue\begin{itemize}
\item abc \par xyz
\end{itemize}
\end{minipage}%
}
\fbox{%\begin{minipage}{10cm}%\LinkTargetOff% no issue if anchor/dest is suppressed\begin{enumerate}
\item abc \par xyz
\end{enumerate}
\end{minipage}%
}
\fbox{%\begin{minipage}{10cm}%\begin{enumerate}
\item abc\label{b} \par xyz % hyperref backref is the issue\end{enumerate}
\end{minipage}%
}
\fbox{%\begin{minipage}{10cm}%\color{red} % color is the issue\begin{enumerate}
\item abc \par xyz
\end{enumerate}
\end{minipage}%
}
\end{document}
first two boxes show extra spacing.
With the new paragraph handling it should be possible to catch this finally.
The text was updated successfully, but these errors were encountered:
I am just curious, if this also addresses the issue with \addvspace (#307)?
no it doesn't. It only deals with an extra \parskip added at the top of a vertical box, but this is a place where you can't necessarily avoid placing something like \color. The issue in (#307) is related but also different.
Brief outline of the bug
There is a long-known issue that TeX drops spaces (and penalties) at the start of a vertical list (such as generated by minipage) but only if that list ist totaly empty. Things that produce invisible "whatsits" like color change that state and therefore a minipage starting with, say, a list, suddenly sees some vertical space at the top coming from \parskip being added and not dropped by TeX.
Minimal example showing the bug
first two boxes show extra spacing.
With the new paragraph handling it should be possible to catch this finally.
The text was updated successfully, but these errors were encountered: