Skip to content

SX: longtabu table with captionsetup{labelsep=newline} problem

Migrated from https://sourceforge.net/p/latex-caption/tickets/52/

From https://tex.stackexchange.com/questions/329926/longtabu-table-with-captionsetuplabelsep-newline-problem:

I would like to create the table below with the "labelsep=newline"option in \captionsetup{}. However, I get an error message. Without the "labelsep=newline" parameter the code is running fine (see example). Any help would be appreciated. Thank you.

\documentclass[float=false, crop=false]{standalone}
\usepackage{collcell}
\usepackage[latin1]{inputenc}
\usepackage{longtable,tabu}
\usepackage{xcolor}
\usepackage{hyperref}
\usepackage{caption}
\usepackage{geometry}
\geometry{a4paper, top=25mm, left=40mm, right=25mm, bottom=30mm,
    headsep=10mm, footskip=12mm}
\captionsetup[table]{justification=centering,labelsep=newline}
%\captionsetup[table]{justification=centering}
\begin{document}
{\footnotesize
\begin{longtabu} to \textwidth {
    X[15,l]
    X[4,l]
    X[6,l]
    X[8,l]
    }
    \caption{Caption 1}\\
    \caption*{Caption 2}\\
    \label{tab:table genral information es50} \\
    \hline \hline \hline \hline
    \textbf{Column 1} & 
    \textbf{Column 2} &
    \textbf{Column 3} &
    \textbf{Column 4}

    \\  \hline \hline \hline \hline   
                            &        &         &  \\
     entry& entry     & entry & entry\\
     entry & entry           & entry & entry\\
     entry & entry                          & entry & entry\\
\end{longtabu}
}
\end{document}
Edited by Axel Sommerfeldt