# expex “everylabel=\actualexno” causes error in later references

I am having problems with numbers of examples. When I refer to the example (by its label) before it actually occurs, the number is correct. But referencing it after it has been defined gives a wrong number.

It happens only when I use the everylabel=\actualexno within the \definestyle command, and the example is divided into subexamples.

    \documentclass[10pt, a4paper]{article}
\usepackage{expex}
\definelingstyle{IJAL}{everylabel=\actualexno}  % HERE IS THE PROBLEM
\lingset{lingstyle=IJAL}                        % (and here)

\begin{document}
\gathertags
Referencing ahead of the definition gives
correct number of the whole example (\getref{a}),
as well as its part (\getref{a.A}),
although the full reference gives us too much (\getfullref{a.A}).

\pex<a>
\a<A> some example
\xe

The reference to the whole example is still correct afterwards (\getref{a}),
but the reference to its part has a one too large prefix (\getref{a.A})
and the full reference is just a concatenation of both, as usual (\getfullref{a.A}).

\end{document}


• expex was update on ctan yesterday. are you using the latest version? – wasteofspace Mar 13 '14 at 11:18
• Yes, it happens with the current version (which is 5.0b). – Ansa211 Mar 13 '14 at 11:26
• I contacted the package author and it turns out this behaviour is a bug. It will be corrected in future releases (not on ctan yet). – Ansa211 Mar 20 '14 at 14:52