From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: allow table* specification with #+ATTR_LaTeX: Date: Wed, 15 Dec 2010 14:33:17 -0700 Message-ID: <8739pyraaq.fsf@cs.unm.edu> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from [140.186.70.92] (port=37464 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PSyyS-0000n8-J4 for emacs-orgmode@gnu.org; Wed, 15 Dec 2010 16:33:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PSyyR-000889-BP for emacs-orgmode@gnu.org; Wed, 15 Dec 2010 16:33:24 -0500 Received: from snape.cs.unm.edu ([64.106.20.59]:41839) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PSyyR-00087W-4G for emacs-orgmode@gnu.org; Wed, 15 Dec 2010 16:33:23 -0500 Received: from localhost (localhost [127.0.0.1]) by snape.cs.unm.edu (Postfix) with ESMTP id 2F89F5EFD5 for ; Wed, 15 Dec 2010 14:33:20 -0700 (MST) Received: from snape.cs.unm.edu ([127.0.0.1]) by localhost (snape.cs.unm.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0Wzb0kpsmedN for ; Wed, 15 Dec 2010 14:33:19 -0700 (MST) Received: from roll (c-174-56-1-147.hsd1.nm.comcast.net [174.56.1.147]) by snape.cs.unm.edu (Postfix) with ESMTPSA id 581ED5EFCC for ; Wed, 15 Dec 2010 14:33:19 -0700 (MST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode --=-=-= Content-Type: text/plain Hi, The attached patch allows the use of table* latex tables from within Org mode documents using the attr_latex lines, for example #+CAPTION: A wide table #+LABEL: tbl:wide #+ATTR_LaTeX: table* align=l|lp{3cm}r|l | ... | ... | | ... | ... | Should this be added, or should we put together a more general solution for different types of table environments? Currently only longtable is supported. Also, is there already a way to do this that I have missed? Thanks -- Eric --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=wide-tables.patch diff --git a/lisp/org-latex.el b/lisp/org-latex.el index a261171..b7f48d3 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -1741,7 +1741,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER." (org-table-last-column-widths (copy-sequence org-table-last-column-widths)) fnum fields line lines olines gr colgropen line-fmt align - caption shortn label attr floatp placement longtblp) + caption shortn label attr floatp placement longtblp tblenv) (if org-export-latex-tables-verbatim (let* ((tbl (concat "\\begin{verbatim}\n" raw-table "\\end{verbatim}\n"))) @@ -1758,6 +1758,9 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER." 'org-label raw-table) longtblp (and attr (stringp attr) (string-match "\\" attr)) + tblenv (if (and attr (stringp attr) + (string-match (regexp-quote "table*") attr)) + "table*" "table") align (and attr (stringp attr) (string-match "\\