emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Aaron Ecay <aaronecay@gmail.com>
To: Sebastien Vauban <sva-news@mygooglest.com>, emacs-orgmode@gnu.org
Subject: Re: [PATCH] Protect active characters such as `~' when exporting to LaTeX
Date: Fri, 16 Jan 2015 12:12:58 -0500	[thread overview]
Message-ID: <87oapyk5t1.fsf@gmail.com> (raw)
In-Reply-To: <86vbk63h7q.fsf@example.com>

Hi Sebastien,

2015ko urtarrilak 16an, Sebastien Vauban-ek idatzi zuen:
> 
> Hello,
> 
> When ~code~ is converted to LaTeX, it becomes \verb~code~; i.e., it uses
> a potentially "dangerous" character, in this case `~' which is active.
> 
> In most cases, it is unnoticeable, but in some environments, it breaks.
> 
> The solution is to protect the command, what the attached patch does.

If this is the problem, would a simpler solution be to remove ~ (and other
special characters, like #^_$) from ‘org-latex--find-verb-separator’?

But as Nick points out, the problem with \verb is probably deeper.  The
protectedtexttt case in ox-latex already implements the suggestion from
the thread he linked.  Perhaps the solution is to change the code entry
in ‘org-latex-text-markup-alist’ to use protectedtexttt and drop the
verb case entirely from ‘org-latex--text-markup’.  What do you think?

Thanks,

-- 
Aaron Ecay

      parent reply	other threads:[~2015-01-16 17:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-16 14:58 [PATCH] Protect active characters such as `~' when exporting to LaTeX Sebastien Vauban
2015-01-16 16:42 ` Nick Dokos
2015-01-16 17:12 ` Aaron Ecay [this message]

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=87oapyk5t1.fsf@gmail.com \
    --to=aaronecay@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=sva-news@mygooglest.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).