emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Marcin Borkowski <mbork@wmi.amu.edu.pl>
To: emacs-orgmode@gnu.org
Subject: Re: LaTeX appears not to like default Org tag export format (\hfill)?
Date: Fri, 24 May 2013 20:36:26 +0200	[thread overview]
Message-ID: <20130524203626.1b76d6fd@aga-netbook> (raw)
In-Reply-To: <CA+M2ft_U1M_u-yQM_hTzyeBX=iDz1prKusx0YE3=5_aN+sTJJA@mail.gmail.com>

Dnia 2013-05-24, o godz. 12:07:55
John Hendy <jw.hendy@gmail.com> 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	other threads:[~2013-05-24 18:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-24 17:07 LaTeX appears not to like default Org tag export format (\hfill)? John Hendy
2013-05-24 18:36 ` Marcin Borkowski [this message]
2013-05-24 18:44 ` Nick Dokos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130524203626.1b76d6fd@aga-netbook \
    --to=mbork@wmi.amu.edu.pl \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).