views:

362

answers:

1

I'm using the hyperref package in my document. One of the things that it does is create bookmarks in my pdf, based on the table of contents. Some section titles contain a reference to a citation

\section{Some title \citep{BibTeXkey}}

The label of the bookmark then looks like

Some title BibTeXkey

But I would like it to be

Some title (Author, year)

Just like it is displayed in the text and the table of contents. So only the bookmarks are messed up.

I used the sequence pdflatex, bibtex, pdflatex, pdflatex to compile the document.

How do I change the bookmark label to use the same format as in the table of contents?

+3  A: 

Whenever I'm having an issue with the pdf bookmarks not working properly, the solution is usually to use \texorpdfstring. It allows you to make a section title contain some non-text material (like a link or some symbols) and specify what should appear in the pdf bookmark, which cannot contain symbols. The input

\section{The section with \texorpdfstring{LaTeX symbols}{plain text version}}

produces the section title "The section with LaTeX symbols", but the pdf bookmark for the section is "The section with plain text version".

In your case, the easiest thing to do is probably

\section{Some title \texorpdfstring{\citep{BibTeXkey}}{(Author, year)}}

Unfortunately, this means that you have to paste "(Author, year)" in by hand, which is a little annoying, but not a big deal if your bibliography entry doesn't change (which is probably shouldn't) and you don't change your citation conventions.

If you really want to avoid having to type in "(Author, year)" by hand, you can try using the \show command to try to figure out how \citep produces it's output. But I warn you that this approach is not for the faint of heart: in this case, I think you'll end up looking through the aux file, not to mention the blg, brf, and bbl files.

Anton Geraschenko
This is OK as a work-around
Thierry