Re: [NTG-context] The `\somewhere`-macro

2015-08-27 Thread Norbert Melzer
Repost...

Norbert Melzer  schrieb am Sa., 08.08.2015, 18:06:

> 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
> ```
>
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] The `\somewhere`-macro

2015-08-08 Thread 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
```
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___