I have been trying to do my resume in org-mode and export it to pdf with org-latex-export-to-pdf. I have almost gotten it just the way I want it, but for some reason whenever I try to add a hyperlink to the resume (to a github project, for example), and run the export command, I get a message in the echo area:

Process completed with errors: Runaway argument

When I go to the Org PDF LaTeX Output buffer, I see a bunch of warnings like this:

Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):
(hyperref)                removing `\<let>-command' on input line 97.

There are many lines like this all from the same input line (the line with the hyperlink) but with a different removing... message. I have been using org-mode and Emacs for a little while now, but I just started learning LaTeX yesterday, so the errors are a little difficult for me to debug. Any idea what is going wrong here?


Here is the line in the generated .tex file:

\subsection{EmacsBehavior - \url{https://kivy.org/docs/api-kivy.uix.behaviors.emacs.html}}

generated from this line in the .org file:

*** EmacsBehavior - https://kivy.org/docs/api-kivy.uix.behaviors.emacs.html
  • I typically debug Org export failures by opening the generated TeX file and figuring out what part of it causes the error by bisecting it. – wasamasa Mar 19 '16 at 15:23
  • @wasamasa I did do that, and I can see that if I have a hyperlink in my document that is what causes it, but I am not sure why it causes the error or how to add hyperlinks the right way... – elethan Mar 19 '16 at 15:25
  • Could you show us the generated latex hyperlink? – JeanPierre Mar 19 '16 at 15:38
  • The ulr appears inside a command argument, that's the problem. – JeanPierre Mar 19 '16 at 15:53
  • Besides the warning, the generated pdf is ok, right? On the latex side, adding \protect just in front of \url removes the warnings. – JeanPierre Mar 19 '16 at 16:03

Your Answer

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

Browse other questions tagged or ask your own question.