1

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

\newcommand{\NNext}[1][]{(\anextx{#1})\xspace}

\newcommand{\LLLast}[1][]{(\bblastx{#1})\xspace}

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?

3

You can define \aanextx yourself:

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

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 :) – Rethliopuks Jul 9 '18 at 17:23

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.