[Top][All Lists]

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

Re: [O] LaTeX export: Handle hash symbol in footnote url links

From: Michael Bach
Subject: Re: [O] LaTeX export: Handle hash symbol in footnote url links
Date: Fri, 21 Feb 2014 13:57:51 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

Hello Vladimir,

On 21/02/2014 12:14, Vladimir Lomov wrote:
> Hello,
> ** Michael Bach [2014-02-21 11:52:14 +0100]:
>> Dear org-mode Devs and Users,
>> I am trying to export the following snippet
>> * LaTeX export of url with hash symbol
>> The Org mode export facilities can be used to export Org documents or
>> parts of Org documents to a variety of other formats.[fn:1]
>> * Footnotes
>> [fn:1] [[http://orgmode.org/org.html#Exporting]]
>> #+END_ORG
>> Now the exported .tex file contains the link as
>> : \footnote{\url{http://orgmode.org/org.html#Exporting}}
>> Which LaTeX does not like:
>> : Illegal parameter number in definition of address@hidden
>> FWIW, there is a workaround for the percent symbol described on SO[1]
>> using `\urldef` - but this does not work with the hash symbol.
>> Is there another workaround/solution that works with org-mode?
> Hash (#), as well as several other symbols have to be espaced when used
> as is in LaTeX documents. See, for example, "The Not So Short
> Introduction to LaTeX2e", 1.3.2 Special Characters. In general it is
> duty of ox-latex (LaTeX export backend) to espace such characters.

Thanks for your answer. `\url` can handle hash symbols in its argument
without escaping alright - as can be expected. AFAICS, the problem lies
in the `\footnote` command. And yes, I was thinking of `ox-latex`
figuring out that the url is in a footnote and escape accordingly.

I can see that the export engine should not and cannot cover all special
cases, but since links and footnotes are `first-class` org-mode
concepts, it would be nice to have them play along in this situation.
>From a typographic point of view, I figured url links in footnotes are
not that unusual.

Best Regards,

>> [1] bit.ly/1cwYJaM
> ---
> WBR, Vladimir Lomov

reply via email to

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