From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [new exporter] problems exporting mathmode to LaTeX Date: Wed, 18 Jul 2012 15:46:55 +0200 Message-ID: <87txx52ncg.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:58168) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrUds-0001Q2-Nx for emacs-orgmode@gnu.org; Wed, 18 Jul 2012 09:50:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SrUdm-0000I5-Ko for emacs-orgmode@gnu.org; Wed, 18 Jul 2012 09:50:16 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:55287) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrUdm-0000Hr-Ee for emacs-orgmode@gnu.org; Wed, 18 Jul 2012 09:50:10 -0400 Received: by wibhm11 with SMTP id hm11so1011368wib.12 for ; Wed, 18 Jul 2012 06:50:09 -0700 (PDT) In-Reply-To: (Thomas Holst's message of "Wed, 18 Jul 2012 12:13:18 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Thomas Holst Cc: Orgmode Hello, Thomas Holst writes: > So here is the next one: > #+BEGIN_SRC org > 160\(^\circ\}\nbsp{}C > -11^{\circ}\nbsp{}C > #+END_SRC > > With the old exporter this becomes: > #+BEGIN_SRC latex > 160\(^\circ\)~C > -11$^{\circ}$~C > #+END_SRC > in LaTeX. Which looks well in pdf. > > With the new exporter it becomes: > #+BEGIN_SRC latex > 160\(^\circ\)~C > -11$^{\mathrm{\^{}}}$~C > #+END_SRC > in LaTeX. Where the second construct obviously is not what is expected > and looks totaly wrong in pdf. I don't know how you obtain this result, you may have settings different than mine. Anyway, the new exporter doesn't change anything with regards to src blocks. It basically runs `org-export-blocks-preprocess' in a temporary clone of the buffer being exported and then parses the obtained expansion. If you want to have a glimpse at what is really parsed, you can evaluate the following snippet in the buffer you want to export: (let ((org-current-export-file (current-buffer))) (org-export-blocks-preprocess)) It may help to understand what is going on. Regards, -- Nicolas Goaziou