Closed jfbu closed 8 months ago
You really shouldn't use \color without starting a paragraph first. Think at the known problems with tabulars:
\begin{tabular}{p{1cm}p{1cm}}
\blueit{blue} & \redit{red}
\end{tabular}
And it is also not a good idea to start a paragraph in a group, even more with tagging which relies a lot on the para-hooks.
So do \newcommand\redit[1]{\leavevmode{{{{{{\color{red}#1}}}}}}}
(\textcolor contains a \leavevmode, that's why it is not affected).
Original context was a bit complex and the macro (actually via an active char doing verb-like stuff) was redefined mid-way in the document and only then started using \color
in one branch of an (expandable) test. A priori it was not probable it would be used at start of paragraph but with list items it is exactly what happened. The original had simply \begingroup...\endgroup
. I have prefixed it all with \leavevmode
.
With this (and item-label in place of label to get my bullet's) the color leaks seen there are gone.
produces
test_tagging_item.log