1

I used this code (without using the package chngcntr) to number my linguistic examples in the footnotes in roman. Now, I would like the example-numbering in the footnotes to be continuously, I don't want to start the numbering from (i) in each footnote, but to count the overall numbers of examples in footnotes (i), (ii), (iii), and so on. I am quite new in Latex and don't really know how to do this.

My minimal code looks like this:

\documentclass[a4paper,11pt]{scrartcl}
\usepackage{etoolbox}
\usepackage{gb4e}
\makeatletter
\pretocmd{\@footnotetext}{
    \@noftnotefalse\setcounter{fnx}{0}%
    \renewcommand{\thexnumi}{\roman{xnumi}}
}{}{}
\apptocmd{\@footnotetext}{
    \@noftnotetrue
    \renewcommand{\thexnumi}{\arabic{xnumi}}
}{}{}
\@ifpackageloaded{bidi}{%
    \pretocmd{\@LTRfootnotetext}{
        \@noftnotefalse\setcounter{fnx}{0}%
        \renewcommand{\thexnumi}{\roman{xnumi}}
    }{}{}
    \apptocmd{\@LTRfootnotetext}{
        \@noftnotetrue
        \renewcommand{\thexnumi}{\arabic{xnumi}}
    }{}{}
}
\makeatother

\begin{document}

Does anybody have an advice?

1 Answer 1

2

Here's a slightly different version of the code. If you don't need the bidi code for RTL languages, you should just delete it.

\documentclass[a4paper,11pt]{scrartcl}
\usepackage{etoolbox}
\usepackage{gb4e}
\makeatletter
\patchcmd{\@footnotetext}{\setcounter{fnx}{0}}{\renewcommand{\thexnumi}{\roman{xnumi}}}{}{}
\apptocmd{\@footnotetext}{
    \@noftnotetrue
    \renewcommand{\thexnumi}{\arabic{xnumi}}%
}{}{}
% If you’re not using a Right-to-Left language you don’t need this code
\@ifpackageloaded{bidi}{%
    \patchcmd{\@LTRfootnotetext}{\setcounter{fnx}{0}}{\renewcommand{\thexnumi}{\roman{xnumi}}}{}{}
    \apptocmd{\@LTRfootnotetext}{
        \@noftnotetrue
        \renewcommand{\thexnumi}{\arabic{xnumi}}%
    }{}{}
} % end of RTL code
\makeatother

\begin{document}
Some text.\footnote{This is a footnote example.\begin{exe}\ex An example\end{exe}} Some more text.\footnote{This is another footnote example.\begin{exe}\ex Another example\end{exe}}
\end{document}

output of code

You must log in to answer this question.

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