From mboxrd@z Thu Jan 1 00:00:00 1970 From: Neuwirth Erich Subject: LaTeX table formatting Date: Tue, 28 Aug 2012 20:10:47 +0200 Message-ID: Mime-Version: 1.0 (Mac OS X Mail 6.0 \(1486\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:35996) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6QFX-00021e-HR for emacs-orgmode@gnu.org; Tue, 28 Aug 2012 14:10:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T6QFW-0006o0-Dp for emacs-orgmode@gnu.org; Tue, 28 Aug 2012 14:10:51 -0400 Received: from grace.univie.ac.at ([131.130.3.115]:59947) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6QFV-0006nt-TL for emacs-orgmode@gnu.org; Tue, 28 Aug 2012 14:10:50 -0400 Received: from jarvis.univie.ac.at ([131.130.3.112] helo=jarvis.univie.ac.at) by grace.univie.ac.at with esmtp (Exim 4.80) (envelope-from ) id 1T6QFT-0000Hb-Qt for emacs-orgmode@gnu.org; Tue, 28 Aug 2012 20:10:47 +0200 Received: from 91-114-202-154.adsl.highway.telekom.at ([91.114.202.154] helo=[10.0.0.4]) by jarvis.univie.ac.at with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.80) (envelope-from ) id 1T6QFT-00052k-Me for emacs-orgmode@gnu.org; Tue, 28 Aug 2012 20:10:47 +0200 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "emacs-orgmode@gnu.org emacs-orgmode@gnu.org" I would like to add some twists to tables. Using the ATTR_LaTeX attribute I can control alignment and vertical gridlines in the table. I also would like to have horizontal gridlines, and I would like to have multicol top headers. tgroupt and n.tgroup in theory should me give these multicol headers, but it does not work. Is there a way of accomplishing what I want? #+title: Testing R table output #+author: Erich Neuwirth #+date: 28. August 2012 #+ATTR_LaTeX: align=|l|c|r|r|r|r| #+ATTR_HTML: border="2" rules="all" frame="border" #+begin_src R :session *RPisa* :results output org :exports results require(ascii) mydf <- data.frame( year = rep(as.character(rep(seq(2000,2009,3)),each=2)), gender = rep(c("f","m"),times=2), m1 = (11:18)/11, m2 = (102:109)/22, s1 = seq(1,2,length.out=8), s2 = seq(1.5,2.5,length.out=8) ) res <- ascii(mydf, digits=c(0,0,1,1,2,2), align=c("l","c","r","r","r","r"), format=c("d","s","f","f","f","f"), include.rownames=FALSE, tgroup=c("","mean","se"), n.tgroup=c(2,2,2)) print(res,type="org") #+end_src