Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am writing a document and a section as a very long title troubling my header. To work around this, I am using the short title like this:

\section[bla]{blablabla}

This works fine for the header, but the pdf bookmark is now using the short title instead of the normal title. Is there anyway to fix this?

Here is the definition of the hyperref package:

\usepackage[pdftex,hyperindex=true]{hyperref}
\hypersetup{
bookmarksopen=true,
pdftitle={Title},
pdfauthor={Author},
pdfsubject={Blablabla},
pdfkeywords={},
pdfmenubar=true,
pdfhighlight=/O,
pdfpagemode=None,
pdfpagelayout=SinglePage,
pdffitwindow=true,
bookmarksopen=true,
hidelinks=true}
share|improve this question
    
Following the advice of other, more experienced users, you should avoid specifying driver names (e.g., pdftex, xetex) excplicitly when loading packages. For one, this makes your life easier when you want to switch to another compiler. –  nnunes Feb 1 '13 at 13:51
    
Ok, I will get that in mind... –  TazgerO Feb 1 '13 at 14:17
add comment

migrated from stackoverflow.com Feb 1 '13 at 13:21

This question came from our site for professional and enthusiast programmers.

1 Answer

up vote 4 down vote accepted

Macro \texorpdfstring can be used:

\section[\texorpdfstring{bla}{blablabla}]{blablabla}

An alternative is package hypbmsec.

share|improve this answer
    
Thanks it works perfectly! –  TazgerO Feb 1 '13 at 14:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.