From: Arik Mitschang <amitschang@cfa.harvard.edu>
To: emacs-devel@gnu.org
Subject: org-mode ASCII export of in-word LaTeX symbols support
Date: Thu, 14 Oct 2010 11:59:40 -0400 [thread overview]
Message-ID: <19639.10476.252832.800584@gargle.gargle.HOWL> (raw)
Hi emacs-devel,
I would like to suggest the following small change to the org-mode
ascii export feature in emacs 23.2. The reason for this is because
org-mode export supports embedded LaTeX in a LaTeX sort of fashion
where a symbol can be placed inside a word provided it is terminated
with '{}'. However in an ascii export the '{}' remains trailing the
converted symbol making it very difficult to seamlessly support these
inlined symbols across multiple export formats.
The manual likewise states:
"If you need such a symbol inside a word, terminate it like this: ‘\Aacute{}stor’."
indicating that this form is (or should be) supported. The fix is
quite simple, the regexp for matching LaTeX symbols to be exported
needs to allow for the terminating '{}' if existing. I have included
the necessary patch below.
Thanks alot,
~Arik
GNU Emacs 23.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.10.4) of 2010-07-26 on lacuna
--- org-ascii.el
+++ org-ascii.el
@@ -586,7 +586,7 @@
(defun org-ascii-replace-entities ()
"Replace entities with the ASCII representation."
(let (e)
- (while (re-search-forward "\\\\\\([a-zA-Z]+[0-9]*\\)" nil t)
+ (while (re-search-forward "\\\\\\([a-zA-Z]+[0-9]*\\)\\({}\\)?" nil t)
(org-if-unprotected-at (match-beginning 1)
(setq e (org-entity-get-representation (match-string 1)
org-export-ascii-entities))
reply other threads:[~2010-10-14 15:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19639.10476.252832.800584@gargle.gargle.HOWL \
--to=amitschang@cfa.harvard.edu \
--cc=emacs-devel@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.