I'm writing a thesis and I want to have glossed examples with Roman numerals in my footnotes. With my current code this does not work:

\usepackage [T1]{fontenc}
\usepackage[backend=biber, style=authoryear-comp]{biblatex}


...\footnote{blabla \ex. flafla} 


This gives the following error message:

 ... [18]
! Argument of \ex has an extra }.
<inserted text> 
l.279 ...h an immediate antecedent. \ex. flafla\\}
                                                   If this is correct, there...


Having searched the forum, I have tried to load the package gb4e, but this immediately gives this error on compilation (whether I have a footnote or not):

! Missing number, treated as zero.
<to be read again> 
l.228 {\catcode`\^^M

It seems like there might be some compatibility issue?

I am sorry if my post is not informative enough (or too informative), I am still a newbie.. Any ideas on what I must change?

  • You ask for some comments on asking questions. As you can tell from my answer, you needed very little code to demonstrate your problem (if you remove the \par the error arises.) So when you ask questions you should always try to reduce the code to exactly that needed to show the the problem. This means removing all unnecessary packages. It's also best to post a complete document however (as you did) rather than posting code fragments. – Alan Munn Jan 8 '18 at 14:50

The linguex package requires the example(s) to be terminated with a \par which in regular text effectively means it must be followed by a blank line. But in a footnote you need to terminate it with an explicit \par.

Here is an example in a footnote:
\footnote{As we can see in this example\ex. This is an example \par}

The problem you had with gb4e (which I would recommend) is caused by the fact that it redefines _ to be used in text mode. You can turn this off by loading gb4e late in the package list and adding \noautomath immediately after loading the it.

output of footnote

  • @EspenJK Since this solved your problem, it's helpful for others if you "accept" it by clicking on the green checkmark beside it. – Alan Munn Jan 8 '18 at 14:27

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.