[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] annoying behavior in orgtbl-mode
From: |
Nick Dokos |
Subject: |
Re: [O] annoying behavior in orgtbl-mode |
Date: |
Fri, 24 Feb 2017 12:20:59 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
Nick Dokos <address@hidden> writes:
> Nick Dokos <address@hidden> writes:
>
>> Uwe Brauer <address@hidden> writes:
>>
>>> Hi
>>>
>>> Please consider the following table in an org buffer
>>>
>>>
>>>
>>> |--------+-----+-----+-----+-----+-----+-----+-----+-----|
>>> | Name | E1a | E1b | E1c | E1d | E2a | E2b | E2c | Res |
>>> |--------+-----+-----+-----+-----+-----+-----+-----+-----|
>>> | Brauer | 10 | 20 | 10 | 10 | 30 | 10 | 10 | 100 |
>>> | Smith | 10 | 10 | | | | | | |
>>>
>>> #+TBLFM: $9=$2+$3+$4+$5+$6+$7+$8
>>>
>>> C-u C-u C-c C-c leads to
>>>
>>> |--------+-----+-----+-----+-----+-----+-----+-----+-----|
>>> | Name | E1a | E1b | E1c | E1d | E2a | E2b | E2c | Res |
>>> |--------+-----+-----+-----+-----+-----+-----+-----+-----|
>>> | Brauer | 10 | 20 | 10 | 10 | 30 | 10 | 10 | 100 |
>>> | Smith | 10 | 10 | | | | | | 20 |
>>>
>>> #+TBLFM: $9=$2+$3+$4+$5+$6+$7+$8
>>>
>>> Which is ok. When I do the same in a latex buffer using orgtbl-mode I
>>> obtain
>>>
>>> \documentclass[12pt]{article}
>>> \usepackage{comment}
>>> \begin{document}
>>>
>>> % BEGIN RECEIVE ORGTBL test
>>> \begin{tabular}{l|r|rrrrrrr}
>>> \hline
>>> Name & E1a & E1b & E1c & E1d & E2a & E2b & E2c & E1a + E1b + E1c + E1d +
>>> E2a + E2b + E2c\\ \hline
>>> \hline
>>> Brauer & 10 & 20 & 10 & 10 & 30 & 10 & 10 & 100\\ \hline
>>> Smith & 10 & 10 & & & & & & 20\\ \hline
>>> \end{tabular}
>>> % END RECEIVE ORGTBL test
>>> \begin{comment}
>>> #+ORGTBL: SEND test orgtbl-to-latex :lend "\\\\ \\hline" :environment
>>> tabular
>>> | / | <> | | | | | | |
>>> |
>>> |--------+-----+-----+-----+-----+-----+-----+-----+-----------------------------------------|
>>> | Name | E1a | E1b | E1c | E1d | E2a | E2b | E2c | E1a + E1b + E1c + E1d
>>> + E2a + E2b + E2c |
>>> |--------+-----+-----+-----+-----+-----+-----+-----+-----------------------------------------|
>>> | Brauer | 10 | 20 | 10 | 10 | 30 | 10 | 10 |
>>> 100 |
>>> | Smith | 10 | 10 | | | | | |
>>> 20 |
>>> #+TBLFM: $9=$2+$3+$4+$5+$6+$7+$8
>>> \end{comment}
>>>
>>> \end{document}
>>>
Rearranging like this seems to work:
--8<---------------cut here---------------start------------->8---
#+ORGTBL: SEND test orgtbl-to-latex :lend "\\\\ \\hline" :environment tabular
|--------+-----+-----+-----+-----+-----+-----+-----+-----|
| Name | E1a | E1b | E1c | E1d | E2a | E2b | E2c | Res |
| / | <> | | | | | | | |
|--------+-----+-----+-----+-----+-----+-----+-----+-----|
| Brauer | 25 | 20 | 10 | 10 | 30 | 10 | 10 | 115 |
| Smith | 10 | 30 | | | | | | 40 |
#+TBLFM: $9=$2+$3+$4+$5+$6+$7+$8
--8<---------------cut here---------------end--------------->8---
--
Nick