-1
    **preamble**
    \documentclass[12pt]{amsart}
    \usepackage{geometry} 
    \usepackage[utf8]{inputenc}
     \usepackage{booktabs}
     \usepackage{tabularx}
     \usepackage{graphicx}
     \graphicspath{ {./documents/} }
     \usepackage{array}
     \usepackage{tabularx}
    
    \geometry{a4paper}
    \begin{document}
    **table**
    \begin{table}[]
\begin{tabular}{@{}ll@{}}
\toprule
Organisation                      & Role                                                                                                                                                                                                                                                                                                                                          \\ \midrule
Courts                            & \begin{tabular}[c]{@{}l@{}}Judges and lawyers were Nazi members and enforced an improvised "Nazi law"\\ \\ Special courts set up to prosecute political crimes\end{tabular}                                                                                                                                                                   \\
Gestapo                           & \begin{tabular}[c]{@{}l@{}}Secret state police set up by Göring in 1933. Himmler gained control after 1933, and by 1936, an established part of the SS\\ \\ Enforce political conformity, but relied on denunciations by the German population. In Würzburg, 54\% of race-related charges were initiated by private citizens.\end{tabular}    \\
SS (Schutzstaffel - Defense Unit) & \begin{tabular}[c]{@{}l@{}}Private army and security system set up by Hitler's personal guards in 1925, led by Himmler after 1929. \\ \\ Key role in Kristallnacht -\textgreater replaced the SA as main military unit\\ \\ Enforce racial policy and run concentration camps\\ \\ Sub units: 1) Death's Head Units 2) Waffen SS\end{tabular} \\
SD (Sicherheitsdienst)            & \begin{tabular}[c]{@{}l@{}}Set up in 1932 by Himmler\\ \\ Internal security force of SS. Main role was intelligence eg. reports of SD, popularity of party, situation of Church\end{tabular}                                                                                                                                                  \\
Concentration Camps               & \begin{tabular}[c]{@{}l@{}}First used to detain political opponents (communists and socialists), later anybody who spoke out against the regime\\ \\ Forced labour from prisoners. Camps were then built near stone quarries and brick making factories\end{tabular}                                                                          \\ \bottomrule
\end{tabular}
\end{table}
\end{document}

When I compile, it cuts off the page. I've tried looking at other stack exchange solutions but they didn't work for me (or at least my solo troubleshooting). Will tabularx automatically create new sentences when they are long?

6
3
  • Based on https://blog.modelworks.ch/automatic-line-breaks-in-latex-tables/.
  • Your code is a mess :), e. g. you load tabularx two times and you load geometry two times. In addition, the **preamble** at the beginning caused an additional compilation error for me which I first had to find.
  • Not sure why you use \begin{tabular} inside \begin{tabular}.
  • You also did not use tabularx in your code.

\documentclass{article}
\usepackage{booktabs}
\usepackage{tabularx}
\begin{document}

\begin{table}
\centering % not needed 
    \begin{tabularx}{\textwidth}{lX}
    \toprule
    Organisation     & Role \\
    \midrule
    Courts & Judges and lawyers were Nazi members and enforced an improvised "Nazi law" Special courts set up to prosecute political crimes \\
    \bottomrule
    \end{tabularx}%
\label{tab:addlabel}%
\caption{A table with line breaks}
\end{table}%

\end{document}

enter image description here

Not the answer you're looking for? Browse other questions tagged or ask your own question.