[Top][All Lists]

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

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

From: Geralt
Subject: [Orgmode] Bug in LaTeX export of org-html-entities?
Date: Fri, 26 Feb 2010 11:24:57 +0100


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?


reply via email to

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