From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Bug in LaTeX export of org-html-entities? Date: Thu, 4 Mar 2010 07:39:36 +0100 Message-ID: <3A77EBAD-91BF-41CB-B73A-A3EB2662664D@gmail.com> References: Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nn62K-0002Qf-D7 for emacs-orgmode@gnu.org; Thu, 04 Mar 2010 03:04:00 -0500 Received: from [140.186.70.92] (port=33897 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nn62J-0002QH-A4 for emacs-orgmode@gnu.org; Thu, 04 Mar 2010 03:03:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nn62I-0005Kb-LV for emacs-orgmode@gnu.org; Thu, 04 Mar 2010 03:03:59 -0500 Received: from ey-out-1920.google.com ([74.125.78.150]:30175) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nn62I-0005KD-95 for emacs-orgmode@gnu.org; Thu, 04 Mar 2010 03:03:58 -0500 Received: by ey-out-1920.google.com with SMTP id 26so489355eyw.34 for ; Thu, 04 Mar 2010 00:03:57 -0800 (PST) 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, I confirm this bug, but I don't have a fix currently. There is a revamp of the entiies code in the making, but not done yet. - 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