emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* annoying behavior in  orgtbl-mode
@ 2017-02-24 11:24 Uwe Brauer
  2017-02-24 16:26 ` Nick Dokos
  0 siblings, 1 reply; 5+ messages in thread
From: Uwe Brauer @ 2017-02-24 11:24 UTC (permalink / raw)
  To: emacs-orgmode

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}


Which is annoying. Is this a *bug*?

Regards

Uwe Brauer 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: annoying behavior in  orgtbl-mode
  2017-02-24 11:24 annoying behavior in orgtbl-mode Uwe Brauer
@ 2017-02-24 16:26 ` Nick Dokos
  2017-02-24 17:01   ` Nick Dokos
  0 siblings, 1 reply; 5+ messages in thread
From: Nick Dokos @ 2017-02-24 16:26 UTC (permalink / raw)
  To: emacs-orgmode

Uwe Brauer <oub@mat.ucm.es> 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}
>
>
> Which is annoying. Is this a *bug*?
>

I'm missing something: what exactly is annoying?

-- 
Nick

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: annoying behavior in  orgtbl-mode
  2017-02-24 16:26 ` Nick Dokos
@ 2017-02-24 17:01   ` Nick Dokos
  2017-02-24 17:20     ` Nick Dokos
  0 siblings, 1 reply; 5+ messages in thread
From: Nick Dokos @ 2017-02-24 17:01 UTC (permalink / raw)
  To: emacs-orgmode

Nick Dokos <ndokos@gmail.com> writes:

> Uwe Brauer <oub@mat.ucm.es> 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}
>>
>>
>> Which is annoying. Is this a *bug*?
>>
>
> I'm missing something: what exactly is annoying?

NM - I was blind.

-- 
Nick

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: annoying behavior in  orgtbl-mode
  2017-02-24 17:01   ` Nick Dokos
@ 2017-02-24 17:20     ` Nick Dokos
  2017-02-24 23:06       ` Uwe Brauer
  0 siblings, 1 reply; 5+ messages in thread
From: Nick Dokos @ 2017-02-24 17:20 UTC (permalink / raw)
  To: emacs-orgmode

Nick Dokos <ndokos@gmail.com> writes:

> Nick Dokos <ndokos@gmail.com> writes:
>
>> Uwe Brauer <oub@mat.ucm.es> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: annoying behavior in  orgtbl-mode
  2017-02-24 17:20     ` Nick Dokos
@ 2017-02-24 23:06       ` Uwe Brauer
  0 siblings, 0 replies; 5+ messages in thread
From: Uwe Brauer @ 2017-02-24 23:06 UTC (permalink / raw)
  To: emacs-orgmode


    > Nick Dokos <ndokos@gmail.com> writes:

    > Rearranging like this seems to work:

    > #+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

Cool thanks very much.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-02-24 23:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-24 11:24 annoying behavior in orgtbl-mode Uwe Brauer
2017-02-24 16:26 ` Nick Dokos
2017-02-24 17:01   ` Nick Dokos
2017-02-24 17:20     ` Nick Dokos
2017-02-24 23:06       ` Uwe Brauer

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).