Re: [Pgfplots-features] pgfplotstable colomn width
Brought to you by:
cfeuersaenger,
ludewich
|
From: Christian F. <chr...@ar...> - 2009-04-21 19:03:55
|
Hello Gabor,
The column type of the usual latex tables can be communicated to
pgfplotstable using the 'column type' option. One example could be
\documentclass[a4paper]{article}
\usepackage{pgfplotstable}
\usepackage{booktabs}
\usepackage{array}
\usepackage{colortbl}
\begin{document}
\pgfplotstabletypeset[
columns/eins/.style={column type={|p{5cm}|}},
columns/zwei/.style={column type={p{3cm}|}},
debug, % provide messages at the terminal
]
{P.dat}
\end{document}
which yields the terminal debug output
------- PGFPLOTSTABLE DEBUG MODE: --------
\begin {tabular}{|p{5cm}|p{3cm}|}%
eins&zwei\\%
\pgfutilensuremath {0}&\pgfutilensuremath {1}\\%
\pgfutilensuremath {2}&\pgfutilensuremath {3}\\%
\pgfutilensuremath {4}&\pgfutilensuremath {5}\\%
\pgfutilensuremath {6}&\pgfutilensuremath {7}\\%
\pgfutilensuremath {8}&\pgfutilensuremath {9}\\%
\pgfutilensuremath {10}&\pgfutilensuremath {11}\\%
\end {tabular}%
and produces the column width 5cm and 3cm, respectively. The datafile is
appended.
The data files should be read completely - if not, you may have found a
bug. If you like, you can send a test table...
I hope this helps.
Regards
Christian
PS
I have CCed this mail to the mailing list because it may be interesting
for other users as well - hoping this is ok for you.
Gabor Tjong A Hung schrieb:
> Dear Christian,
> is there a way to specify the column. I am currently trying to use
> pgfplotstable to typeset all my tables, including the ones which I
> originally wrote in longtable/landscape, however it seems that my "data
> file" is not read completely and I have yet to find a way on how to
> specify the widths of the columns.
> I would be glad if you could give a hint.
>
> Regards,
> Gabor
|