6

I'm using xepersian package for my Persian job, and I would like the footnote counter to automatically restart from '1' for each page of my document when I using \LTRfootnote command, but footmisc package not work with this command.

1 Answer 1

5

The best possible choice is to use zref-perpage package from zref bundle. It provides a \zmakeperpage[<reset>]{<counter>} command to force a counter reset with each page. Therefore adding

\zmakeperpage{footnote}

in your preamble will do the job. A mwe is as follows:

\documentclass{article}
\usepackage{xepersian}
\usepackage{zref-perpage}
\zmakeperpage{footnote} 
\begin{document}
سلام~\footnote{یک پانویس}. همچنین\LTRfootnote{A footnote}.\par
سلام~\footnote{یک پانویس}. همچنین\LTRfootnote{A footnote}.
\newpage
سلام~\footnote{یک پانویس}. همچنین\LTRfootnote{A footnote}.\par
سلام~\footnote{یک پانویس}. همچنین\LTRfootnote{A footnote}.

\end{document}

Another example without persian scripts, but still with presence of XePersian package is:

\documentclass{article}
\usepackage{xepersian}
\usepackage{zref-perpage}
\zmakeperpage{footnote} 
\begin{document}
\begin{latin}
Hello\footnote{Hi} world\LTRfootnote{Everyone!}!\par
Hello\footnote{Hi} world\LTRfootnote{Everyone!}!
\newpage
Hello\footnote{Hi} world\LTRfootnote{Everyone!}!\par
Hello\footnote{Hi} world\LTRfootnote{Everyone!}!
\end{latin}
\end{document}

BTW: The reason for footmisc not to works is that xepersian depends on bidi package (by the same author) for bidirectional typesetting; and bidi has extensive features for footnotes and it might conflict with some macros of footmisc.

You can also use perpage package, but it requires two runs of xelatex.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .