3

Putting a math element into an org mode headline causes latex to complain. ie

* This contains $\prod_{k=1}^N$ math
Lorem ipsum

gives

Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):
(hyperref)                removing `math shift' on input line 29.


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


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


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


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

4

1 Answer 1

2

After posting I found a reference in the Org mode mailing list showing how to get round this issue.

Following: the first headline shows org developer Nicolas Goaziou's solution. The second shows how to tighten it a bit with an org mode macro mt which takes math ($$ implied) in arg-1 and equivalent ASCII in arg-2 to keep hyperref happy.

#+MACRO: mt @@latex:\texorpdfstring{$ $1 $}{$2}@@
# mt = math-text
* This contains @@latex:\texorpdfstring{$\prod_{k=1}^N$}{product 1toN}@@ math
Lorem ipsum
* This is better {{{mt(\prod_{k=3}^N,product 1toN)}}} math
Dolor sit amet.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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