page references (varioref)
![](https://secure.gravatar.com/avatar/cedc4d83943006afe3994fb0a0455f82.jpg?s=120&d=mm&r=g)
Hello, I tried to implement something like the LaTeX varioref package, but without success. In detail: I would like to create a command like \at[], say \VarioAt[], that outputs a text in function of the page-number, for example: * if page is the same as the current page: "on the current page" * if page is next page: "on the following page" * if page is previous page: "on the preceding page" * else "on page XX" (XX is page-number) I tried with something like \doifelse{\expanded{\at[myRef]}}{\expanded{\currentpage}}% {same page}{different pages} But it seems, that this does not work... :( Could you help please? Greetings, Peter -- http://pmrb.free.fr/contact/
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
� wrote:
Hello,
I tried to implement something like the LaTeX varioref package, but without success. In detail: I would like to create a command like \at[], say \VarioAt[], that outputs a text in function of the page-number, for example: * if page is the same as the current page: "on the current page" * if page is next page: "on the following page" * if page is previous page: "on the preceding page" * else "on page XX" (XX is page-number)
I tried with something like \doifelse{\expanded{\at[myRef]}}{\expanded{\currentpage}}% {same page}{different pages} But it seems, that this does not work... :(
there is \atpage[ref] (as well as \somewhere{pre}{post}[ref]) with the associated label texts "hencefore" and "hereafter" rather old code but it should still work Hans
![](https://secure.gravatar.com/avatar/cedc4d83943006afe3994fb0a0455f82.jpg?s=120&d=mm&r=g)
On Tue, 3 Jan 2006, Hans Hagen wrote:
there is \atpage[ref] (as well as \somewhere{pre}{post}[ref]) with the associated label texts "hencefore" and "hereafter"
rather old code but it should still work
Thanks a lot! Not as rich as varioref, but exactly what I need! Cheers, Peter -- http://pmrb.free.fr/contact/
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
� wrote:
On Tue, 3 Jan 2006, Hans Hagen wrote:
there is \atpage[ref] (as well as \somewhere{pre}{post}[ref]) with the associated label texts "hencefore" and "hereafter"
rather old code but it should still work
Thanks a lot! Not as rich as varioref, but exactly what I need!
well, writing such things is rather trivial so it can always be extended Hans
participants (2)
-
Hans Hagen
-
Peter Münster