emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [RFC] Rewrite radio tables


From: Nicolas Goaziou
Subject: Re: [O] [RFC] Rewrite radio tables
Date: Mon, 25 Aug 2014 21:20:22 +0200

Hello,

Nick Dokos <address@hidden> writes:

> I tried it with one of Thorsten Grotte's examples:

Thanks for testing it out.

> \documentclass{article}
>
> \begin{document}
>
> I tried to export this table to latex:
>
> \begin{comment}
>   
> #+TBLNAME: Test
> #+ORGTBL: SEND Test orgtbl-to-latex :skip 1 :splice t
> | C |    A |    B |
> |---+------+------|
> |   |    6 |    2 |
> |   |    4 |    9 |
> |---+------+------|
> | _ | suma | sumb |
> |   |   10 |   11 |
> #+TBLFM: $suma=vsum(@address@hidden)::$sumb=vsum(@address@hidden)
> \end{comment}
>
>
> and got the following result:
>
> % BEGIN RECEIVE ORGTBL Test
> 10 & 11\\
> % END RECEIVE ORGTBL Test
>
> \end{document}
>
> It works fine without the :skip argument, but with it, it seems to
> skip to the second hline.

Actually it looks fine to me. :skip is applied first, so table becomes

  |---+------+------|
  |   |    6 |    2 |
  |   |    4 |    9 |
  |---+------+------|
  | _ | suma | sumb |
  |   |   10 |   11 |

Then :splice is applied, so header (first rowgroup) is dropped

  | _ | suma | sumb |
  |   |   10 |   11 |

Eventually, this table is exported.

The current implementation gives

  % BEGIN RECEIVE ORGTBL Test
  \hline
  6 & 2 \\
  4 & 9 \\
  \hline
  10 & 11 \\
  % END RECEIVE ORGTBL Test

This doesn't match the specs, though. According to the (current)
docstring

  :splice  When set to t, return only table body lines, don't wrap
           them into :tstart and :tend.  Default is nil.  When :splice
           is non-nil, this also means that the exporter should not look
           for and interpret header and footer sections.

So it should ignore table's header, but it isn't the case, as
demonstrated in the following example. The same table with only :splice
t as parameter gives

  % BEGIN RECEIVE ORGTBL Test
  C & A & B \\
  \hline
   & 6 & 2 \\
   & 4 & 9 \\
  \hline
  $\backslash$\(_\) & suma & sumb \\
   & 10 & 11 \\
  % END RECEIVE ORGTBL Test

I'm surprised no one noticed it. This may be a sign that this feature
should be removed (i.e., :splice should not skip header).

WDYT?


Regards,

-- 
Nicolas Goaziou



reply via email to

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