New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hyperref and xcolor together lead to a failure with \fbox in \chapter. #207
Comments
hyperref tries quite hard to convert the content of heading commands into something sensible for the bookmarks. But it neither does nor can handle every command which can appear in this context. Various commands will fail with an error like your fbox, some will give unsuitable output. Actually even without xcolor your fbox doesn't really work:
gives Hyperref could add code to avoid the problem, but in my opinion using an Perhaps future development will catch this case automatically, but for now,
or
or to use one of the options you already mentioned in your example. e.g.
|
Hello,
Your analysis and argumentation makes perfect sense to me, and the
workarounds you propose are quite helpfull and reasonable.
Thanks!
…--
Pat
|
in heading formatting. In heading formating, use 'error' as a string instead of a \fbox for @error formatting in contents bookmark string using \texorpdfstring{}. Based on Ulrike Fischer suggestion: latex3/hyperref#207 (comment)
hyperref and xcolor together lead to a failure with \fbox in \chapter.
If \usepackage{xcolor} is before \usepackage{hyperref}, error is
! Argument of \boxframe has an extra }.
If \usepackage{hyperref} is before \usepackage{xcolor}, error is
! Undefined control sequence.
<
Either
\robustify\fbox
(with \usepackage{etoolbox})
or
\pdfstringdefDisableCommands{\let\fbox\relax}
make the failure disappear.
An example is attached (as .txt as the issues submitting is too dumb for .tex)
xcolor_hyperref.txt
The text was updated successfully, but these errors were encountered: