Sie sind hier

Tabellen, Text und Bild ineinandergeschoben

Ich arbeite mit scrartcl und bin jetzt auf ein Problem gestoßen, dass abhängig von der Formatierung ist. Da ich das Problem nicht mit article so ohne weiteres reproduzieren kann, frage ich hier. Ich vermute einen Fehler irgendwo in den Tiefen von Latex, kenne mich jedoch im Debuggen nicht aus.

In dem folgenden Minimalbeispiel konnte ich das Problem nachstellen. Auf der zweiten Seite sind Tabelle, Text und Bild ineinandergeschoben. Das Problem tritt nur bei bestimmten Anzahlen von Zeilen in der Tabelle auf.
Die Datei mit dem Bild habe ich angehängt, um das MWE nachvollziehen zu können.

Ich bin für jede Hilfe dankbar.

Ulrich

% !TEX TS-program = xelatex
% !TEX encoding = UTF-8
 
\documentclass[11pt,  headings=normal,%  
                       twoside, a4paper,%
                       DIV=15, BCOR=11mm,% 
                       parskip=half%
                       ]{scrartcl} %{scrreprt} 
 
\usepackage{fontspec} 
\setmainfont{Arial} 
 
\usepackage{polyglossia} 
\setdefaultlanguage[variant=usmax]{english} 
 
\usepackage{graphicx} 
\usepackage{booktabs} 
 
\usepackage{kantlipsum}
 
\begin{document}
\section{Chapter One}
\subsection{Subsection test}
\kant[1-4]
 
\begin{table}[h!]
\caption{Results of emission measurement at test conditions}
\centering
\begin{tabular}[t]{ cc } \toprule
0,03 ppb & Concentration measured at location 1  \\
1,14 ppb & Concentration measured at location 2  \\
1,14 ppb & Concentration measured at location 3  \\
1,14 ppb & Concentration measured at location 3  \\
1,14 ppb & Concentration measured at location 3  \\
1,14 ppb & Concentration measured at location 3  \\ %\addlinespace
1,14 ppb & Concentration measured at location 6  \\
1,14 ppb & Concentration measured at location 6  \\
 \bottomrule
\end{tabular}
\label{tab:testResults}         
\end{table}
 
\kant[5]
 
\begin{figure}[h!]
\includegraphics[width={\dimexpr0.7\textwidth}]{Platzhalter}
\caption{Sample point location at test conditions}
\label{fig:MaintSamplePoint}
\end{figure}
 
\subsection{Subsection Two}
 
\kant[6]
\end{document}
AnhangGröße
PDF icon Graphik "Platzhalter" für das MWE10.6 KB
forum: 
Bild von Markus Kohm

Gerüchteweise gehört habe ich von dem Problem schon. Du bist der erste, der mir das zeigt. Es geht auch mit einem Standardbild und mit einer Standardklassen und Standardschrift und pdflatex statt xelatex:

\documentclass[11pt,a4paper,twoside]{article}
 
\usepackage{graphicx} 
\usepackage{kantlipsum}
%\usepackage{parskip}
\setlength{\parskip}{.5\baselineskip plus .5\baselineskip}
 
\begin{document}
 
\section{Chapter One}
\subsection{Subsection test}
\kant[1-3]
 
\begin{table}[ht]
\caption{Results of emission measurement at test conditions}
\centering
\begin{tabular}{cc}
0,03 ppb & Concentration measured at location 1  \\
1,14 ppb & Concentration measured at location 2  \\
1,14 ppb & Concentration measured at location 3  \\
1,14 ppb & Concentration measured at location 3  \\
1,14 ppb & Concentration measured at location 3  \\
1,14 ppb & Concentration measured at location 3  \\ %\addlinespace
1,14 ppb & Concentration measured at location 6  \\
1,14 ppb & Concentration measured at location 6  \\
\end{tabular}
\label{tab:testResults}         
\end{table}
 
\kant[4]
 
\begin{figure}[ht]
\includegraphics[width=0.7\textwidth]{example-image}
\caption{Sample point location at test conditions}
\label{fig:MaintSamplePoint}
\end{figure}
 
\subsection{Subsection Two}
 
\kant[6]
\end{document}

Entscheidend ist die Kombination aus Absatzabstand mit Leim, \flushbottom und auftreten einer massiven underfull \vbox.

Wenn Du nicht willst, dass die Objekte gleiten, könntest Du einfach

\documentclass[11pt,a4paper,twoside,DIV=15,BCOR=11mm,headings=normal,parskip=half]{scrartcl}
 
\usepackage{graphicx} 
\usepackage{kantlipsum}
 
\begin{document}
 
\section{Chapter One}
\subsection{Subsection test}
\kant[1-4]
 
\begin{center}
\begin{minipage}{\textwidth}
\captionaboveof{table}{Results of emission measurement at test conditions}
\centering
\begin{tabular}{cc}
0,03 ppb & Concentration measured at location 1  \\
1,14 ppb & Concentration measured at location 2  \\
1,14 ppb & Concentration measured at location 3  \\
1,14 ppb & Concentration measured at location 3  \\
1,14 ppb & Concentration measured at location 3  \\
1,14 ppb & Concentration measured at location 3  \\ %\addlinespace
1,14 ppb & Concentration measured at location 6  \\
1,14 ppb & Concentration measured at location 6  \\
\end{tabular}
\label{tab:testResults}         
\end{minipage}
\end{center}
 
\kant[5]
 
\begin{center}
\begin{minipage}{\textwidth}
\includegraphics[width=0.7\textwidth]{example-image}
\captionof{figure}{Sample point location at test conditions}
\label{fig:MaintSamplePoint}
\end{minipage}
\end{center}
 
\subsection{Subsection Two}
 
\kant[6]
\end{document}

verwenden. Ebenso verschwindet das Problem, wenn man parskip=half durch parskip ersetzt oder einfach weglässt.

Vielen Dank für die Analyse und den Workaround. Damit kann ich erstmal leben.

Wo wäre das Problem den richtig addressiert? Ich verwende Miktex. Bei Miktex oder wäre ein Paket-Author anzusprechen?

Ulrich

Bild von Markus Kohm

Das ist weder ein Paket- noch ein MiKTeX-Problem. Wenn überhaupt, dann ist es ein Problem des LaTeX-Kerns. Ich vermute aber eher, dass es ein Phänomen von TeX selbst. Ich würde es so allgemein wie möglich (also mit möglichst wenigen Paketen und unter Verwendung einer Standardklasse) auf TeX.SX präsentieren. Vielleicht kann einer der Cracks dort erklären, wie es zustande kommt.

Das hat der Fragesteller unter parskip=half garbles sometimes pages gemacht und dort einen Link von Ulrike zu dem Eintrag other parskip settings may cause an overlapping of figures and text in der LaTeX bugs database erhalten. Workaround dort \vspace{\parskip}\pagebreak vor der Abschnittsüberschrift.

Comments for "Tabellen, Text und Bild ineinandergeschoben" abonnieren