Joint use of MakeUppercase, hyperref and \addcontentsline give me a small unexepceted (yet annoying) problem in the pdf table of contents.

In the following (hopefully) minimal working example, I would like the sections titles to being with an uppercase.

The outpus fine in the actual PDF file, but in the bookmarks of the same PDF there is a slight problem with casing. And LaTeX chokes while compiling.

\newcommand\secti@nstring{To be defined}
    \renewcommand{\secti@nstring}{Questions on #1\xspace}
    \renewcommand{\secti@nstring}{\MakeUppercase #1 (solutions)\xspace}
  \problemsection{great typists}
    Who jumped over the lazy dog?
    \solution{The quick brown fox.}
    If violets are blue, what are roses?
\section{Solutions are invisible}
\section{Solutions are now visible}

Is there any way to fix this problem? (Other than hardwiring an ugly capital in the middle of a section title.)

  • 3
    I get no error and the bookmarks looks ok i.stack.imgur.com/brHn0.png. Is your tex system up-to-date? Nov 15, 2023 at 15:44
  • Thank you, @UlrikeFischer, I'll update my latex in a month when teaching is off for winter... As it gives me time to fix probs if upgrade messes up things. Nov 17, 2023 at 10:22


You must log in to answer this question.

Browse other questions tagged .