emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] LaTeX appears not to like default Org tag export format (\hfill)


From: Marcin Borkowski
Subject: Re: [O] LaTeX appears not to like default Org tag export format (\hfill)?
Date: Fri, 24 May 2013 20:36:26 +0200

Dnia 2013-05-24, o godz. 12:07:55
John Hendy <address@hidden> napisaƂ(a):

> I'm getting errors on tag export:
> 
> Package hyperref Warning: Token not allowed in a PDF string
> (PDFDocEncoding): (hyperref)                removing `\hfill' on
> input line 1706.
> 
> The tags get converted to this:
> 
> \subsection{Headline title\hfill{}\textsc{tag}}
> 
> It looks like LaTeX doesn't like that.
> 
> Any suggestions?

First: I can't resist telling a joke.

A guy is standing on the corner of the street smoking one cigarette
after another. A lady walking by notices him and says "Hey, don't you
know that those things can kill you? I mean, didn't you see the giant
warning on the box?!" "That's OK" says the guy, puffing casually "I'm a
computer programmer" "So? What's that got to do with anything?" "We
don't care about warnings. We only care about errors."

Now, to the point: indeed, this is only a warning and you don't have to
worry about it.  If you really do not like this warning, try putting
this into your preamble (untested, but should work):

\pdfstringdefDisableCommands{\def\hfill{ }}

Explanation: it is not LaTeX which dislikes \hfill (though it's a
plain TeX macro, not a LaTeX one), but hyperref.  More precisely, the
argument to \section lands not only in the ToC, but also in the pdf
bookmarks, and what can go there is seemingly quite restricted (I
don't know/care much about the exact details, frankly speaking).  The
above spell tells hyperref to (temporarily) change \hfill to a space in
that context. (See hyperref's docs and/or source for more info.)

> John

HTH,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



reply via email to

[Prev in Thread] Current Thread [Next in Thread]