From mboxrd@z Thu Jan 1 00:00:00 1970 From: Giuseppe Lipari Subject: exporting tables + equations to latex Date: Thu, 9 Oct 2014 17:21:04 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=90e6ba3fd29d15ba620504fefbc0 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XcFWd-0005x2-8z for emacs-orgmode@gnu.org; Thu, 09 Oct 2014 11:21:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XcFWb-00012o-Vx for emacs-orgmode@gnu.org; Thu, 09 Oct 2014 11:21:07 -0400 Received: from mail-ig0-x22d.google.com ([2607:f8b0:4001:c05::22d]:50901) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XcFWb-00012b-NH for emacs-orgmode@gnu.org; Thu, 09 Oct 2014 11:21:05 -0400 Received: by mail-ig0-f173.google.com with SMTP id h18so13166228igc.6 for ; Thu, 09 Oct 2014 08:21:04 -0700 (PDT) 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 --90e6ba3fd29d15ba620504fefbc0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi everybody. I like very much the orgtbl-mode for inserting tables in latex. It saves me a lot of typing, and they are also quite beatiful to read in text, contrary to plain latex tables. The big problem I have is that I do not know how to put equations in cells. In particular, I have this snippet of code in my latex file: \begin{comment} #+ORGTBL: SEND fp orgtbl-to-latex :splice t :skip 0 | Task | C | T | D | Prio | S_1 | $S_2$ | $S_3$ | $S_4$ | $B$ | |----------+----+-----+-----+------+-----+-------+-------+-------+-----| | $\tau_1$ | 2 | 8 | 6 | 10 | 1 | 0 | 0 | 0 | | | $\tau_2$ | 4 | 20 | 20 | 8 | 0 | 1 | 1 | 0 | | | $\tau_3$ | 10 | 50 | 40 | 6 | 0 | 0 | 3 | 1 | | | $\tau_4$ | 10 | 100 | 100 | 4 | 2 | 3 | 1 | 0 | | \end{comment} which is exported as \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|}\hline % BEGIN RECEIVE ORGTBL fp Task & C & T & D & Prio & \(S\_{}1\) & \(S\_{}2\) & \(S\_{}3\) & \(S\_{}4\) & \(B\) \\ \hline \(\tau\_{}1\) & 2 & 8 & 6 & 10 & 1 & 0 & 0 & 0 & \\ \(\tau\_{}2\) & 4 & 20 & 20 & 8 & 0 & 1 & 1 & 0 & \\ \(\tau\_{}3\) & 10 & 50 & 40 & 6 & 0 & 0 & 3 & 1 & \\ \(\tau\_{}4\) & 10 & 100 & 100 & 4 & 2 & 3 & 1 & 0 & \\ % END RECEIVE ORGTBL fp \hline \end{tabular} which is NOT what I want: the underlines are translated as underlines, and not as subscript command. I also tried the following: \begin{comment} #+ORGTBL: SEND fp orgtbl-to-latex :splice t :skip 0 :fmt (6 "$%s$" 7 "$%s$" 8 "$%s$" 9 "$%s$") | Task | C | T | D | Prio | S_1 | S_2 | S_3 | S_4 | B | |----------+----+-----+-----+------+-----+-------+-------+-------+-----| | $\tau_1$ | 2 | 8 | 6 | 10 | 1 | 0 | 0 | 0 | | | $\tau_2$ | 4 | 20 | 20 | 8 | 0 | 1 | 1 | 0 | | | $\tau_3$ | 10 | 50 | 40 | 6 | 0 | 0 | 3 | 1 | | | $\tau_4$ | 10 | 100 | 100 | 4 | 2 | 3 | 1 | 0 | | \end{comment} and the solution is even worse: \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|}\hline % BEGIN RECEIVE ORGTBL fp Task & C & T & D & $S$\backslash$\(_\)1$ & $S$\backslash$\(_\)2$ & $S$\backslash$\(_\)3$ & $S$\backslash$\(_\)4$ & B \\ ... ... % END RECEIVE ORGTBL fp \hline \end{tabular} Where is the \backslash coming from? I have no idea. So, where is the problem? How can I put a simple mathematical symbol in a org-mode table? Thanks in advance --=20 Giuseppe Lipari LIFL Universit=C3=A9 de Lille 1 blogs: http://scacciamennule.blogspot.com (Italian) http://okpanico,wordpress.com (Italian) http://algoland.wordpress.com (English) --90e6ba3fd29d15ba620504fefbc0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi everybody.

I like very muc= h the orgtbl-mode for inserting tables in latex. It saves me a lot of typin= g, and they are also quite beatiful to read in text, contrary to plain late= x tables.

The big problem I have is that I do not know how to = put equations in cells.
In particular, I have this snippet of code= in my latex file:

\begin{comment}
#+ORGTBL: SEND fp orgtbl-to-l= atex :splice t :skip 0
| Task=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0 C |=C2=A0= =C2=A0 T |=C2=A0=C2=A0 D | Prio | S_1 | $S_2$ | $S_3$ | $S_4$ | $B$ |
|-= ---------+----+-----+-----+------+-----+-------+-------+-------+-----|
|= $\tau_1$ |=C2=A0 2 |=C2=A0=C2=A0 8 |=C2=A0=C2=A0 6 |=C2=A0=C2=A0 10 |=C2= =A0=C2=A0 1 |=C2=A0=C2=A0=C2=A0=C2=A0 0 |=C2=A0=C2=A0=C2=A0=C2=A0 0 |=C2=A0= =C2=A0=C2=A0=C2=A0 0 |=C2=A0=C2=A0=C2=A0=C2=A0 |
| $\tau_2$ |=C2=A0 4 |= =C2=A0 20 |=C2=A0 20 |=C2=A0=C2=A0=C2=A0 8 |=C2=A0=C2=A0 0 |=C2=A0=C2=A0=C2= =A0=C2=A0 1 |=C2=A0=C2=A0=C2=A0=C2=A0 1 |=C2=A0=C2=A0=C2=A0=C2=A0 0 |=C2=A0= =C2=A0=C2=A0=C2=A0 |
| $\tau_3$ | 10 |=C2=A0 50 |=C2=A0 40 |=C2=A0=C2=A0= =C2=A0 6 |=C2=A0=C2=A0 0 |=C2=A0=C2=A0=C2=A0=C2=A0 0 |=C2=A0=C2=A0=C2=A0=C2= =A0 3 |=C2=A0=C2=A0=C2=A0=C2=A0 1 |=C2=A0=C2=A0=C2=A0=C2=A0 |
| $\tau_4$= | 10 | 100 | 100 |=C2=A0=C2=A0=C2=A0 4 |=C2=A0=C2=A0 2 |=C2=A0=C2=A0=C2=A0= =C2=A0 3 |=C2=A0=C2=A0=C2=A0=C2=A0 1 |=C2=A0=C2=A0=C2=A0=C2=A0 0 |=C2=A0=C2= =A0=C2=A0=C2=A0 |
\end{comment}

which is exported as


\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|= }\hline
% BEGIN RECEIVE ORGTBL fp
Task & C & T & D & = Prio & \(S\_{}1\) & \(S\_{}2\) & \(S\_{}3\) & \(S\_{}4\) &a= mp; \(B\) \\
\hline
\(\tau\_{}1\) & 2 & 8 & 6 & 10 &a= mp; 1 & 0 & 0 & 0 &=C2=A0 \\
\(\tau\_{}2\) & 4 &= 20 & 20 & 8 & 0 & 1 & 1 & 0 &=C2=A0 \\
\(\t= au\_{}3\) & 10 & 50 & 40 & 6 & 0 & 0 & 3 & = 1 &=C2=A0 \\
\(\tau\_{}4\) & 10 & 100 & 100 & 4 &= ; 2 & 3 & 1 & 0 &=C2=A0 \\
% END RECEIVE ORGTBL fp
\h= line
\end{tabular}



which is NOT what I want: t= he underlines are translated as underlines, and not as subscript command.=C2=A0

I also tried the following:

\begin{comme= nt}
#+ORGTBL: SEND fp orgtbl-to-latex :splice t :skip 0 :fmt (6 "$%= s$" 7 "$%s$" 8 "$%s$" 9 "$%s$")
| Tas= k=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0 C |=C2=A0=C2=A0 T |=C2=A0=C2=A0 D | Prio = | S_1 | S_2 | S_3 | S_4 | B |
|----------+----+-----+-----+------+-----+= -------+-------+-------+-----|
| $\tau_1$ |=C2=A0 2 |=C2=A0=C2=A0 8 |=C2= =A0=C2=A0 6 |=C2=A0=C2=A0 10 |=C2=A0=C2=A0 1 |=C2=A0=C2=A0=C2=A0=C2=A0 0 |= =C2=A0=C2=A0=C2=A0=C2=A0 0 |=C2=A0=C2=A0=C2=A0=C2=A0 0 |=C2=A0=C2=A0=C2=A0= =C2=A0 |
| $\tau_2$ |=C2=A0 4 |=C2=A0 20 |=C2=A0 20 |=C2=A0=C2=A0=C2=A0 = 8 |=C2=A0=C2=A0 0 |=C2=A0=C2=A0=C2=A0=C2=A0 1 |=C2=A0=C2=A0=C2=A0=C2=A0 1 |= =C2=A0=C2=A0=C2=A0=C2=A0 0 |=C2=A0=C2=A0=C2=A0=C2=A0 |
| $\tau_3$ | 10 |= =C2=A0 50 |=C2=A0 40 |=C2=A0=C2=A0=C2=A0 6 |=C2=A0=C2=A0 0 |=C2=A0=C2=A0=C2= =A0=C2=A0 0 |=C2=A0=C2=A0=C2=A0=C2=A0 3 |=C2=A0=C2=A0=C2=A0=C2=A0 1 |=C2=A0= =C2=A0=C2=A0=C2=A0 |
| $\tau_4$ | 10 | 100 | 100 |=C2=A0=C2=A0=C2=A0 4 |= =C2=A0=C2=A0 2 |=C2=A0=C2=A0=C2=A0=C2=A0 3 |=C2=A0=C2=A0=C2=A0=C2=A0 1 |=C2= =A0=C2=A0=C2=A0=C2=A0 0 |=C2=A0=C2=A0=C2=A0=C2=A0 |
\end{comment}

and the solution is even worse:

\begin{tabula= r}{|c|c|c|c|c|c|c|c|c|c|}\hline
% BEGIN RECEIVE ORGTBL fp
Task & = C & T & D & $S$\backslash$\(_\)1$ & $S$\backslash$\(_\)2$ &= amp; $S$\backslash$\(_\)3$ & $S$\backslash$\(_\)4$ & B \\
......
% END RECEIVE ORGTBL fp
\hline
\end{tabular}
<= br>
Where is the \backslash coming from? I have no idea.
So, where is the problem? How can I put a simple mathematical symbol = in a org-mode table?


Thanks in advance

--
Giuseppe Lipari
LIFLUniversit=C3=A9 de Lille 1
blogs: http://scacciamennule.blogspot.com=C2=A0 (I= talian)
=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0http://okpanico,wordpress.com=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 (Italian)
=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0http:= //algoland.wordpress.com=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 (English)
--90e6ba3fd29d15ba620504fefbc0--