Tabularx makes an unwanted line break

line-breakingtabularx

As the title says, Tabluarx makes me an unwanted line break when I fill only one page in a table.

In the specific context, this is a list of pros and cons.

\documentclass[%
    fontsize=11pt, 
    twoside=off
]{scrbook}

\usepackage{tabularx} 
\usepackage[tablewithout, figurewithout]{caption}

%tabelles
\renewcommand{\arraystretch}{1.8}
\newcolumntype{M}[1]{X<{\vspace{4pt}\hsize=#1\hsize}} 
%original: \newcolumntype{M}{X<{\vspace{4pt}}}
%one of both I **have** to use
 
%font
\usepackage[scaled]{helvet}
\renewcommand{\familydefault}{\sfdefault}

\begin{document}
\begin{table}[!h]
    \fontsize{9pt}{13pt}\selectfont
    \begin{tabularx}{\textwidth}{ M{1} | M{1} }
        \textbf{Vorteile}& \textbf{Nachteile}\\
        \hline
        + einfache, leicht nachvollziehbare Funktionsweise & - hoher Wartungsaufwand, regelmäßiger Ölwechsel \\ 
        + Signalleitung über die Tragkonstruktion möglich & - empfindlich für mechanische Beschädigung \\
        + nur geringer Strombedarf für die Aufzeichnung & - sehr anfällig für Belegung mit Treibzeug, Kraut \\
        + langlebig & - Blockade durch Sandkörner, Vereisung möglich\\
        & - großer zeitlicher Aufwand bei Hochwasser\\%
        & - Beeinflussung durch Schiffstoß und Eis\\%
    \end{tabularx}
    \caption{Vor- und Nachteile des Messflügels}
    \label{Pro/Con Messflügel Einzelmesspunkt}
\end{table}
\end{document}

enter image description here

Is there a way to stop that?

An unrelated question: Is there an easy way to replace your body text with lorem Ipsum?

Best Answer

I would like to recommend that you rearrange the table's contents as follows:

  1. the contents of both columns should be organized as separate list-like environments,

  2. don't use vertical rules, but well-spaced horizontal rules such as \midrule (provided by the booktabs package),

  3. use the enumitem package to customize the appearance of the list-like enviroments, including the vertical separation between items, and

  4. do away with instructions such as \fontsize{9pt}{13pt}\selectfont, \renewcommand{\arraystretch}{1.8}; and \vspace{4pt} as they are very clumsy and are (essentially) asking for trouble.

enter image description here

\documentclass[fontsize=11pt,twoside=off]{scrbook}

\usepackage[tablewithout, figurewithout]{caption}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}

%tabelles
\usepackage{tabularx,ragged2e} 
\newcolumntype{L}{>{\RaggedRight}X} % suppress justification

\usepackage[scaled]{helvet} % are you sure you need the 'scaled' option?
\renewcommand{\familydefault}{\sfdefault}

\usepackage{enumitem} % for \newlist and \setlist macros
\newlist{myitemize}{itemize}{1} % create a bespoke list-like env.
\setlist[myitemize]{label=\textbullet, left=0pt,
     itemsep=1ex, % set as needed/desired
     before={\begin{minipage}[t]{\hsize}},
     after={\end{minipage}}}
     
\usepackage{booktabs} % for '\midrule' macro

\begin{document}

\begin{table}[ht]
\footnotesize % instead of '\fontsize{9pt}{13pt}\selectfont'
\begin{tabularx}{\textwidth}{@{} LL @{}} % note: no vertical rule
\textbf{Vorteile} & \textbf{Nachteile} \\
\midrule
\begin{myitemize}
\item Einfache, leicht nachvollziehbare Funktionsweise 
\item Signalleitung über die Tragkonstruktion möglich 
\item Nur geringer Strombedarf für die Aufzeichnung 
\item Langlebig
\end{myitemize}
&
\begin{myitemize}
\item Hoher Wartungsaufwand, regelmäßiger Ölwechsel
\item Empfindlich für mechanische Beschädigung
\item Sehr anfällig für Belegung mit Treibzeug, Kraut
\item Blockade durch Sandkörner, Vereisung möglich
\item Großer zeitlicher Aufwand bei Hochwasser
\item Beeinflussung durch Schiffstoß und Eis
\end{myitemize}\\
\end{tabularx}
\caption{Vor- und Nachteile des Messflügels}
\label{Pro/Con_Messflügel_Einzelmesspunkt}
\end{table}

\end{document}
Related Question