emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug in LaTeX export of org-html-entities?
@ 2010-02-26 10:24 Geralt
  2010-03-02 11:45 ` Geralt
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Geralt @ 2010-02-26 10:24 UTC (permalink / raw)
  To: emacs-orgmode

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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-03-29 11:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

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).