emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] Bug in LaTeX export of org-html-entities?


From: Carsten Dominik
Subject: Re: [Orgmode] Bug in LaTeX export of org-html-entities?
Date: Mon, 29 Mar 2010 13:28:36 +0200

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" . "⇒"). 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 "⇒" 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" . "⇒") 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.
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten







reply via email to

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