In expex we can define commands such as \NNext and \LLLast in the header:



The former refers to the second following equation and the latter refers to the third previous equation.

However, we cannot define a \NNNext (refers to the third following equation) directly, as expex lacks the command \aanextx. How can we define a \NNNext in the header that functions with standard expex distribution files?

1 Answer 1


You can define \aanextx yourself:

\def\aanextx{{\@printref{\advance\excnt by 2 \ep@rawexnoprint}}}

But remember the warning from the expex documentation:

It is potentially dangerous to use macros like \bblastx or \anextx for reference to an example because later additions or deletions in the document can throw off the reference. This kind of misreference is particularly easy to overlook in proofing a document. It is better to assign names to the things you want to refer to and to refer to them by name, particularly in a document that will undergo a lot of rewriting. If reference by name is used and an intervening example is deleted or added, no problem arises. If the example which is referred to is deleted, then Tex will report a missing reference.

This problem gets much worse if the distance between the reference and the referenced object increases.

  • Thank you! I will remember to be careful. It's just sometimes I like to reference using the opposite style, and having the counterpart of \LLLast can be very helpful for the writing :) Commented Jul 9, 2018 at 17:23

You must log in to answer this question.

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