From mboxrd@z Thu Jan 1 00:00:00 1970 From: "William Henney" Subject: Re: HTML export: how to delimit escaped HTML entity? Date: Thu, 28 Aug 2008 09:46:11 -0500 Message-ID: <41c818190808280746maf62db6l9eaefc48e1420782@mail.gmail.com> References: <48B5D733.60008@mtheo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KYilS-0000tX-Bb for emacs-orgmode@gnu.org; Thu, 28 Aug 2008 10:46:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KYilR-0000sb-5U for emacs-orgmode@gnu.org; Thu, 28 Aug 2008 10:46:21 -0400 Received: from [199.232.76.173] (port=43208 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KYilQ-0000ry-OZ for emacs-orgmode@gnu.org; Thu, 28 Aug 2008 10:46:20 -0400 Received: from ey-out-1920.google.com ([74.125.78.144]:50776) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KYilN-0004iM-G5 for emacs-orgmode@gnu.org; Thu, 28 Aug 2008 10:46:18 -0400 Received: by ey-out-1920.google.com with SMTP id 4so120868eyg.24 for ; Thu, 28 Aug 2008 07:46:11 -0700 (PDT) In-Reply-To: <48B5D733.60008@mtheo.net> Content-Disposition: inline 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: mtheo Cc: org-mode list Hi Mark On Wed, Aug 27, 2008 at 5:37 PM, mtheo wrote: > The entities in org-html-entities work fine for me as long as followed by= a > space (or another \-escaped entity), but I can't seem to discover how > they're delimited within a word. Maybe someone will correct me, but it looks to me like there is no provision in the code for delimiting these entities. In the function org-html-do-expand in org-exp.el, if you change the line 3788 (in org 6.06b): (while (setq start (string-match "\\\\\\([a-zA-Z]+\\)" s start)) to (while (setq start (string-match "\\\\\\([a-zA-Z]+\\)\\(\\{\\}\\)?" s start= )) then you can use an empty pair of braces "{}" to end the entities (as in LaTeX macros). With that change, then "\Aacute{}stor" will produce "Ástor". I haven't tested this much, so I don't know if it has unwanted side effects elsewhere. I would also echo Sebastian's suggestion that you may be better off just directly entering the non-ascii character in the .org file. This usually works fine for export to HTML and means taht your org files are much more readable. You can either use your operating system's way of entering special characters (which in most cases is pretty clunky) or emacs' own input methods (which are very nice). You can turn one of these on with "C-u C-\" - hit TAB to get a list to choose from. There are lots of language-specific ones, and also general ones like tex and sgml. For instance, with the sgml input method, you type "Á" to get "=C1", or with the spanish-prefix input method you would type "'A" Cheers Will --=20 Dr William Henney, Centro de Radioastronom=EDa y Astrof=EDsica, Universidad Nacional Aut=F3noma de M=E9xico, Campus Morelia