ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Help wanted: cross referencing
@ 2015-04-08  8:45 Otared Kavian
  0 siblings, 0 replies; only message in thread
From: Otared Kavian @ 2015-04-08  8:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-04-08  8:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-08  8:45 Help wanted: cross referencing Otared Kavian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).