bug with hyperref/mdframed/TikZ/imakeidx with \fbox in section command

Ulrike Fischer news3 at nililand.de
Tue Sep 14 23:33:03 CEST 2021


Am Tue, 14 Sep 2021 18:35:13 +0200 schrieb Heiko Oberdiek via
texhax:

> \documentclass{report}
> \usepackage{tikz}
> \usepackage{hyperref}
> %\pdfstringdefDisableCommands{\let\fbox\relax}
> \begin{document}
> \chapter{Hello \fbox{World}}
> \end{document}
> 
> Fix: Enable the line with \pdfstringdefDisableCommands.
> This avoids the error with the redefinition of \fbox of TikZ
> and warnings otherwise.

it is not tikz but xcolor which redefines the box command. 

I would perhaps make \fbox \protected.

\documentclass{report}

\usepackage{xcolor}
\usepackage{hyperref}
\usepackage{etoolbox}
\robustify\fbox
\begin{document}
\chapter{Hello \fbox{World}}
\end{document}

In any case this should be reported at 

https://github.com/latex3/hyperref
or

https://github.com/latex3/xcolor

-- 
Ulrike Fischer 
https://www.troubleshooting-tex.de/



More information about the texhax mailing list.