From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thibaut Verron Subject: Orgtbl-mode in latex: escaped braces and dollars, and other arbitrary transformations Date: Thu, 26 Jun 2014 09:55:46 +0000 (UTC) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39985) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X06PY-00077S-BD for emacs-orgmode@gnu.org; Thu, 26 Jun 2014 05:56:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X06PR-0003LZ-CX for emacs-orgmode@gnu.org; Thu, 26 Jun 2014 05:56:08 -0400 Received: from plane.gmane.org ([80.91.229.3]:54064) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X06PR-0003LQ-6S for emacs-orgmode@gnu.org; Thu, 26 Jun 2014 05:56:01 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1X06PP-0001Ig-7s for emacs-orgmode@gnu.org; Thu, 26 Jun 2014 11:55:59 +0200 Received: from ilithye.calsci.lip6.fr ([132.227.66.71]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 26 Jun 2014 11:55:59 +0200 Received: from thibaut.verron by ilithye.calsci.lip6.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 26 Jun 2014 11:55:59 +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: emacs-orgmode@gnu.org Hello, I'm forwarding this question asked on stackexchange: http://tex.stackexchange.com/questions/186605/with-orgtbl-how-to-ensure- that-braces-and-dollars-are-not-escaped After some investigation, it seems that the behavior is hidden deep in the export routines, and I was wisely suggested to ask the question on this list instead. I have given some tex-related details in the linked question, including some motivations and an example, the tl;dr is that in some conditions, the orgtbl-to-latex exporter will perform arbitrary escape of some characters in the cells, or other kind of transformations: $\text{test}$ is exported verbatim (OK). But \pbox{test} becomes \pbox\{test\} {test} becomes \{test\} {$test$} becomes \{\$test\$\} And the exporter seems to be trying to be smart, because it will still ensure that the result is correct: {$\infty$} becomes \{\$$\infty$\$\} The weirdest of all might be this one: \pbox{Foo: \\${bar= (2^{3},1)}$, ${baz= (8^{4})}$} becomes \pbox\{Foo: \\${bar= (2^{3},1)}$, \$\{baz= (8$^{\text{4}}$)\}\$\} (Note how the two mathematical expressions recieve different treatment, and the decision to insert "\text" around the exponent!) The option `:no-export`, as expected, has no effect, since it only controls whether `#_^&%` are escaped or not. Is this a known feature, or a bug? And is there a known workaround? Thanks, Thibaut Verron