2

I am writing in the class [report] and using package linguex for numbered examples in main text and in footnotes. I need to make my examples in footnotes numbered continuously. The issue is that currently they do not number continuously even within the same chapter, let alone across chapters. I found a solution for the same issue with the package gb4e (here: gb4e examples numbering in footnotes continuously), but it involves a counter that my package doesn't have: fnx, so it is not applicable to my problem (at least not clear to me how). Thanks in advance. This is my first time asking a question so if I could ask better, please let me know. Note for those who do not use the package linguex: it is based on numbered list environments. So a solution might rest on that fact.

Here is a minimal code illustrating the issue, and pictures of its compilation below:

\documentclass[12pt]{report}

\usepackage{linguex} %for glossed examples


\counterwithout{ExNo}{chapter} % for continuous numbered examples
\counterwithout{footnote}{chapter} % for continuous numbered footnotes


\begin{document}


\chapter{This is Chapter 1}

bla 


\section{Section 1}

Here is some text.\footnote{Here is a footnote with two examples. 

\ex.\label{bla} bla

\ex.\label{blabla} blabla

As you can see in example \ref{bla} and \ref{blabla}, we got an issue. 
}

\ex. main bla

\ex. main blabla


Here is MORE text.\footnote{Here is ANOTHER footnote with ANOTHER couple of examples. 

\ex.\label{boom} boom

\ex.\label{boom2} boom boom

As you can see in example \ref{boom} and \ref{boom2}, we got an issue within chapters. 

}



\chapter{This is Chapter 2}

 bla 

\section{Section 1 of Ch2}

Here is some text.\footnote{Here is a footnote with two examples. 

\ex.\label{bla2} bla2

\ex.\label{blabla2} blabla2

As you can see in example \ref{bla2} and \ref{blabla2}, we got an issue. 
}


Here is MORE text.\footnote{Here is ANOTHER footnote with ANOTHER couple of examples. 

\ex.\label{boom-ch2} boom2

\ex.\label{boom2-ch2} boom2 boom2

As you can see in example \ref{boom-ch2} and \ref{boom2-ch2}, we got an issue not only within chapters, but also across chapters. 

}

\ex. main bla

\ex. main blabla


\end{document}

picture-chapter1 picture-chapter2

On the pictures, you can see that the commands have solved the issue of example numbering in main text and of footnote numbering across chapters, but not the example-in-footnote numbering within or across chapters.

A solution of the within-chapter part of the example-in-footnote issue would be acceptable, and across chapters - preferable. Thank you in advance and I hope the solution helps others as well.

3
  • 1
    This is a very odd requirement, since there is no obvious connection between examples across footnotes, which is why they are generally given their own numbering set per footnote. So if you have 100 footnotes in your document, each with one example, you want the example in fn 100 to be 100? (Surely not in roman numerals...)? Even numbering across chapters is uncommon, but at least conceptually sensible.
    – Alan Munn
    Apr 20, 2020 at 17:23
  • 1
    But welcome to TeX.se, and thanks for providing your example document and a clearly defined question!
    – Alan Munn
    Apr 20, 2020 at 18:17
  • @AlanMunn Thank you for pointing this out. The numbering across chapters was required by my examiner to make examples unique. I agree with you that if there are many examples in footnotes, there would be a visual problem. Thank you for fixing my pictures and for approving my very first StackExchange question! Apr 22, 2020 at 11:28

1 Answer 1

2

I really don't know why you would want to do this, and this is absolutely not standard practice in the field, but the footnote example counter in linguex is FnExNo, so you can just add:

\counterwithout{FnExNo}{footnote} % for continuous numbered examples in footnotes

to have continuously numbered examples across footnotes. Since the \counterwithout command resets the output format of the counter, you need to set it back again:

\renewcommand{\theFnExNo}{\theFnExLBr\Exroman{FnExNo}\theFnExRBr} 

Since the formatting assumes small roman numerals not enormous ones, you will need to change the formatting of the footnote example number otherwise you will get things that look like this:

stupid roman example

Here's a full example, with the spacing adjusted to accommodate a largish roman numeral example number. The spacing will always be a bit of a compromise, because roman numerals don't increase in length linearly like arabic numerals do.

If your examining committee insists on unique numbers for every example, a better solution might be to number footnote examples with arabic numerals plus a prefix F for example. This would make the numbering more sensible, but still satisfy the uniqueness problem. You can do this easily by using the same code here but redefining \Exroman:

\renewcommand\Exroman{F\arabic}

This will give examples in footnotes numbered F1, F2, etc.

\documentclass[12pt]{report}

\usepackage{linguex} %for glossed examples


\counterwithout{ExNo}{chapter} % for continuous numbered examples
\counterwithout{footnote}{chapter} % for  continuous numbered footnotes
\counterwithout{FnExNo}{footnote} %  for continuous numbered footnote examples
\renewcommand{\theFnExNo}{\theFnExLBr\Exroman{FnExNo}\theFnExRBr}
\setcounter{FnExNo}{37}
\usepackage{etoolbox}
% adjust these next values[![enter image description here][2]][2] as needed depending on how many fn examples you end up with
\patchcmd{\NormalEx}{\else}
{\else\renewcommand{\philarge}{3em}\renewcommand{\philmiddle}{2em}\renewcommand{\philsmall}{2em}}{}{}
\begin{document}


\chapter{This is Chapter 1}

bla 


\section{Section 1}

Here is some text.\footnote{Here is a footnote with two examples. 

\ex.\label{bla} bla

\ex.\label{blabla} blabla

As you can see in example \ref{bla} and \ref{blabla}, we got an issue. 
}

\ex. main bla

\ex. main blabla


Here is MORE text.\footnote{Here is ANOTHER footnote with ANOTHER couple of examples. 

\ex.\label{boom} boom

\ex.\label{boom2} boom boom

As you can see in example \ref{boom} and \ref{boom2}, we got an issue within chapters. 

}



\chapter{This is Chapter 2}

 bla 

\section{Section 1 of Ch2}

Here is some text.\footnote{Here is a footnote with two examples. 

\ex.\label{bla2} bla2

\ex.\label{blabla2} blabla2

As you can see in example \ref{bla2} and \ref{blabla2}, we got an issue. 
}


Here is MORE text.\footnote{Here is ANOTHER footnote with ANOTHER couple of examples. 

\ex.\label{boom-ch2} boom2

\ex.\label{boom2-ch2} boom2 boom2

As you can see in example \ref{boom-ch2} and \ref{boom2-ch2}, we got an issue not only within chapters, but also across chapters. 

}

\ex. main bla

\ex. main blabla


\end{document}

footnotes from chapter 1

4
  • In your compiled example the reference to footnotes is messed up from roman to arabic (and weirdly, no brackets?!?). Do you have any idea how to keep them arabic (and with brackets), i.e. `As you can see in example (xl) and (xli)'? Apr 22, 2020 at 11:31
  • @VeselaSimeonova Sorry I missed that. I've updated the answer.
    – Alan Munn
    Apr 22, 2020 at 11:53
  • Very nice answer. It is can be useful. +1.
    – Sebastiano
    Apr 22, 2020 at 11:55
  • @VeselaSimeonova I've also made another suggestion to solve the roman numeral problem.
    – Alan Munn
    Apr 22, 2020 at 12:02

You must log in to answer this question.

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