我想在数组中添加脚注,但编号不正确。知道哪里出了问题吗?
平均能量损失
\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}
答案1
Copunters 问题由 Tblr 库处理counter
:
\documentclass[a4paper,12pt]{memoir}
\usepackage{xcolor}
\usepackage[vmargin=99mm]{geometry}
\usepackage{tabularray}
\UseTblrLibrary{amsmath, booktabs, counter}
\usepackage{hyperref}
\begin{document}
Blabla \footnote{First note}
Blabla \footnote{Second note}
\begin{table}[ht]
\centering
\begin{tblr}{
colspec={c},
}%,
\toprule
Related Works\\
\hline[.6pt,white]
Blabla\footnotemark{}\\
\bottomrule
\end{tblr}
\caption{My caption}
\label{tab:comparisonRelatedWorks}
\end{table}
\footnotetext{Footnote in table.}
Blabla \footnote{Last note}
\end{document}