emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Geralt <usr.gentoo@googlemail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Bug in LaTeX export of org-html-entities?
Date: Mon, 29 Mar 2010 13:28:36 +0200	[thread overview]
Message-ID: <7EC5DE8B-E7C9-4C77-8E0D-FFE6B6E83353@gmail.com> (raw)
In-Reply-To: <fbdd0e51002260224y1e585a00v53bfd5209fd62535@mail.gmail.com>

Hi Gerald,

Ulf Stegemann and myself have been working on improving this
problem.  The result of this work is in a special branch on the
git repo, called "new-entity-support".

If you have time, maybe you can check out this branch and test it,
to see if the problem you reported is indeed fixed.

- Carsten

On Feb 26, 2010, at 11:24 AM, Geralt wrote:

> Hello,
>
> I think there's at least one bug in the
> org-export-latex-treat-backslash-char function, because it does not
> correctly export entries of the org-html-entities variable that have
> the form ("Rightarrow" . "&rArr;"). To render such entities the
> function uses (member (list string-after) org-html-entities), but that
> fails for these entries. Assuming that org-html-entities is an alist a
> correct check would be (assoc string-after org-html-entities). But
> even then I think the function is broken, because it renders these
> entities with the following piece of code:
> (cond ((member (list string-after) org-html-entities)
> 	 ;; backslash is part of a special entity (like "\alpha")
> 	 (concat string-before "$\\"
> 		 (or (cdar (member (list string-after) org-html-entities))
> 		     string-after) "$"))
>
>  ;; other cases follow here, I've omitted them
>
> If I replace just the condition-check with the (assoc ...) version the
> export of, for example, \Rightarrow works, but due to the association
> of Rightarrow with rArr we should expect that it should render
> \Rightarrow as "&rArr;" which is of course only meaningful for HTML.
> So I think we need here another condition, namely
> (cond ((assoc string-after org-html-entities)
>      (concat string-before "$\\"
>              (or (cdr (assoc string-after org-html-entities))
>                  string-after) "$"))
>
> but that's not enough we also need a new entity variable
> org-latex-entities which mapps entities like \rArr to \Rightarrow, so
> instead of an entry ("Rightarrow" . "&rArr;") we need an entry ("rArr"
> . "Rightarrow") and put an entry with empty cdr in this alist for
> Rightarrow: ("Rightarrow").
>
> Can you confirm this bug? And if yes, do you have a better solution
> than I to avoid the duplication of the entities variable?
>
>
>
>
>
> Geralt.
>
>
> _______________________________________________
> 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

- Carsten

      parent reply	other threads:[~2010-03-29 11:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-26 10:24 Bug in LaTeX export of org-html-entities? Geralt
2010-03-02 11:45 ` Geralt
2010-03-02 11:59   ` Geralt
2010-03-04  6:39 ` Carsten Dominik
2010-03-29 11:28 ` Carsten Dominik [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=7EC5DE8B-E7C9-4C77-8E0D-FFE6B6E83353@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=usr.gentoo@googlemail.com \
    /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).