From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Goldman Subject: Re: Possible buglet in latex export Date: Mon, 17 Aug 2009 07:57:02 -0500 Message-ID: <4A89539E.1000106@sift.info> References: <4A88D3D0.3000509@sift.info> <19081.13124.890022.91442@nitrogen.burtket> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Md1m1-0002hM-K6 for emacs-orgmode@gnu.org; Mon, 17 Aug 2009 08:57:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Md1lw-0002h2-N3 for emacs-orgmode@gnu.org; Mon, 17 Aug 2009 08:57:16 -0400 Received: from [199.232.76.173] (port=44351 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Md1lw-0002gy-EV for emacs-orgmode@gnu.org; Mon, 17 Aug 2009 08:57:12 -0400 Received: from outbound-mail-120.bluehost.com ([69.89.18.6]:39697) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1Md1lv-0000Uv-PQ for emacs-orgmode@gnu.org; Mon, 17 Aug 2009 08:57:12 -0400 In-Reply-To: <19081.13124.890022.91442@nitrogen.burtket> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: tcburt@rochester.rr.com Cc: Org Mode Tim Burt wrote: > 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. > Thanks. This suggests that replacing \href{URL}{URL} with \href{URL}{\nolinkurl{URL}} might be a good strategy for Latex export. I am not exactly sure why the un-protected URL causes problems for me and not for Nick. However, I am trying to generate latex for beamer, which seems very tricky, and perhaps that's what's going wrong here --- I'm getting beamer's internal state messed up. I'm not sure; will report if I can disentangle it. Thanks for the help, both of you. best, R