* exporting tables + equations to latex
@ 2014-10-09 15:21 Giuseppe Lipari
2014-10-09 15:33 ` Nicolas Goaziou
2014-10-09 15:38 ` Jorge A. Alfaro-Murillo
0 siblings, 2 replies; 5+ messages in thread
From: Giuseppe Lipari @ 2014-10-09 15:21 UTC (permalink / raw
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 2777 bytes --]
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
--
Giuseppe Lipari
LIFL
Université de Lille 1
blogs: http://scacciamennule.blogspot.com (Italian)
<http://scacciamennule.blogspot.com>
http://okpanico,wordpress.com (Italian)
http://algoland.wordpress.com (English)
[-- Attachment #2: Type: text/html, Size: 3955 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: exporting tables + equations to latex
2014-10-09 15:21 exporting tables + equations to latex Giuseppe Lipari
@ 2014-10-09 15:33 ` Nicolas Goaziou
2014-10-09 15:38 ` Jorge A. Alfaro-Murillo
1 sibling, 0 replies; 5+ messages in thread
From: Nicolas Goaziou @ 2014-10-09 15:33 UTC (permalink / raw
To: Giuseppe Lipari; +Cc: emacs-orgmode
Hello,
Giuseppe Lipari <giulipari@gmail.com> writes:
> The big problem I have is that I do not know how to put equations in
> cells.
Radio tables have been rewritten in development branch, which will
become Org 8.3.
In this version, you will be able to achieve what you want using ":raw
t" parameter.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: exporting tables + equations to latex
2014-10-09 15:21 exporting tables + equations to latex Giuseppe Lipari
2014-10-09 15:33 ` Nicolas Goaziou
@ 2014-10-09 15:38 ` Jorge A. Alfaro-Murillo
2014-10-11 7:14 ` Giuseppe Lipari
1 sibling, 1 reply; 5+ messages in thread
From: Jorge A. Alfaro-Murillo @ 2014-10-09 15:38 UTC (permalink / raw
To: emacs-orgmode
Hi Giuseppe.
Giuseppe Lipari writes:
> The big problem I have is that I do not know how to put
> equations in cells. [...] the underlines are translated as
> underlines, and not as subscript command.
Try adding ":no-escape t" to the #+ORGTBL line
Best,
--
Jorge.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: exporting tables + equations to latex
2014-10-09 15:38 ` Jorge A. Alfaro-Murillo
@ 2014-10-11 7:14 ` Giuseppe Lipari
2014-10-11 15:12 ` Nicolas Goaziou
0 siblings, 1 reply; 5+ messages in thread
From: Giuseppe Lipari @ 2014-10-11 7:14 UTC (permalink / raw
Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1296 bytes --]
Thanks Nicolas and Jorge for your answers.
In my version (8.3beta-326-g6eb982.dirty taken from git):
- the :raw t flag does not work (same output as before)
- the :no-escape t works well.
After your answer, I understood this part is being reworked, so I decided
to update the org-mode git repository and now my version is
8.3beta-439-gfcce67.dirty. With this version
- with no special option, it produces the correct output
- with :raw t, the latex text is not traslated at all (empty cells)
- with :no-escape t, it produces the correct output
So, now I am all set, thanks a lot!!
Giuseppe Lipari
2014-10-09 17:38 GMT+02:00 Jorge A. Alfaro-Murillo <
jorge.alfaro-murillo@yale.edu>:
> Hi Giuseppe.
> Giuseppe Lipari writes:
>
> The big problem I have is that I do not know how to put equations in
>> cells. [...] the underlines are translated as underlines, and not as
>> subscript command.
>>
>
> Try adding ":no-escape t" to the #+ORGTBL line
>
> Best,
> --
> Jorge.
>
>
>
--
Giuseppe Lipari
LIFL
Université de Lille 1
blogs: http://scacciamennule.blogspot.com (Italian)
<http://scacciamennule.blogspot.com>
http://okpanico,wordpress.com (Italian)
http://algoland.wordpress.com (English)
[-- Attachment #2: Type: text/html, Size: 2348 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: exporting tables + equations to latex
2014-10-11 7:14 ` Giuseppe Lipari
@ 2014-10-11 15:12 ` Nicolas Goaziou
0 siblings, 0 replies; 5+ messages in thread
From: Nicolas Goaziou @ 2014-10-11 15:12 UTC (permalink / raw
To: Giuseppe Lipari; +Cc: emacs-orgmode
Hello,
Giuseppe Lipari <giulipari@gmail.com> writes:
> After your answer, I understood this part is being reworked, so I decided
> to update the org-mode git repository and now my version is
> 8.3beta-439-gfcce67.dirty. With this version
>
> - with no special option, it produces the correct output
> - with :raw t, the latex text is not traslated at all (empty cells)
This was a bug, which is now fixed. Thank you for noticing it.
> - with :no-escape t, it produces the correct output
:no-escape doesn't exist in the new implementation and is ignored. So it
boils down to providing no special option.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-10-11 15:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-09 15:21 exporting tables + equations to latex Giuseppe Lipari
2014-10-09 15:33 ` Nicolas Goaziou
2014-10-09 15:38 ` Jorge A. Alfaro-Murillo
2014-10-11 7:14 ` Giuseppe Lipari
2014-10-11 15:12 ` Nicolas Goaziou
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.