From: Otared Kavian <otared@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Different renderings of cross references
Date: Sat, 4 Apr 2015 19:21:26 +0200 [thread overview]
Message-ID: <4C39589F-2593-4E6C-BE7C-785812D69C62@gmail.com> (raw)
Trying once more…
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
___________________________________________________________________________________
next reply other threads:[~2015-04-04 17:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-04 17:21 Otared Kavian [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-04-03 20:03 Otared Kavian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C39589F-2593-4E6C-BE7C-785812D69C62@gmail.com \
--to=otared@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).