From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: annoying behavior in orgtbl-mode Date: Fri, 24 Feb 2017 12:20:59 -0500 Message-ID: <87k28fy078.fsf@alphaville.usersys.redhat.com> References: <87y3wvg7b5.fsf@mat.ucm.es> <87shn3y2q4.fsf@alphaville.usersys.redhat.com> <87o9xry12y.fsf@alphaville.usersys.redhat.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59886) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1chJYT-0005Bt-4r for emacs-orgmode@gnu.org; Fri, 24 Feb 2017 12:21:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1chJYQ-00039H-Dk for emacs-orgmode@gnu.org; Fri, 24 Feb 2017 12:21:17 -0500 Received: from [195.159.176.226] (port=40557 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1chJYQ-00038F-0M for emacs-orgmode@gnu.org; Fri, 24 Feb 2017 12:21:14 -0500 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1chJYI-0003CN-1V for emacs-orgmode@gnu.org; Fri, 24 Feb 2017 18:21:06 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Nick Dokos writes: > Nick Dokos writes: > >> Uwe Brauer 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