Currently I am experimenting with the
cleverref and the
varioref package. These packages are great, however, I would like to have a reference command with the following subtle behavior:
- If the label and the reference are in the same section, then I would like to have the behavior of
- If the label and the reference are in different sections, then I would like to have the behavior of
The goal is to output a pageref only if the referenced label is in another section and on a page far away. The
\vref command already solves the second condition (far away page) sufficiently, however, it does not consider the sections.