Maybe a third post will get attention from a guru…

Hi all,

As explained in the example below, I would like to setup the referencing 
mechanism so that a cross reference within a given chapter gives only the 
number of the section and that of an equation, while if the same reference is 
used in another chapter then the number of the chapter is also included. Is 
this possible with mkiv?

Best regards: OK
Here is a minimal example of what I would like to obtain:
%%%%% begin prefix-reference.tex
\setupinteraction[state=start]
\setupformulas[prefix=yes,prefixsegments=chapter:section,way=bysection,location=left]
 
\def\eqref#1{(\in[eq:#1])} 

\starttext
\startchapter[title=Introduction to sequences of numbers]

\startsection[title=On sequences,reference=sec:Sequences]
\placeformula[eq:Number-e]
\startformula
a_{n} := \sum_{k=0}^n {1 \over n!}
\stopformula
\stopsection

The sequence defined in equation \eqref{Number-e} cannot converge to a rational 
number.

(Here I would like to have (1.1) instead of (1.1.1)).

\startsection[title=Cauchy sequences]

The sequence defined in \eqref{Number-e} satisfies $a_{n} < a_{n+1} < 3$ but it 
does not converge to a rational number.

(Here I would like to have (1.1) instead of (1.1.1)).

\stopsection
\stopchapter

\startchapter[title=What is a real number]

\startsection[title=Limits of Cauchy sequences]
We proved in \in{section}[sec:Sequences] that the sequence defined in equation 
\eqref{Number-e} cannot converge to a rational number.

(Here I would like to have section 1.1, and equation (1.1.1)).
\stopsection
\stopchapter
\stoptext
%%%%% begin prefix-reference.tex
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 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
___________________________________________________________________________________

Reply via email to