emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Tables with multicolumn in LaTeX export


From: Eric S Fraga
Subject: Re: [O] Tables with multicolumn in LaTeX export
Date: Tue, 25 Aug 2015 16:13:40 +0100

On Tuesday, 25 Aug 2015 at 16:38, Suvayu Ali wrote:
> Hi,
>
> I was wondering if it is possible to have multicolumn when exporting
> tables to LaTeX.  Something like the following:
>
> | | | ∈ (5300,5800) | | ∈ (5320,5420) | <- row with multicolumn
> | classifier     | signal |        combi. | signal |        combi. |
> |----------------+--------+---------------+--------+---------------|
> | old BDT > 0.3  |  70347 |         10885 |  68502 |          4021 |
> | BDT v1 > -0.08 |  68458 |         20310 |  66683 |          5853 |
> | BDT v1 > -0.09 |  69418 |         22329 |  67617 |          6431 |
> | BDT v1 > -0.12 |  71336 |         28674 |  69479 |          8160 |

A kludge but you can use @@latex:...@@ in the table headings to achieve
what you want.  Not pretty, mind you, and to avoid multiple \cr being
created for the extra rows on the first line, this will only work if the
last column is part of a multicolumn.

#+begin_src org
  ,* table with multiple column spanning
  |                | @@latex:\multicolumn{2}{c}{@@\in (5300,5800)@@latex:}@@ | 
@@latex:\multicolumn{2}{c}{@@ \in (5320,5420) @@latex:} \\%@@ |        |        
|
  |                |       <10> |       <10> |        |        |
  | classifier     |     signal |     combi. | signal | combi. |
  |----------------+------------+------------+--------+--------|
  | old BDT > 0.3  |      70347 |      10885 |  68502 |   4021 |
  | BDT v1 > -0.08 |      68458 |      20310 |  66683 |   5853 |
  | BDT v1 > -0.09 |      69418 |      22329 |  67617 |   6431 |
  | BDT v1 > -0.12 |      71336 |      28674 |  69479 |   8160 |

#+end_src

Note the \\% in the end of the last multi-column directive.

HTH,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.1-176-g45abec



reply via email to

[Prev in Thread] Current Thread [Next in Thread]