emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Orgtbl-mode in latex: escaped braces and dollars, and other arbitrary transformations
@ 2014-06-26  9:55 Thibaut Verron
  2014-06-26 10:38 ` Nicolas Goaziou
  0 siblings, 1 reply; 7+ messages in thread
From: Thibaut Verron @ 2014-06-26  9:55 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-06-26 19:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-26  9:55 Orgtbl-mode in latex: escaped braces and dollars, and other arbitrary transformations Thibaut Verron
2014-06-26 10:38 ` Nicolas Goaziou
2014-06-26 11:57   ` Thibaut Verron
2014-06-26 12:22     ` Thibaut Verron
2014-06-26 13:17       ` Nicolas Goaziou
2014-06-26 13:53         ` Thibaut Verron
2014-06-26 19:07           ` Nicolas Goaziou

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).