emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] [Arik Mitschang] org-mode ASCII export of in-word LaTeX symbol


From: Noorul Islam K M
Subject: [Orgmode] [Arik Mitschang] org-mode ASCII export of in-word LaTeX symbols support
Date: Fri, 15 Oct 2010 12:59:14 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

I am not sure whether this is already forwarded. I am forwarding this
thread from emacs-devel mailing list. Hopefully patchworks picks up this
patch.


Thanks and Regards
Noorul


--- Begin Message --- Subject: org-mode ASCII export of in-word LaTeX symbols support Date: Thu, 14 Oct 2010 11:59:40 -0400
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))




--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]