emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] HTML export: how to delimit escaped HTML entity?


From: William Henney
Subject: Re: [Orgmode] HTML export: how to delimit escaped HTML entity?
Date: Thu, 28 Aug 2008 09:46:11 -0500

Hi Mark

On Wed, Aug 27, 2008 at 5:37 PM, mtheo <address@hidden> 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
"&Aacute;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 "&Aacute;" to
get "Á", or with the spanish-prefix input method you would type "'A"

Cheers

Will




-- 

 Dr William Henney, Centro de Radioastronomía y Astrofísica,
 Universidad Nacional Autónoma de México, Campus Morelia




reply via email to

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