[SciPy-User] 2d array to Latex

josef.pktd at gmail.com josef.pktd at gmail.com
Sat Jan 23 00:37:22 EST 2010


On Fri, Jan 22, 2010 at 11:59 PM, Pierre GM <pgmdevlist at gmail.com> wrote:
> On Jan 22, 2010, at 10:39 PM, josef.pktd at gmail.com wrote:
>> Is there a function somewhere to print a 2d array with Latex markup?
>>
>> No fancy table required, just for a quick copy and paste into a Latex document.
>
> Check scikits.timeseries.lib.reportlib, I think Matt coded something to that effect. You'll probably have to adapt it a bit, but that should get you started.
> Or you could do it yourself:
> * print the \begin{table} header
> * print "\\\n".join(["&".join(map(str,line)) for line in array])
> * print the \end footer

Thanks, I will look at the scikits. Your example looks simple enough,
but I don't feel like debugging latex (and struggle with formatting)
if I can avoid it.

Josef


>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>



More information about the SciPy-User mailing list