求助各位大佬,在tblr
环境中使用\footnote
命令出现两个问题,
第一,脚注的计数器增加了 4;
第二,脚注没有出现在当前页面下方,仿照 @u19850 提供的回答https://ask.latexstudio.net/ask/question/17328.html
试着加入
\usepackage{footnote}
\BeforeBeginEnvironment{tabularray}{\savenotes}
\AfterEndEnvironment{tabularray}{\endsavenotes}
也没有效果,以下是问题的最小示例,麻烦大佬解惑,十分感谢!!!
\documentclass{book}
\usepackage[paperheight=3in]{geometry}
\usepackage{tabularray}
%\usepackage{footnote}
%\BeforeBeginEnvironment{tabularray}{\savenotes}
%\AfterEndEnvironment{tabularray}{\endsavenotes}
\begin{document}
A linear space\footnote{Remark 1}.
\begin{tblr}{lcr}
\hline
Alpha & Beta & Gamma\footnote{Remark tabularray} \\
\hline
\end{tblr}
A category\footnote{Remark 3}.
\end{document}
\documentclass{article}
\usepackage[a4paper]{geometry}
\usepackage{tabularray}
\UseTblrLibrary{counter}
\UseTblrLibrary{functional}
\makeatletter
\IgnoreSpacesOn
\tlNew \gFootNoteTl
\intNew \gFootNoteInt
\prgNewFunction \footNote {m}
{
\tlPutRight \gFootNoteTl
{
\stepcounter{footnote}
\footnotetext{#1}
}
\prgReturn {\footnotemark{}}
}
\AddToHook{env/tblr/before}{
\intSetEq \gFootNoteInt \c@footnote
\tlClear \gFootNoteTl
}
\AddToHook{env/tblr/after}{
\intSetEq \c@footnote \gFootNoteInt
\tlUse \gFootNoteTl
}
\IgnoreSpacesOff
\makeatother
\begin{document}
Some note\footnote{some note} before.
\bigskip
\begin{tblr}[evaluate=\footNote]{colspec={ll},hlines}
a line & a text\footNote{with a note} in the middle\\
another line & another text\footNote{with another note} in the middle
\end{tblr}
\bigskip
\begin{tblr}[evaluate=\footNote]{colspec={ll},hlines}
a line & a text\footNote{with a note} in the middle\\
another line & another text\footNote{with another note} in the middle
\end{tblr}
\bigskip
Another note\footnote{another note} after.
\end{document}
谢谢您!