5

When I put a footnote in tje environment \gla using the ExPex package, the footnote does not appear in the document. I tried to put a new definition of the command like in the manual of the (ExPeX) package in section 6.8 but did not work.

Here is the code:

\documentclass[14pt]{book}
\usepackage[margin=0.5cm]{geometry}
\usepackage{titlesec}
\usepackage{polyglossia}
\usepackage{fontspec}
%\defaultfontfeatures{Ligatures=TeX}
\setmainlanguage{brazil}

%\usepackage{longtable}
\usepackage{expex}
\usepackage{epltxfn}
\setmainfont{Arial Unicode MS}
\makeatletter

\def\everyfootnote{%
\keepexcntlocal
\excnt=1
\lingset{exskip=1ex,exnotype=roman,sampleexno=, labeltype=alpha,labelanchor=numright,labeloffset=.6em, textoffset=.6em}}
\renewcommand{\@makefntext}[1]{%
\everyfootnote
\parindent=1em
\noindent
\@thefnmark.\enspace #1%
}
\resetatcatcode

\lingset{glhangstyle=none, everyglb=\footnotesize, everyglft=\small}

\begin{document}
\begingl
\gla PLATON rêvait beaucoup, et on n’a pas moins rêvé depuis.
Il avait songé que\footnote{example here} la nature humaine était autrefois double, et
qu’en punition de ses fautes elle fut divisée en mâle et femelle.//


\glb Platão sonhar muito e {} {não ter} {} menos sonhar {desde então}
ele {} sonhar {} {} natureza humana ser outrora dupla e {que em} punicão
de {} faltas ele ser dividir em macho e fêmea 
    //
\endgl
\end{document}
1
  • 2
    Interesting question. The obvious split into \footnotemark and \footnotetext works but, as the text is processed twice, you end up with a wrong footnote number.
    – egreg
    Jul 20, 2016 at 14:22

1 Answer 1

5

There was discussion of this problem on the Ling-TeX mailing list in 2014. John Frampton (the author of ExPex) posted a way to do this, but I don't think it has been incorporated into ExPex as a permanent solution. Here's a (subscribers only) link to Frampton's message.

The other footnote code that you had in your example document that is described in Section 6.8 of the ExPex documentation has nothing to do with this particular problem so I have removed it. That code (and the associated package) is concerned with putting examples inside footnotes, whereas your problem concerns putting footnotes inside gloss lines.

I've also changed the code provided by Frampton (which used a mathmode superscript) to use \textsuperscript so that the text font is used instead of the math font. This change requires loading the realscripts package when used with XeLaTeX.

\documentclass[14pt]{book}
\usepackage[margin=0.5cm]{geometry}
\usepackage{titlesec}
\usepackage{polyglossia}
\usepackage{fontspec}
\usepackage{realscripts}
\defaultfontfeatures{Ligatures=TeX}
\setmainlanguage{brazil}
\usepackage{expex}
\setmainfont{Arial Unicode MS}
\makeatletter

\def\makefootnotehacks#1{\begingroup
\XKV@for@n{#1}\which{%
\edef\temp{fnhack\which}%
\advance\c@footnote by 1
\expandafter\xdef\csname \temp\endcsname
{\hskip.1em \textsuperscript{\the\c@footnote}}}\endgroup\ignorespaces}%
\def\footnotehacktext{\advance\c@footnote by 1 \footnotetext}

\makeatother

\lingset{glhangstyle=none, everyglb=\footnotesize, everyglft=\small}

\begin{document}
This is some regular text.\footnote{A regular footnote}


\makefootnotehacks{A,B,C}
\begingl
\gla PLATON rêvait beaucoup, et on n’a pas moins rêvé depuis.
Il avait songé {que\fnhackA} la nature humaine {était\fnhackB} autrefois double, et
qu’en punition de ses fautes elle fut {divisée\fnhackC} en mâle et femelle.//


\glb Platão sonhar muito e {} {não ter} {} menos sonhar {desde então}
ele {} sonhar {} {} natureza humana ser outrora dupla e {que em} punicão
de {} faltas ele ser dividir em macho e fêmea 
    //
\endgl
\footnotehacktext{First gloss fn}
\footnotehacktext{Second gloss fn}
\footnotehacktext{Third gloss fn}

 This is some regular text.\footnote{Another regular footnote}
\end{document}

output of code

2
  • Is there anyway to modify this so footnote numbering is automatic? Ideal would be to just use \footnote{blah} instead of \fnhack#...\footnotehacktext{blah}. Mar 19, 2017 at 22:17
  • @AlbertChin The simple answer is no.
    – Alan Munn
    Mar 19, 2017 at 22:31

You must log in to answer this question.

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