emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Geralt <usr.gentoo@googlemail.com>
To: emacs-orgmode@gnu.org
Subject: Bug in LaTeX export of org-html-entities?
Date: Fri, 26 Feb 2010 11:24:57 +0100	[thread overview]
Message-ID: <fbdd0e51002260224y1e585a00v53bfd5209fd62535@mail.gmail.com> (raw)

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.

             reply	other threads:[~2010-02-26 10:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-26 10:24 Geralt [this message]
2010-03-02 11:45 ` Bug in LaTeX export of org-html-entities? Geralt
2010-03-02 11:59   ` Geralt
2010-03-04  6:39 ` Carsten Dominik
2010-03-29 11:28 ` Carsten Dominik

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=fbdd0e51002260224y1e585a00v53bfd5209fd62535@mail.gmail.com \
    --to=usr.gentoo@googlemail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).