I want to label footnotes using the threeparttable package, but it does not seem to be able to assign a label without proper caption. In fact if I disable the \caption package it works. But I need the package for the font size.
\documentclass[12pt]{report}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}
\usepackage{threeparttable}
\usepackage[font=small, labelfont=bf]{caption}
\usepackage{tikz}
\usetikzlibrary{matrix, backgrounds}
\tikzset{
table/.style={
matrix of nodes,
row sep=-\pgflinewidth,
column sep=-\pgflinewidth,
nodes={
rectangle,
align=center,
text width=10em,
},
nodes in empty cells,
row 1/.style={nodes={fill=black, text=white, font=\bfseries}, text height=0.8em},
}
}
\begin{document}
\begin{table}
\centering
\caption{Glossary: with \texttt{TikZ} drawing cells on background layer}
\label{tabA1}
\begin{threeparttable}
\begin{tikzpicture}
\matrix[table, ampersand replacement=\&] (TabA1)
{
A1 \& A2\stepcounter{footnote}\tnote{\thefootnote} \& A3 \\
B1\footnotemark{} \& B2 \& B3\footnotemark{} \\
C1 \& C2\textsuperscript{\ref{note1}} \& C3 \\
};
%\begin{scope}[on background layer]
%\foreach \i in {1,2,3}
%\draw[fill=black!10] ([xshift=\pgflinewidth]TabA1-1-\i.south west) rectangle ([xshift=-\pgflinewidth]TabA1-2-\i.south east);
%\end{scope}
\end{tikzpicture}
\addtocounter{footnote}{-3}
\begin{tablenotes}\footnotesize
\stepcounter{footnote}
\item[\thefootnote]{\label{note1} This is broken.}
\stepcounter{footnote}
\stepcounter{footnote}
\end{tablenotes}
\end{threeparttable}
\end{table}
\addtocounter{footnote}{-2}
\stepcounter{footnote}\footnotetext{This seems to be ok}
\stepcounter{footnote}\footnotetext{This seems to be ok too}
\end{document}

threeparttablexpackage, which has a slightly different syntax w.r.t.threeparttable. – Bernard Sep 12 '18 at 23:53\tnote{1}, &c. I insist that these table notes can be cross-referenced with thethreeparttablexpackage, and you should take look at its documentation. – Bernard Sep 13 '18 at 00:13tikzpicturejust to colour the background of a row? – Bernard Sep 13 '18 at 01:00