blob: 92c94bff57ef23f320cc0a834c05700040fd293e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
%format latex
%documentstyle[german,11pt,supertab,autotab]{darticle}
\documentstyle[german,11pt,supertab,autotab]{artdaf} %02.02.91
\textheight 24cm
\textwidth 17cm
\topmargin -2cm
\oddsidemargin -1cm
\parskip 6pt
\begin{document}
\begin{center}
\Large\bf Generating tabulars using the \\
{\tt autotab} Style \\[.5cm]
\normalsize Gabriele Kruljac \\
5. Oktober 1989
\end{center}
This is the description of the {\tt autotab} style. It offers some
new commands to generate tabulars nearly automatically.
The style itself is called as \verb|\documenstyle| option
\verb|\documentstyle[...,autotab,...]{darticle}|. The tabular
creating commands are called inside a {\tt tabular} or
{\tt supertabular} environment. Syntax:
\begin{center}
\begin{tabular}{l p{10cm}}
\verb|\readtabline{...}| & reads from data file and generates
the tabular entries; argument is
the number of columns = number of records
which bild one tabular line \\
\verb|\autotabline| & is the built tabular entry, inserts it's
into the tabular at the specified point
\end{tabular}
\end{center}
Every time \verb|\readtabline| is called it asks for the name of
the input data file and starts reading. The style reads as much records
as specified by the argument of the \verb|\readtabline| command,
puts them into \verb|\autotabline| connected with ampersands (\verb|&|)
and adds \verb|\\| to the last of these records.
This algorithm is repeated until end-of-file is found.
Using {\tt autotab} in conjunction with the {\tt supertabular}
environment offers the possibility to generate tabulars without regard
to necessary pagebreaks, because they will be inserted automatically
by {\tt supertabular} (see separate description).
\subsection*{Example}
The data is stored in file {\tt sonderdr.dat}. \verb|\readtabline|
results in an online dialog question:
\begin{center}
\begin{tabular}{l}
\tt Please type the name of the tabular input data file:\\
\verb|\inputfile=|
\end{tabular}
\end{center}
The user types:\hfill{\tt sonderdr.dat}.\hspace*{\fill}
\noindent The data look like:
\begin{verbatim}
265/89
Study of Plasma Potential Effects in a 40 MHz ...
Spectrochim. Acta
1989
44B
219-228
ww
264/89
Atomic Emission and Atomic Absorption Spectrometric ...
.
.
.
.
.
263/89
Comparative Surface and Bulk Analysis of Oxygen in Si3N4 ...
Fresenius Z.Anal.Chem.
1989
333
502-506
WW
262/89
\end{verbatim}
Seven records build one tabular line. There must be a blank record for each empty entry (marked by . in the above example).
\noindent Here is the definition of the tabular:
\begin{verbatim}
\small\renewcommand{\arraystretch}{.8}
\tablehead{\hline Publ-Nr. & \multicolumn{1}{c|}{Titel}
& ersch. & Jahr & Bd. & Seite & Institut \\
\hline}
\tabletail{\hline}
\begin{center}
\begin{supertabular}{|l|p{5cm}|p{3cm}|l|l|l|l|}
\noalign{\readtabline{7}}
\autotabline
\end{supertabular}
\end{center}
\end{verbatim}
\noindent And here is the result:
\small\renewcommand{\arraystretch}{.8}
\tablehead{\hline
Publ-Nr. & \multicolumn{1}{c|}{Titel}
& ersch. & Jahr & Bd. & Seite & Institut \\ \hline}
\tabletail{\hline}
\begin{center}
\begin{supertabular}{|l|p{5cm}|p{3cm}|l|l|l|l|}
\noalign{\readtabline{7}}
\autotabline
\end{supertabular}
\end{center}
\end{document}
|