[XeTeX] color name in headline bleeds into pdf bookmarks
Herbert Schulz
herbs at wideopenwest.com
Wed Jan 12 18:18:29 CET 2022
> On Jan 12, 2022, at 9:41 AM, Niemann, Hartmut <hartmut.niemann at siemens.com> wrote:
>
> Hello!
>
> I observed a strange thing when experimenting with colored text.
>
> ---8<----
> \documentclass{article}
> \usepackage{xcolor}
> \usepackage{bookmark}
> \begin{document}
> \tableofcontents
> \newpage
> \section{One}
> \section{\color{red}Two}
> \section{Three}
> \end{document}
> --8<------
> I ran this through xelatex (texlive 2018 on windows 10-64) three times to get the toc right.
>
> There is a pdf bookmark for each section, but the second one is “redTwo” instead of “Two”.
>
> Is there a way to avoid that?
>
>
> Regards
>
> Hartmut
Howdy,
I don't reproduce this in TeX Live 2021.
You might use \protect\color and see if that helps.
Good Luck,
Herb Schulz
herbs at wideopenwest.com
More information about the XeTeX
mailing list.