emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Robert Goldman <rpgoldman@sift.info>
To: tcburt@rochester.rr.com
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: Possible buglet in latex export
Date: Mon, 17 Aug 2009 07:57:02 -0500	[thread overview]
Message-ID: <4A89539E.1000106@sift.info> (raw)
In-Reply-To: <19081.13124.890022.91442@nitrogen.burtket>

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

  reply	other threads:[~2009-08-17 12:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-17  3:51 Possible buglet in latex export Robert Goldman
2009-08-17  5:18 ` Nick Dokos
2009-08-17 10:39 ` Tim Burt
2009-08-17 12:57   ` Robert Goldman [this message]
2009-08-17 13:26     ` Nick Dokos
2009-08-18 11:07       ` Carsten Dominik
2009-08-18 12:19         ` Robert Goldman

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=4A89539E.1000106@sift.info \
    --to=rpgoldman@sift.info \
    --cc=emacs-orgmode@gnu.org \
    --cc=tcburt@rochester.rr.com \
    /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).