How do I create a table with booktabs which is \linewidth?
I tried different approaches among others to use tabularx environment or to put everything in a table environment but that did not change anything. See my MWE:
\documentclass[fontsize=12pt,a4paper,oneside, listof=totoc, % Tabellen- und Abbildungsverzeichnis ins Inhaltsverzeichnis bibliography=totoc, % Literaturverzeichnis ins Inhaltsverzeichnis aufnehmen titlepage, % Titlepage-Umgebung statt \maketitle headsepline, % horizontale Linie unter Kolumnentitel %abstracton, % Überschrift beim Abstract einschalten, Abstract muss dazu in {abstract}-Umgebung stehen DIV12, % auskommentieren, um den Seitenspiegel zu vergrößern BCOR=0mm, % Bindekorrektur, die den Seitenspiegel um 6mm nach rechts verschiebt. geometry package überschreibt diesen Wert ]{scrreprt} \usepackage{booktabs} \usepackage{tabularx} \begin{document} \begin{table}[H] \begin{tabularx}{\linewidth}{lll} \begin{tabular}{lll} \toprule \textbf{AAAAAAAAAAAAAA} & \textbf{BBBBBBBBBBBBB} & \textbf{CCCCCCCCC} \\ \midrule AAAAAAAAAAAAAAAAAAAAAAAAA & AAAAAAAAAAAAAAAAAAAAAAAAA & AAAAAAAAAAAAAAAAAAAAAAAAA \\ AAAAAAAAAAAAAAAAAAAAAAAAA & AAAAAAAAAAAAAAAAAAAAAAAAA & - \\ AAAAAAAAAAAAAAAAAAAAAAAAA & AAAAAAAAAAAAAAAAAAAAAAAAA & AAAAAAAAAAAAAAAAAAAAAAAAA \\ \bottomrule \end{tabular} \end{tabularx} \end{table} \end{document} 
A's? The reason yourtabularxenvironment currently exceeds the width of the text block by far is that LaTeX -- quite justifiably and unsurprisingly, in my opinion -- has no rules whatsoever for hyphenating strings such asAAAAAAAAAAAAAAAAAAAAAAAAAorBBBBBBBBBBBBB. Once you input shorter words -- especially if they're recognizable as belonging to a real language -- you'll find that LaTeX's line-breaking capabilities are pretty good.tabular\ environment?tabularx` is enough, and replace the tabularx preamble with{XXX}..tabularenvironment won't help the OP much (though I agree it's probably there by mistake).tabularxenvironment must be anX.