emacs-orgmode
[Top][All Lists]
Advanced

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

[Orgmode] Possible buglet in latex export


From: Tim Burt
Subject: [Orgmode] Possible buglet in latex export
Date: Mon, 17 Aug 2009 06:39:00 -0400

Robert Goldman writes:
 > When I do a latex export, a simple URL in text, or a simple link url of
 > the form [[URL]] --- with no description --- gets emitted as
 > 
 > \href{URL}{URL}
 > 
 > which causes Latex to crash for me.
The first guess is that the string 'URL' in the post is not the actual
string that "causes Latex to crash".  The next guess is that 'URL' is
actually a string with one of LaTeX's 10 special characters, with a
popular one being underscore (_) in this context.

 > 
 > I believe that this is because it won't accept a URL as the second
 > argument to href.
The second argument to \href is simply a string that LaTeX can render,
so a URL is fine.

 > 
 > Changing the \href command to \url fixes the latex problem.
 > 
 > So I wonder if we need to catch this special case of a description-less
 > URL and treat it specially in latex export for the benefit of latex's
 > hyperref package.
 > 
 > I'm not an expert on hyperref, by any means, nor do I know the innards
 > of latex export, so I could be missing something here.  However the
 > description of \url in the hyperref manual says the following:
 > 
 >   \url{URL}
 > 
 > Similar to \href{URL}{\nolinkurl{URL}}
 > 
 > ...which suggests to me that using the URL without some kind of magical
 > protection (provided by \nolinkurl) may lead to bad things.
A URL can be used, but any special characters must be protected
somehow.  The \nolinkurl in the second argument provides such
protection, as does the \url solution mentioned above.

 > 
 > best,
 > r
 > 
 > 
 > _______________________________________________
 > Emacs-orgmode mailing list
 > Remember: use `Reply All' to send replies to the list.
 > address@hidden
 > http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Tim Burt




reply via email to

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