[NTG-context] Automatic reference prefixing in heads with prefix=+

Christoph Reller christoph.reller at gmail.com
Tue Sep 30 08:08:16 CEST 2014


On Sat, Sep 27, 2014 at 12:00 PM, Christoph Reller <
christoph.reller at gmail.com> wrote:

> Hi,
>
> Various documents mention a namespace feature for references by setting
> prefix=+. This is a really cool feature but I cannot get it to work. Why
> does the following example not work:
>
> \setupinteraction[state=start]
> \setuphead[chapter][prefix=+]
>
> \starttext
>
> \startchapter[reference=chap1,title={First Chapter}]
>   \startsection[reference=sec1,title={First Section in First Chapter}]
>     Reference \type{sec1} is \about[sec1].\par
>     Reference \type{chap2:sec1} is \about[chap2:sec1].\par
>   \stopsection
> \stopchapter
>
> \startchapter[reference=chap2,title={Second Chapter}]
>   \startsection[reference=sec1,title={First Section in Second Chapter}]
>     Reference \type{sec1} is \about[sec1].\par
>     Reference \type{chap1:sec1} is \about[chap1:sec1].\par
>   \stopsection
> \stopchapter
>
> \stoptext
>
> Any help is appreciated.
>
> Christoph Reller
>

Does anybody have a minimal working example on this topic? Because of the
concise syntax "prefix=+" it is difficult to google for an example.

This feature is mentioned in two places:
1. contextref.pdf in section "12.5 Cross references" explains the main
mechanism but seems a little outdated.
2.  Hans Hagen, "This Way - Cross document referencing", September 2011.
This is more up to date, but mentions the feature only briefly. The
mentioned key there is not "prefix" but "referenceprefix", which doesn't
seem to work either.

Regards,
Christoph Reller
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20140930/a78ea071/attachment.html>


More information about the ntg-context mailing list