Überarbeitungsverlauf[Zurück]
Klicke auf Einblenden/Ausblenden von Überarbeitungen 2

27 Feb '18, 22:09

Henri's gravatar image

Henri
15.7k133943

Verwende `tabularx`. Aus der Anleitung: > A new environment, tabularx, `tabularx`, is defined, which takes the same argu- ments arguments as tabular*, `tabular*`, but modifies the widths of certain columns, rather than than the inter column space, to set a table with the requested total width. The The columns that may stretch are marked with the new token X `X` in the preamble preamble argument. Außerdem: > Normally all X columns in a single table are set to the same width, [...] \documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{tabularx} \begin{document} \begin{table}[htb] \caption{Eine Tabelle} \begin{tabularx}{\linewidth}{@{\extracolsep{\fill}}*1l X X X X X X} \hline & & & \multicolumn{4}{c}{Kategorie} \\ \cline{4-7} & \multicolumn{2}{c}{Gesamt} & \multicolumn{2}{c}{Subkategorie} & \multicolumn{2}{c}{Subkategorie} \\ & \multicolumn{2}{c}{Text} & \multicolumn{2}{c}{Text} & \multicolumn{2}{c}{Text} \\ \hline Ein längeres Wort oder zwei & xx.xx & y.yy & xx.xx & y.yy & xx.xx & y.yy \\ Ein anderes Wort & xx.xx & y.yy & xx.xx & y.yy & xx.xx & y.yy \\ \end{tabularx} \end{table} \end{document} [![alt text][1]][1] [1]: https://texwelt.de/wissen/upfiles/test_401.png
Klicke auf Einblenden/Ausblenden von Überarbeitungen 1

27 Feb '18, 22:09

Henri's gravatar image

Henri
15.7k133943

Verwende `tabularx`. Aus der Anleitung: > A new environment, tabularx, is defined, which takes the same argu- ments as tabular*, but modifies the widths of certain columns, rather than the inter column space, to set a table with the requested total width. The columns that may stretch are marked with the new token X in the preamble argument. Außerdem: > Normally all X columns in a single table are set to the same width, [...] \documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{tabularx} \begin{document} \begin{table}[htb] \caption{Eine Tabelle} \begin{tabularx}{\linewidth}{@{\extracolsep{\fill}}*1l X X X X X X} \hline & & & \multicolumn{4}{c}{Kategorie} \\ \cline{4-7} & \multicolumn{2}{c}{Gesamt} & \multicolumn{2}{c}{Subkategorie} & \multicolumn{2}{c}{Subkategorie} \\ & \multicolumn{2}{c}{Text} & \multicolumn{2}{c}{Text} & \multicolumn{2}{c}{Text} \\ \hline Ein längeres Wort oder zwei & xx.xx & y.yy & xx.xx & y.yy & xx.xx & y.yy \\ Ein anderes Wort & xx.xx & y.yy & xx.xx & y.yy & xx.xx & y.yy \\ \end{tabularx} \end{table} \end{document} [![alt text][1]][1] [1]: https://texwelt.de/wissen/upfiles/test_401.png