I'd like to add a footnote in an array, but the numbering is bad. Any idea what's wrong?
MWE
\documentclass[a4paper,12pt]{memoir}
% https://ctan.crest.fr/tex-archive/macros/latex/contrib/subfiles/subfiles.pdf
\usepackage{lmodern} % vector font
\usepackage[english]{babel}%
%% Input encoding
\usepackage[utf8]{inputenc}
%% Output encoding https://tex.stackexchange.com/a/677. Important to copy accents
\usepackage[T1]{fontenc}
\usepackage{microtype}
\usepackage{lipsum} % For tests, use like \lipsum[1-5] to write 5 paragraphs
%%% ========== Usual packages ==========
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{ninecolors}
\usepackage{tabularray} % Nice tabular (like booktabs, but with colors and more). Only in recent CTAN.
\UseTblrLibrary{booktabs}
\usepackage{hyperref}
\begin{document}
Blabla \footnote{First note}
Blabla \footnote{Second note}
\begin{table}[h]
\centering
\begin{tblr}{
colspec={c},
}%,
\toprule
Related Works\
\hline[.6pt,white]
Blabla\protect\footnotemark{}\
\bottomrule
\end{tblr}
\caption{My caption}
\label{tab:comparisonRelatedWorks}
\end{table}
\addtocounter{footnote}{-1}
\footnotetext{Footnote in table.}
Blabla \footnote{Last note}
\end{document}


tblrevaluates the content many times to get the best layout so your counter is being increased. use optional argument to\footnotemarkto force the number – David Carlisle Mar 13 '22 at 16:50