emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Export tables as matrices (change tbl-export function on the fly


From: Rasmus Pank Roulund
Subject: Re: [O] Export tables as matrices (change tbl-export function on the fly)
Date: Sat, 17 Nov 2012 14:26:55 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

Nicolas Goaziou <address@hidden> writes:

>> I'm doing some stuff where the natural output of my tables are
>> matrices.  I found a decent translation function here ¹.  However,
>> I'm not very successful in making org use it. 
>
> 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 
   (not (string-match "|[\\+-]+|"  table))
to identify tables without heading separators, but it didn't work
properly. 

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}\]

–Rasmus

-- 
May the Force be with you



reply via email to

[Prev in Thread] Current Thread [Next in Thread]