I have a big project were the package floatrow
are used.
I discovered that when this package are used, the caption put inside my tables are now show outside.
I can't find any way of getting it back inside.
Here is my MWE:
\documentclass{article} % Document class
\usepackage{hyperref} % For hyperlinks
\usepackage{siunitx} % For typesetting numbers and units
\usepackage{nicematrix} % For creating tables
\usepackage{caption} % For customizing captions
\usepackage{xcolor} % For custom colors
\usepackage{floatrow} % For customizing float environments
%%% Color definition
\definecolor{gray-100}{HTML}{f3f4f6}
\definecolor{gray-200}{HTML}{e5e7eb}
\definecolor{gray-600}{HTML}{4b5563}
\definecolor{gray-800}{HTML}{1f2937}
\definecolor{slate-50}{HTML}{f8fafc}
\begin{document}
\begin{table}
\centering % Center the table
\renewcommand{\arraystretch}{1.5} % Adjust row height
\captionsetup[table]{font={bf,sf,color=gray-600,small}, skip=0pt} % Customize table caption
\begin{NiceTabular}{lcS}[hvlines, rounded-corners=6pt, rules/color=gray-200] % Create NiceTabular with specified properties
\CodeBefore % LaTeX code before the table
\rowcolor{gray-100}{1-2} % Colorize the first row
\rowcolors{3}{}{slate-50} % Alternate row colors starting from the third row
\Body % Body of the table
\Block{1-3}{\begin{minipage}{50mm}\captionof{table}{Table Title 1}\label{tab:title1}\end{minipage}} \\ % Multi-column cell for caption
\RowStyle[bold]{\color{gray-600}} % Style for the first data row
Town & Correspondant & {Value} \\ % Table headers
\RowStyle[nb-rows=*,color=gray-800]{} % Style for the remaining data rows
Paris & Peter & 1.23 \\ % Data rows
London & Helena & 23.23\\
Madrid & Georges &12.5 \\
Moscou & Henry & 4.77 \\
Tokyo & Selena & 85.3 \\
Lima & Victoria & 13.2 \\
Cap Town & Alexandra & 6 \\
Chicago & Vladimier & 1.34
\end{NiceTabular}
\end{table}
\end{document}
I use NiceTabular, but I am also able to get the same issue using tcolorbox
.
The expected result:
Actual: