--- Ach, ich bin ja bloed. Sorry, aus Gewohnheit habe ich in Englisch geschrieben.
You could try pgfplotstable:
Code:
\documentclass[a4paper]{article}
\usepackage{pgfplotstable}
\usepackage{booktabs}
\usepackage{array}
\usepackage{colortbl}
\begin{document}
\thispagestyle{empty}%
\pgfplotstabletypeset[
% "header=false" means that the INPUT file has no header
% containing column names.
header=false,
%
% columns says which columns should be printed, and in which
% order.
% If one of them does not exist, pgfplotstable will look for
% "create on use//.style".
columns={No,0,Remark,OK},
%
% if you write "create on use//.style=...., you can
% define a way some missing column is to be created.
% Since Checklist1.txt contains only one column (without name),
% all remaining columns have to be created on usage.
create on use/OK/.style={
% empty.
},
create on use/Remark/.style={
% empty.
},
create on use/No/.style={
% The "No" column should depend on \pgfplotstablerow.
create col/assign/.code={%
% ... \pgfplotstablerow starts with 0.
\pgfmathparse{\pgfplotstablerow+1}%
\pgfkeyslet{/pgfplots/table/create col/next content}\pgfmathresult
%
% note that by default, columns are processed with the
% number parser.
},
},
columns/0/.style={
% The column "0" is the 0th column in Checklist1.txt .
% Since we said "header=false", pgfplotstable reads no column
% names from the CSV file; it assigns column indices as column
% names.
string type,
column type=l,
column name=Check,
},
%
% some pretty-printing:
every head row/.style={before row=\toprule,after row=\midrule},
every last row/.style={after row=\bottomrule},
%
every even row/.style={before row={\rowcolor[gray]{0.9}}},
]{Checklist1.txt}
\end{document}
The package is a generator for "tabular" environments. It can take its data either from some CSV file (default separator is white space) or from inline tables (i.e. CSV data written in place of a file name).
Since it is a tabular generator, it can work together with all (?) other LaTeX tabular packages, some of which have been used in the example above. You may want to inspect the pdf manual (for example from http://pgfplots.sourceforge.net/) to see if it suits your needs; it should come with enough examples.
Disclaimer note: I am author of pgfplotstable.
Lesezeichen