Text FormattingLatex code in Adobe Acrobat Bookmarks

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
gkl
Posts: 28
Joined: Sat Jan 17, 2009 12:21 am

Latex code in Adobe Acrobat Bookmarks

Post by gkl »

Dear All,

I am writing my thesis and one of my sections has LaTeX code in its title (let's say I have $\alpha$ test). When I compile the file to get the pdf document using pdflatex, everything works fine except that the Adobe's bookmark says test rather than the full title.

Is there any way to remedy this?

Thanks,
George

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Latex code in Adobe Acrobat Bookmarks

Post by frabjous »

Bookmarks are not Acrobat specific.

You will probably need to use the \texorpdfstring command defined by the hyperref package. (See page 17 of its documentation, or this thread, or this thread.)

You'd probably need to spell out the word "alpha":

Code: Select all

\section{\texorpdfstring{$\alpha$ test}{alpha test}}
If you compile with XeLaTeX and your editor is unicode-compliant, however, you can use:

Code: Select all

\section{\texorpdfstring{$\alpha$ test}{α test}}
Unfortunately, that doesn't seem to work with pdf(la)tex, even if you use the inputenc package.
Post Reply