1

The solution used in this question has several drawbacks. It only works with \footnotelayout{m} or \globalcounter{footnote}. If the paracol breaks over two pages, the counter is not reset until all the columns are flushed, If a paragraph breaks across two pages, any footnotes will think they are on the first page.

\documentclass{article}
\usepackage{paracol}
\usepackage[nopar]{lipsum}

\usepackage{everypage}
\AddEverypageHook{\setcounter{footnote}{0}}

\begin{document}
\sloppy
\begin{paracol}{2}
  left column\footnote{a footnote}
  \switchcolumn%  
  right column\footnote{a footnote}

  \switchcolumn*% 
  \lipsum[1-3]\footnote{2nd footnote}
  \switchcolumn%      
  \lipsum[1-3]\footnote{2nd footnote}
\end{paracol} 
\end{document}

Here's a screenshot that demonstrates the issue:

demo

1

This solution modifies \footnote and \footnotemaek (renamed by paracol) to reset the counter if and when the page changes. It uses the counter lastfootnotepage for comparison since paracol maintains separate counters for each column.

The page number for each \footnote and \footnotemark is written to the aux file, as this is the only way to get the right page number for paragraphs broken over two pages. However, it takes two runs to work.

It turns out that paracol already supplies an index for the total number of \footnotes and \footnotemarks so far.

\documentclass{article}
\usepackage{paracol}
\usepackage[nopar]{lipsum}

\newcounter{footnotepage}
%\globalcounter{footnotepage}% only use with \footnotelayout{m}

\makeatletter
\newcommand{\checkfootnotepage}{%
  \protected@write\@auxout{}{\string\newfootnotepage{\number\pcol@nfootnotes}{\thepage}}%
\bgroup
  \@ifundefined{footnotepage\number\pcol@nfootnotes}{\count1=\value{page}}%
    {\count1=\csname footnotepage\number\pcol@nfootnotes\endcsname\relax}%
  \ifnum\value{footnotepage}<\count1\relax
    \setcounter{footnotepage}{\count1}%
    \setcounter{footnote}{0}%
  \fi
\egroup}

\newcommand{\newfootnotepage}[2]% #1 = index, #2 = page
 {\expandafter\xdef\csname footnotepage#1\endcsname{#2}}

\def\pcol@@footnote{% footnote for paracol
  \@ifnextchar[\@xfootnote{\checkfootnotepage
    \stepcounter\@mpfn
    \protected@xdef\@thefnmark{\thempfn}%
    \@footnotemark\@footnotetext}}

\def\pcol@@footnotemark{% \footnotemark for paracol
  \@ifnextchar[\@xfootnotemark
    {\checkfootnotepage% added
    \stepcounter{footnote}%
    \protected@xdef\@thefnmark{\thefootnote}%
    \@footnotemark}}
\makeatother

\begin{document}
\sloppy
\begin{paracol}{2}
  left column\footnote{a footnote}
  \switchcolumn%  
  right column\footnote{a footnote}

  \switchcolumn*% 
  \lipsum[1-3]\footnote{2nd footnote}
  \switchcolumn%      
  \lipsum[1-3]\footnote{2nd footnote}
\end{paracol} 
\end{document}

demo

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.