[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [PATCH] Protect active characters such as `~' when exporting to
From: |
Aaron Ecay |
Subject: |
Re: [O] [PATCH] Protect active characters such as `~' when exporting to LaTeX |
Date: |
Fri, 16 Jan 2015 12:12:58 -0500 |
User-agent: |
Notmuch/0.18.1+56~g6c9721a (http://notmuchmail.org) Emacs/25.0.50.2 (x86_64-unknown-linux-gnu) |
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