Thanks for reading my question.
I've made a command called "\codefilename"; the argument is always set to lower case, uses a specific font, and cannot be hyphenated. The command works great in the body of text, however, when I use it in a section title, hyperref reminds me that it can't deal with certain things when it puts the argument into the pdf bookmark list. Hyperref then simply rejects what it can't deal with. One thing hyperref can't deal with is the \lowercase command.
I've provided a mwe as follows:
Code: Select all
\documentclass{article}
\usepackage{hyperref}
\newcommand{\codefilename}[1]{\mbox{\texttt{\lowercase{#1}}}}
\begin{document}
\section{\codefilename{Name.C}}
\end{document}
Is there any way I can get pdfLaTeX to expand the lowercase command before it makes an entry into the pdf bookmarks so that everything that ends up in the bookmarks is lowercase, too?Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):
(hyperref) removing `\lowercase' on input line 8.
Thanks,
Christian