I am trying to put a Table with 3 rows and two columns but the second column contain a discription with a couple of sentences. How can I write the table command to put the table accordingly to the Latex File?
Here an example of the table that I would like to put:
\begin{table}[h]
\captionsetup{justification=centering,skip=0pt}
\caption{Arten der Reichweite von RFID-Systemen \cite{Internetquelle2}}
\scriptsize
\resizebox{\textwidth}{!}{%
\begin{tabular}{@{}|l|l|@{}}
\toprule[1pt]
\textbf{Text Text } & Text Text Text Text Text Text Text Text Text Text . Text Text ext Text Text Text Text Text Text Text Text Text Text Text Text Text Text. Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Textext Text Text Text Text Text Text Text Text Text\\
\midrule
\textbf{Text Text } & Text Text Text Text Text Text Text Text Text. Text Text Text Text Text Text Text Text Text. Text Text Text Text Text Text Text Text Text.
Text Text Text Text Text Text Text Text Text.\\
\midrule
\textbf{Text Text } & Text Text Text Text Text Text Text Text Text. Text Text Text Text Text Text Text Text Text.\\
\bottomrule[1pt]
\end{tabular}%
}
\end{table}
This is the Output:
[1]: https://i.stack.imgur.com/YHYAM.png
Thanks a lot in Advance for the help!
Best Answer
A general comment up front: You've provided a perfect minimum working example! Many thanks.
Even though opinions may differ as to which approach is best for typesetting the table at hand, there has got to be near-unanimity as to which approach is worst: the approach that doesn't allow line-breaking in cells and forces the width of the resulting catastrophe of a table not to exceed
\textwidth
(the width of the text block) via a\resizeblock
instruction. As the screenshot below aptly demonstrates, the result is a typographic abomination.For the table at hand, it's (hopefully) obvious that any good approach must start by allowing automatic line breaking in the second column. This may be achieved by using the
p
column type instead of thel
column type. I recommend making LaTeX handle the chore of determining the width of thep
column by employing thetabularx
package, setting the overall width of thetabularx
environment to\textwidth
, and employing anX
column (which is nothing but ap
column for which LaTeX performs the width calculation on the fly) for the second column.In the screenshot, I contrast the results of the sngle-worst approach with the
tabularx
approach. I suppose it's not much of a contest, is it?Note that, for the second table, I've also omitted all vertical and horizontal rules and automated the bold-facing of the contents of the first column.
In keeping with the theme that it's difficult to determine which particular approach is best for typesetting the material at hand, I provide an additional solution, viz., an approach that employs a
description
list environment. For the material at hand, I beleve it's hard to tell whether or not thedescription
approach is better or worse than thetabularx
approach. For sure, though, both are infinitely better than the first approach.