4

Are there any ways to address the incompatibility below:

\documentclass{report}

\usepackage{hyperref}
\usepackage{bm}

\begin{document}
\section{Boundary conditions $\bm{H_F}$}
This is a test!
\end{document}

I get from TL 2016 and 2017:

! TeX capacity exceeded, sorry [input stack size=5000].

I have seen a few reports of conflicts between hyperref and bm, but they are always in the presence of {etoolbox} and they have been for the most reported as solved some time ago.

etoolbox conflict with bm package

Package incompatibilites: etoolbox, hyperref, and bm, standalone?

Paulo Ney
  • 2,405

1 Answers1

7

The problem is with bookmarks:

\documentclass{report}

\usepackage{bm}
\usepackage{hyperref}

\begin{document}

\section{Boundary conditions \texorpdfstring{$\bm{H_F}$}{H\_F}}

This is a test!

\end{document}

enter image description here

You could also disable \bm in bookmarks, but you'll get a bunch of warnings.

\documentclass{report}

\usepackage{bm}
\usepackage{hyperref}

\pdfstringdefDisableCommands{\let\bm=\relax}

\begin{document}

\section{Boundary conditions $\bm{H_F}$}

This is a test!

\end{document}
egreg
  • 1,121,712
  • Is this something correctable on {hyperref} or that is kept there intentionally that way? I am just trying to understand the reasons ... – Paulo Ney Mar 31 '18 at 01:54
  • @PauloNey There’s no typesetting in the bookmarks; hyperref does its best, but it can’t deal with everything. – egreg Mar 31 '18 at 08:58