I've seen a lot of examples for coding a single table using the tabular
environment like the following:
\begin{tabular}{|c|c|c|}
\hline
Column 1 & Column 2 & Column 3 \\
\hline
second row & & \\
\hline
third row & & \\
\hline
\end{tabular}
While this is sufficient for my purpose, it would be great to change how tables are displayed in general, so that I don't have to add the |
and \hline
for every single table. Instead maybe I only write something like this:
\begin{tabular}
Column 1 & Column 2 & Column 3 \\
second row & & \\
third row & & \\
\end{tabular}
and the same result is produced in the resulting PDF file. My question is not only about tabular, but also about other packages, which might be used for this.
How can I style my tables in such a way?
EDIT#1
I'd like to be able to have multiline cells, automatically linebreaking when a line gets too long, causing the table to be wider than textline width. so that I don't have to use \\
(which also causes problems in the example code). I also like horizontal lines for separating those multiline cells or cells in general from the other cells. An alternative would be having visibly more vertical spacing between cells than between lines of one and the same cell. However more space would not allow multiple paragraphs in a cell, or similar. One should be able to choose alignment (even better if both, vertically and horizontally), if necessary, otherwise default values for that (maybe centered).
c
is a single-line entry, if you want multi-line entries with line breaking usep{3cm}
but I agree with Mico, there is not really a question here.