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}
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:
the contents of both columns should be organized as separate list-like environments,
don't use vertical rules, but well-spaced horizontal rules such as
\midrule
(provided by thebooktabs
package),use the
enumitem
package to customize the appearance of the list-like enviroments, including the vertical separation between items, anddo 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.