2

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:

\documentclass[12]{report}
\setcounter{tocdepth}{5}
\usepackage{layout}
\setlength{\voffset}{-0.75in}
\setlength{\headsep}{5pt}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage{authblk}
\usepackage [T1]{fontenc}
\usepackage[backend=biber, style=authoryear-comp]{biblatex}
\usepackage{xyling}
\usepackage[super]{nth}
\usepackage{linguex}
\usepackage{xspace}
\usepackage{cgloss4e}
\usepackage{abstract}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{hyperref}
\usepackage{xr}
 \let\eachwordone\itshape

\begin{document}

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

\end{document} 

This gives the following error message:

 ... [18]
! Argument of \ex has an extra }.
<inserted text> 
                \par 
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> 
                   \let 
l.228 {\catcode`\^^M
                    =\active%
?

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
1

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.

\documentclass{article}
\usepackage{linguex}
\begin{document}
Here is an example in a footnote:
\footnote{As we can see in this example\ex. This is an example \par}
\end{document}

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.