emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] How do I format numbers to an exported table to latex, produced


From: Diogo Ramos
Subject: Re: [O] How do I format numbers to an exported table to latex, produced by a code block?
Date: Sun, 28 Feb 2016 20:55:47 -0300

>> I have the following org file:
>>
>> #+BEGIN_SRC python :exports both
>>   import numpy as np
>>
>>   return np.matrix([[.123456789, 2], [3, 4]])
>> #+END_SRC
>>
>> #+RESULTS:
>> | 0.12345679 | 2 |
>> |          3 | 4 |
>>
>> I want to export it to latex to produce a pdf but I want to format the
>> numbers of the table so I get, say
>>
>> | 123.456e-3 | 2.000 |
>> |      3.000 | 4.000 |
>>
>> on the exported pdf.
>>
>> How can I do it?
>
>
> tblfm allows a printf descriptions.  E.g.
>
> | 0.120 | 2.000 |
> | 3.000 | 4.000 |
> #+tblfm: $1=$1;%.3f :: $2=$2;%.3f 
>
> You can attach it via :post.

How do I use `:post'?

In the (info "(org) A LaTeX example") node there is the description of
`:fmt' and `:efmt' which seem to do what I want but I can't figure out
how to use them.



reply via email to

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