0

Including the picture:

enter image description here

To be honest, I've already seen that the cells ChTPP1, CHTPP2 and so on, seem to be centered vertically. So that, it's not a problem anymore. However I can not find the solution why there is such a huge distance between the end of the table and the first line of the text below. Here is the MWE:

\documentclass[twoside,10pt,a4paper]{article}

\usepackage{tabularx}

\newcolumntype{C}{>{\centering\arraybackslash}X}
\renewcommand\tabularxcolumn[1]{m{#1}}

\captionsetup{font={small,stretch=1}}
\captionsetup[table]{skip=0pt}
\captionsetup[figure]{skip=6pt}
%\setlength{\belowcaptionskip}{0pt plus 0pt minus 0pt}

\titlespacing*\section{0pt}{0pt plus 2pt minus 2pt}{6pt plus 3pt minus 3pt}
\titlespacing*\subsection{0pt}{12pt plus 6pt minus 6pt}{6pt plus 3pt minus 3pt}
\titlespacing*\subsubsection{0pt}{12pt plus 6pt minus 6pt}{6pt plus 3pt minus 3pt}
\titlespacing*\paragraph{0pt}{12pt plus 6pt minus 6pt}{6pt plus 3pt minus 3pt}

\setlength{\intextsep}{12pt plus 3pt minus 3pt}

\begin{center}
 \begin{table}[ht]
  \small
  \captionsetup{justification=justified,singlelinecheck=false}
  \caption[Stopień spęcznienia]{Dane przedstawiające stopień spęcznienia każdego rodzaju membran. Stopień spęcznienia został obliczony na podstawie wzoru    (\ref{eqn:specznienie})}
 \begin{tabularx}{\textwidth}{|*{7}{C|}}
   \cline{2-7}
   \multicolumn{1}{c|}{}
& ChTPP1 & ChTPP2 & ChTPP3 & ChTPP1HA & ChTPP2HA & ChTPP3HA\\  
   \cline{1-7} 
Stopień spęcznienia (\%) & 1244.24 & 1132.06 & 787.62 & 2588.73 & 1650.25 & 1363.64\\
   \hline
 \end{tabularx}
\label{table:specznienie}
\end{table}
\end{center}

Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text

\end document
  • You should not have \begin{center} and \end{center} around the table, which does nothing except for adding some vertical space at the spot. Use \centering inside the table environment (although in this specific case you can even do without it). – egreg Dec 26 '16 at 15:02
  • I've found the solution. Had to remove \begin{center} and `\end{center}, now the break is proper. Does anyone know why it works? – barnaba Dec 26 '16 at 15:05
  • 1
    The table adds a vertical spacing around tabulars, end center adds another one, but \centering just centres, without adding whatever. – Bernard Dec 26 '16 at 15:50
1

Your question is follow on question to your question left-justified-caption-and-centered-table-problem. And accepted answer already provide solution of your problem. To emphasize it, I only add dummy text before and after

\documentclass{article}
\usepackage[showframe]{geometry}
    \usepackage[T1]{fontenc}
    \usepackage[utf8]{inputenc}
\usepackage{caption}
\usepackage{tabularx}
\newcolumntype{C}{>{\centering\arraybackslash}X}

\usepackage{blindtext}

\begin{document}
\blindtext
    \begin{table}[h]
    \small
\captionsetup{justification=justified}
    \caption[Stopień spęcznienia]{Dane przedstawiające stopień spęcznienia każdego rodzaju membran. Stopień spęcznienia został obliczony na podstawie wzoru (\ref{eqn:specznienie})}
\label{table:specznienie}
\begin{tabularx}{\textwidth}{|*{7}{C|}}
    \cline{2-7}
\multicolumn{1}{c|}{}
    & ChTPP1    & ChTPP2    & ChTPP3 & ChTPP1HA & ChTPP2HA  & ChTPP3HA\\
    \cline{1-7}
Stopień spęcznienia (\%)
    & 1244.24   & 1132.06   & 787.62 & 2588.73  & 1650.25   & 1363.64   \\
    \hline
\end{tabularx}
    \end{table}
\blindtext
\end{document}

which gives:

enter image description here

Note: newer enclose float element inside \begin{center}\begin{figure}...\end{{figure}\end{center}! The right way is, as you already informed in comments above, use only \begin{figure}\centering ... \end{figure}.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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