From mboxrd@z Thu Jan 1 00:00:00 1970 From: William Henney Subject: Re: How to tell Org mode radio table translator not to wrap, Greeks in dollars ($$) Date: Fri, 3 Apr 2015 23:42:21 -0600 Message-ID: References: <551F51EC.8010405@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113f7dba5ab4200512df87a2 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35446) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YeGqd-0002L1-Tm for emacs-orgmode@gnu.org; Sat, 04 Apr 2015 01:42:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YeGqc-0005eb-5G for emacs-orgmode@gnu.org; Sat, 04 Apr 2015 01:42:23 -0400 Received: from mail-ig0-x234.google.com ([2607:f8b0:4001:c05::234]:36277) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YeGqb-0005eQ-UE for emacs-orgmode@gnu.org; Sat, 04 Apr 2015 01:42:22 -0400 Received: by igblo3 with SMTP id lo3so18453736igb.1 for ; Fri, 03 Apr 2015 22:42:21 -0700 (PDT) In-Reply-To: <551F51EC.8010405@gmail.com> 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: Omid Cc: emacs-org --001a113f7dba5ab4200512df87a2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Omid It looks like orgtbl-to-latex is calling org-export-string-as on each table cell, which is presumably what is wrapping each \mu inside $$. This seems wrong-headed to me, but I can't say I really understand what the code is trying to achieve. A workaround would be to directly use orgtbl-to-generic instead. Just replace your ORGTBL line with #+ORGTBL: SEND Ah-advection orgtbl-to-generic :splice t :skip 0 :lend " \\\\" :sep " & " Will On Fri, Apr 3, 2015 at 8:52 PM, Omid wrote: > Hello, > > I'm trying to use an Org mode Radio Table in LaTeX according to: > > http://orgmode.org/manual/Radio-tables.html > http://orgmode.org/manual/A-LaTeX-example.html#A-LaTeX-example > > My Org mode table is representing a matrix containing Greek letters > denoted by LaTeX commands (e.g., \mu). The "radioing" process wraps > these commands in dollars (\mu changes to $\mu$). I'm using `:splice > t' to return only table body lines (without wrapping them in a tabular > environment) to insert the table in my equation and matrix > environments. I tried `:fmt "%s"' hoping that the table fields would > be left untouched, but, no the translator still wraps my \mu's in $$. > > Here is an example: > > \begin{comment} > #+ORGTBL: SEND Ah-advection orgtbl-to-latex :splice t :skip 0 :fmt "%s" > | 1-\mu | | | | | > | \mu | 1-\mu | | | | > | | \ddots | \ddots | | | > | | | \mu | 1-\mu | | > | | | | \mu | 1-\mu | > \end{comment} > > with the translated result > > \begin{equation} > \label{eq:Ah-advection} > A_{h}=3D > \begin{bmatrix} > % BEGIN RECEIVE ORGTBL Ah-advection > 1-$\mu$ & & & & \\ > $\mu$ & 1-$\mu$ & & & \\ > & \ddots & \ddots & & \\ > & & $\mu$ & 1-$\mu$ & \\ > & & & $\mu$ & 1-$\mu$ \\ > % END RECEIVE ORGTBL Ah-advection > \end{bmatrix} > \end{equation} > > How can I tell the table translator not to wrap Greeks in $$? > > Thanks, > > -- > Omid > > --=20 Dr William Henney, Centro de Radioastronom=C3=ADa y Astrof=C3=ADsica, Universidad Nacional Aut=C3=B3noma de M=C3=A9xico, Campus Morelia --001a113f7dba5ab4200512df87a2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Omid

It looks like orgtbl-to-l= atex is calling org-export-string-as on each table cell, which is presumabl= y what is wrapping each \mu inside $$. =C2=A0 This seems wrong-headed to me= , but I can't say I really understand what the code is trying to achiev= e. =C2=A0

A workaround would be to directly use orgtbl-t= o-generic instead. Just replace your ORGTBL line with=C2=A0

<= /div>
#+ORGTBL: SEND Ah-advection orgtbl-to-generic :splice t :ski= p 0 :lend " \\\\" :sep " & "

Will


On Fri, Apr 3, 2015 at 8:52 PM, Omid <= ;omidlink@gmail.com= > wrote:
Hello,

I'm trying to use an Org mode Radio Table in LaTeX according to:

h= ttp://orgmode.org/manual/Radio-tables.html
http://orgmode.org/manual/A-LaTeX-example.html#A-LaTeX-ex= ample

My Org mode table is representing a matrix containing Greek letters
denoted by LaTeX commands (e.g., \mu). The "radioing" process wra= ps
these commands in dollars (\mu changes to $\mu$). I'm using `:splice t' to return only table body lines (without wrapping them in a tabular<= br> environment) to insert the table in my equation and matrix
environments. I tried `:fmt "%s"' hoping that the table field= s would
be left untouched, but, no the translator still wraps my \mu's in $$.
Here is an example:

\begin{comment}
#+ORGTBL: SEND Ah-advection orgtbl-to-latex :splice t :skip 0 :fmt "%s= "
| 1-\mu |=C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 = =C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A0 =C2=A0 =C2=A0|
| \mu=C2=A0 =C2=A0| 1-\mu=C2=A0 |=C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 =C2=A0= =C2=A0 =C2=A0|=C2=A0 =C2=A0 =C2=A0 =C2=A0|
|=C2=A0 =C2=A0 =C2=A0 =C2=A0| \ddots | \ddots |=C2=A0 =C2=A0 =C2=A0 =C2=A0|= =C2=A0 =C2=A0 =C2=A0 =C2=A0|
|=C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A0 =C2=A0 =C2=A0 | \mu=C2=A0 =C2=A0= | 1-\mu |=C2=A0 =C2=A0 =C2=A0 =C2=A0|
|=C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 =C2=A0 =C2= =A0 =C2=A0 | \mu=C2=A0 =C2=A0| 1-\mu |
\end{comment}

with the translated result

\begin{equation}
=C2=A0 \label{eq:Ah-advection}
=C2=A0 A_{h}=3D
=C2=A0 \begin{bmatrix}
=C2=A0 =C2=A0 % BEGIN RECEIVE ORGTBL Ah-advection
1-$\mu$ &=C2=A0 &=C2=A0 &=C2=A0 &=C2=A0 \\
$\mu$ & 1-$\mu$ &=C2=A0 &=C2=A0 &=C2=A0 \\
=C2=A0& \ddots & \ddots &=C2=A0 &=C2=A0 \\
=C2=A0&=C2=A0 & $\mu$ & 1-$\mu$ &=C2=A0 \\
=C2=A0&=C2=A0 &=C2=A0 & $\mu$ & 1-$\mu$ \\
=C2=A0 =C2=A0 % END RECEIVE ORGTBL Ah-advection
=C2=A0 \end{bmatrix}
\end{equation}

How can I tell the table translator not to wrap Greeks in $$?

Thanks,

--
Omid




--

=C2=A0 Dr William Henney, Centro de Radioastronom=C3=ADa y Astro= f=C3=ADsica,
=C2=A0 Universidad Nacional Aut=C3=B3noma de M=C3=A9xico, C= ampus Morelia
--001a113f7dba5ab4200512df87a2--