From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Bug in LaTeX export of org-html-entities? Date: Mon, 29 Mar 2010 13:28:36 +0200 Message-ID: <7EC5DE8B-E7C9-4C77-8E0D-FFE6B6E83353@gmail.com> References: Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NwD9H-0007cg-3s for emacs-orgmode@gnu.org; Mon, 29 Mar 2010 07:28:51 -0400 Received: from [140.186.70.92] (port=52203 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NwD9F-0007bY-L9 for emacs-orgmode@gnu.org; Mon, 29 Mar 2010 07:28:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NwD9E-0001QF-5H for emacs-orgmode@gnu.org; Mon, 29 Mar 2010 07:28:49 -0400 Received: from mail-ew0-f223.google.com ([209.85.219.223]:60326) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NwD9D-0001O6-P5 for emacs-orgmode@gnu.org; Mon, 29 Mar 2010 07:28:48 -0400 Received: by mail-ew0-f223.google.com with SMTP id 23so2203126ewy.14 for ; Mon, 29 Mar 2010 04:28:47 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Geralt Cc: emacs-orgmode@gnu.org 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. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten