emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "William Henney" <whenney@gmail.com>
To: mtheo <mtheo@mtheo.net>
Cc: org-mode list <emacs-orgmode@gnu.org>
Subject: Re: HTML export: how to delimit escaped HTML entity?
Date: Thu, 28 Aug 2008 09:46:11 -0500	[thread overview]
Message-ID: <41c818190808280746maf62db6l9eaefc48e1420782@mail.gmail.com> (raw)
In-Reply-To: <48B5D733.60008@mtheo.net>

Hi Mark

On Wed, Aug 27, 2008 at 5:37 PM, mtheo <mtheo@mtheo.net> 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

      parent reply	other threads:[~2008-08-28 14:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-27 22:37 HTML export: how to delimit escaped HTML entity? mtheo
2008-08-28  0:00 ` Sebastian Rose
2008-08-28 14:46 ` William Henney [this message]

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41c818190808280746maf62db6l9eaefc48e1420782@mail.gmail.com \
    --to=whenney@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mtheo@mtheo.net \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).