使用 paracol 时,脚注文本会重复多次

使用 paracol 时,脚注文本会重复多次

这是一个后续问题脚注文本在页面底部重复多次。我正在环境中使用@gusbrs 提供的解决方案paracol。看起来脚注文本仍然重复了两次。如何在环境中仅获取一个脚注文本,而不是两个paracol

\documentclass{article}
\usepackage[a4paper,margin=1mm]{geometry}
\usepackage{lipsum}
\usepackage{paracol}
\usepackage{tabularray}



% Solution of @gusbrs that works without paracol
% https://tex.stackexchange.com/questions/713140/the-footnote-text-is-repeated-several-times-at-the-bottom-of-the-page/713149#713149
\UseTblrLibrary{counter}
\UseTblrLibrary{functional}

\makeatletter
\IgnoreSpacesOn
\tlNew \gFootNoteTl
\intNew \gFootNoteInt
\prgNewFunction \footNote {m}
  {
    \IfBooleanF { \lTblrMeasuringBool }
      {
        \tlPutRight \gFootNoteTl
          {
            \stepcounter{footnote}
            \footnotetext{#1}
          }
        \prgReturn {\footnotemark{}}
      }
  }
\AddToHook{env/longtblr/before}{
  \intSetEq \gFootNoteInt \c@footnote
  \tlClear \gFootNoteTl
}
\AddToHook{env/longtblr/after}{
  \intSetEq \c@footnote \gFootNoteInt
  \tlUse \gFootNoteTl
}
\IgnoreSpacesOff
\makeatother





\begin{document}

\begin{paracol}{2}
    \lipsum[1]
    \switchcolumn 
    \DefTblrTemplate{firsthead, middlehead,lasthead}{default}{}
    \begin{longtblr}[
      presep=-4pt,postsep=0pt
    ]{
      colspec = {lXr},
      colsep=4pt,
      hlines,
      \columnwidth,
    }
        01/01/2020 $-$ 31/12/2022 & \textbf{First} & Text 1\\
        01/01/2018 $-$ 31/12/2019 \footNote{my first footnote} & \textbf{Second} & Text 2\\
        01/01/2016 $-$ 31/12/2017 & \textbf{Third} & Text 3\\
    \end{longtblr}
\end{paracol}

\newpage
\vspace{1cm}
\DefTblrTemplate{firsthead, middlehead,lasthead}{default}{}
\begin{longtblr}[
  presep=-4pt,postsep=0pt
]{
  colspec = {lX},
  colsep=4pt,
  hline{odd}={solid},
  row{odd}={belowsep=0pt},
  row{even}={abovesep=0pt},
  cell{even}{1} = {c=2}{wd=\textwidth-8pt,halign=j}
}
    01/01/2020 $-$ 31/12/2022 & \textbf{First}\\
    \lipsum[2] &\\
    01/01/2018 $-$ 31/12/2019 \footNote{my second footnote} & \textbf{Second}\\
    \lipsum[2] &\\
    01/01/2016 $-$ 31/12/2017 & \textbf{Third}\\
    \lipsum[2] &\\
\end{longtblr}

\end{document}

在此处输入图片描述 在此处输入图片描述

相关内容