[Tex/LaTex] Change the name of a bookmark

beamerbookmarkshyperref

I have long titles for sections in a TeX-Beamer presentation. By default, hyperref uses the name of the section for the pdfbookmark. This means the bookmark is too long. I would like to use a shorter name in the bookmark. Does somebody know to to do that? Let's say I have

\section{Algorithm to determine firms' entry and exit into the market}

By default the bookmark is the same name of the section, so it will also be long. I would like to have a shorter bookmark, like "Entry and Exit". I don't how to do that.

Best Answer

\texorpdfstring can be used, the first argument is the usual section text, the second argument the text for the bookmark:

\section{\texorpdfstring{Long version}{Short version}}

If the short version should also be used for the table of contents, the optional argument of \section can be used:

\section[Short version]{Long version}