From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Export tables as matrices (change tbl-export function on the fly) Date: Sat, 17 Nov 2012 16:32:39 +0100 Message-ID: <87haoont2g.fsf@gmail.com> References: <877gpojl2s.fsf@pank.iue.private> <87y5i4yx2w.fsf@gmail.com> <87sj888in4.fsf@pank.eu> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:57152) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZkS1-0007Lc-7y for emacs-orgmode@gnu.org; Sat, 17 Nov 2012 10:37:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TZkRy-0006W9-5d for emacs-orgmode@gnu.org; Sat, 17 Nov 2012 10:36:57 -0500 Received: from mail-wg0-f49.google.com ([74.125.82.49]:33591) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZkRx-0006W3-VR for emacs-orgmode@gnu.org; Sat, 17 Nov 2012 10:36:54 -0500 Received: by mail-wg0-f49.google.com with SMTP id gg4so1472705wgb.30 for ; Sat, 17 Nov 2012 07:36:53 -0800 (PST) In-Reply-To: <87sj888in4.fsf@pank.eu> (Rasmus Pank Roulund's message of "Sat, 17 Nov 2012 14:26:55 +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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Rasmus Pank Roulund Cc: emacs-orgmode@gnu.org Rasmus Pank Roulund writes: > I didn't manage to get your (Nicolas') or my own attempt working > correctly for exporting matrices. I still think it would be nice. It's hard to fix this since you're not very explicit here. > I tried to use the regexp > (not (string-match "|[\\+-]+|" table)) > to identify tables without heading separators, but it didn't work > properly. It cannot work in filters. These are applied on back-end ouput, in this case LaTeX code, not on Org code. > Thinking about it, it might be nice to be able to specify table export > function more generally. For instance, I might have a matrix with > labels (in LaTeX a bordermatrix or kbordermatrix). Likewise, it might > also be nice to specify a header argument to tables s.t. I can specify > a name, e.g. > > #+NAME: P > #+TBLOPTIONS: :prefix "P=" :type matrix > | a| b| > | c| d| > > would export to > \[P=\begin{bmatrix}a&b\\c&d\end{bmatrix}\] There is no TBLOPTIONS affiliated keyword, but it could go in ATTR_LATEX since this probably only makes sense in a LaTeX-type output. If you provide a full description of options and their effect, I might try to implement it. Regards, -- Nicolas Goaziou