From mboxrd@z Thu Jan 1 00:00:00 1970 From: Noorul Islam K M Subject: [Arik Mitschang] org-mode ASCII export of in-word LaTeX symbols support Date: Fri, 15 Oct 2010 12:59:14 +0530 Message-ID: <87bp6v6hit.fsf@noorul.maa.corp.collab.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from [140.186.70.92] (port=32997 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P6ekw-0001vg-W3 for emacs-orgmode@gnu.org; Fri, 15 Oct 2010 03:31:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P6ekv-00083Z-Ho for emacs-orgmode@gnu.org; Fri, 15 Oct 2010 03:31:10 -0400 Received: from mail-iw0-f169.google.com ([209.85.214.169]:55747) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P6ekv-00083Q-CV for emacs-orgmode@gnu.org; Fri, 15 Oct 2010 03:31:09 -0400 Received: by iwn1 with SMTP id 1so945075iwn.0 for ; Fri, 15 Oct 2010 00:31:08 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Cc: Arik Mitschang --=-=-= 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 --=-=-= Content-Type: message/rfc822 Content-Disposition: inline Delivered-To: noorul@noorul.com Received: by 10.151.106.13 with SMTP id i13cs143131ybm; Thu, 14 Oct 2010 10:54:17 -0700 (PDT) Received: by 10.220.189.70 with SMTP id dd6mr3244420vcb.207.1287078856488; Thu, 14 Oct 2010 10:54:16 -0700 (PDT) Return-Path: Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by mx.google.com with ESMTP id y6si3510160vbn.6.2010.10.14.10.54.16; Thu, 14 Oct 2010 10:54:16 -0700 (PDT) Received-SPF: pass (google.com: domain of emacs-devel-bounces+noorul=noorul.com@gnu.org designates 199.232.76.165 as permitted sender) client-ip=199.232.76.165; Authentication-Results: mx.google.com; spf=pass (google.com: domain of emacs-devel-bounces+noorul=noorul.com@gnu.org designates 199.232.76.165 as permitted sender) smtp.mail=emacs-devel-bounces+noorul=noorul.com@gnu.org Received: from localhost ([127.0.0.1]:34024 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P6S0N-0005RZ-MV for noorul@noorul.com; Thu, 14 Oct 2010 13:54:15 -0400 Received: from [140.186.70.92] (port=48198 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P6QDY-0008QW-3c for emacs-devel@gnu.org; Thu, 14 Oct 2010 11:59:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P6QDX-00034D-0g for emacs-devel@gnu.org; Thu, 14 Oct 2010 11:59:43 -0400 Received: from head.cfa.harvard.edu ([131.142.41.8]:53624) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P6QDW-00033s-VE for emacs-devel@gnu.org; Thu, 14 Oct 2010 11:59:42 -0400 Received: from lacuna.cfa.harvard.edu (lacuna [131.142.56.143]) by head.cfa.harvard.edu (w/d) with ESMTP id o9EFxe2w013555; Thu, 14 Oct 2010 11:59:41 -0400 (EDT) Received: (from amitschang@localhost) by lacuna.cfa.harvard.edu (8.13.8/8.13.8/Submit) id o9EFxew7001426; Thu, 14 Oct 2010 11:59:40 -0400 From: Arik Mitschang Message-ID: <19639.10476.252832.800584@gargle.gargle.HOWL> Date: Thu, 14 Oct 2010 11:59:40 -0400 To: emacs-devel@gnu.org X-Mailer: VM 8.1.92a under 23.2.1 (x86_64-unknown-linux-gnu) X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Mailman-Approved-At: Thu, 14 Oct 2010 13:54:06 -0400 Subject: org-mode ASCII export of in-word LaTeX symbols support X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-devel-bounces+noorul=noorul.com@gnu.org Errors-To: emacs-devel-bounces+noorul=noorul.com@gnu.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: =E2=80=98= \Aacute{}stor=E2=80=99." 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)) --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --=-=-=--