![](https://secure.gravatar.com/avatar/1a4ff0766a653c62e0dab34bacda9873.jpg?s=120&d=mm&r=g)
The wiki states on page http://wiki.contextgarden.net/Latex_Packages#varioref that the macro `\somewhere` can be used to get same behaviour as varioref gives in LaTeX:
varioref Context provides similar functionality using \somewhere
Some more searching around made me find http://wiki.contextgarden.net/Command/somewhere There I can see, that I have to provide 2 text-arguments in curly braces and the references name in squarebrackets. So I did exactly that in an experiment. \somewhere{Foo}{Bar}[foo:bar] This does create a clickable “Foo” when the reference exists somewhere in the document, independent off the fact that this reference is on the same page or anywhere else. When the reference does not exists, “foo:bar” is typeset. I am using: ```plain $ context --version mtx-context | ConTeXt Process Management 0.61 mtx-context | mtx-context | main context file: /usr/local/texlive/2015/texmf-dist/tex/context/base/context.mkiv mtx-context | current version: 2015.05.18 12:26 ``` Example: ```tex \setupinteraction[state=start] \starttext \startsection[title={Foo-Bar},reference={foo:bar}] Blubberblubb, \somewhere{Foo}{Bar}[foo:bar]. \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \somewhere{Foo}{Bar}[foo:bar]. \stopsection \startsection[title={Bar},reference={bar:foo}] \somewhere{Foo}{Bar}[foo:bar]. \stopsection \stoptext ```
![](https://secure.gravatar.com/avatar/1a4ff0766a653c62e0dab34bacda9873.jpg?s=120&d=mm&r=g)
Repost...
Norbert Melzer
The wiki states on page http://wiki.contextgarden.net/Latex_Packages#varioref that the macro `\somewhere` can be used to get same behaviour as varioref gives in LaTeX:
varioref Context provides similar functionality using \somewhere
Some more searching around made me find http://wiki.contextgarden.net/Command/somewhere
There I can see, that I have to provide 2 text-arguments in curly braces and the references name in squarebrackets.
So I did exactly that in an experiment.
\somewhere{Foo}{Bar}[foo:bar]
This does create a clickable “Foo” when the reference exists somewhere in the document, independent off the fact that this reference is on the same page or anywhere else.
When the reference does not exists, “foo:bar” is typeset.
I am using:
```plain $ context --version
mtx-context | ConTeXt Process Management 0.61 mtx-context | mtx-context | main context file: /usr/local/texlive/2015/texmf-dist/tex/context/base/context.mkiv mtx-context | current version: 2015.05.18 12:26 ```
Example:
```tex \setupinteraction[state=start]
\starttext \startsection[title={Foo-Bar},reference={foo:bar}] Blubberblubb, \somewhere{Foo}{Bar}[foo:bar].
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\somewhere{Foo}{Bar}[foo:bar]. \stopsection
\startsection[title={Bar},reference={bar:foo}] \somewhere{Foo}{Bar}[foo:bar]. \stopsection \stoptext ```
participants (1)
-
Norbert Melzer