From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Pank Roulund Subject: Re: Export tables as matrices (change tbl-export function on the fly) Date: Sat, 17 Nov 2012 14:26:55 +0100 Message-ID: <87sj888in4.fsf@pank.eu> References: <877gpojl2s.fsf@pank.iue.private> <87y5i4yx2w.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:43139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZiQJ-0005Jt-Ai for emacs-orgmode@gnu.org; Sat, 17 Nov 2012 08:27:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TZiQG-0007Nd-8f for emacs-orgmode@gnu.org; Sat, 17 Nov 2012 08:27:03 -0500 Received: from mailout-eu.gmx.com ([213.165.64.43]:34035) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1TZiQF-0007NF-VJ for emacs-orgmode@gnu.org; Sat, 17 Nov 2012 08:27:00 -0500 In-Reply-To: <87y5i4yx2w.fsf@gmail.com> (Nicolas Goaziou's message of "Wed, 14 Nov 2012 17:21:27 +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: n.goaziou@gmail.com Cc: emacs-orgmode@gnu.org Nicolas Goaziou writes: >> I'm doing some stuff where the natural output of my tables are >> matrices. I found a decent translation function here=C2=A0=C2=B9. Howe= ver, >> I'm not very successful in making org use it.=20 > > Using the new exporter, something like should replace any table using > default environment (i.e. no special attribute) and without horizontal > rules with bmatrix environment. It should also insert it in math mode > automatically. I didn't manage to get your (Nicolas') or my own attempt working correctly for exporting matrices. I still think it would be nice. I tried to use the regexp=20 (not (string-match "|[\\+-]+|" table)) to identify tables without heading separators, but it didn't work properly.=20 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=20 #+TBLOPTIONS: :prefix "P=3D" :type matrix | a| b| | c| d| would export to=20 \[P=3D\begin{bmatrix}a&b\\c&d\end{bmatrix}\] =E2=80=93Rasmus --=20 May the Force be with you