TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I load hyperref and use the \autocite{...} command within a \section{...}, my .log file reveals the following warning:

Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):
(hyperref)                removing `\autocite' on input line 27.

I wish to cite an entire section, as it will be adapted from another source (i.e., an experimental procedure).

Could someone explain this warning and how to fix it? Searching similar questions didn't lead to a solution, so forgive me if this is a duplicate.

MWE to reproduce the warning:

  author    = {Example E. Example},
  title     = {The Complete Example Reference},
  publisher = {The Example Companies, Inc.},
  year      = {2012},
  address   = {New York},
  isbn      = {000-0-00-000000-0},
  pages     = {1--10}
This entire section is to be cited!
share|improve this question
I must confess that I can't figure out what you're trying to achieve by placing a citation to a publication (of type book, but that may be coincidental) inside a section header. Are you maybe trying to create a cross-reference to a given section? If so, why not (i) put a command such as \label{sec:ex} immediately after the \section{Example} command and (ii) use the command \autoref{sec:ex} (rather than \autocite{example}) to generate the cross-reference? – Mico Mar 17 '12 at 0:28
@Mico: There's an experimental procedure (for chemistry) in my textbook on pages, for example, 1--10. I'm writing a report that uses this procedure, and as such, I need to cite the entire procedure. So the actual section in my document reads \section{Procedure\autocite{example}}. – user2473 Mar 17 '12 at 0:35
That's really weird: (1) If you're quoting a procedure that you developed and never published, and that's going in your report (as a section or appendix), you should use normal cross referencing, as @mico pointed out; (2) If you are going to write about how you used a given procedure that's in a book and not in your report (it doesn't matter if you're the author or not), you should start a regular section and just write about it --- citing the original text, normally. Anyway, besides that warning, the MWE compiles fine, adding the citation mark and link to the section title. – henrique Mar 17 '12 at 0:55
up vote 10 down vote accepted

The hyperref package produces this kind of warning when it doesn't know what to do with something that will go into one of the PDF entries. In your case, hyperref doesn't know how to put the instruction \autocite into the PDF bookmark. To prevent this situations, you can use \texorpdfstring{text to be typeset}{text for the bookmark}:

\section{\texorpdfstring{Example\autocite{example}}{A Relevant Example}}

Another option, specially useful if you are going to generate a table of contents would be to use the optional argument of \section (after all, it doesn't make much sense to have the citation mark also in the ToC):

\section[A Relevant Example]{Example\autocite{example}}
share|improve this answer

Your Answer


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.