ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@googlemail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: referencing
Date: Sun, 20 Nov 2011 19:42:02 +0100	[thread overview]
Message-ID: <BD35735D-FCF5-4390-A297-9444896EF087@googlemail.com> (raw)
In-Reply-To: <34E24576-0864-4263-B44A-711118D75BEB@xs4all.nl>


Am 20.11.2011 um 18:46 schrieb Hans van der Meer:

> I have the following question about references.
> 
> Using for example \at one can say somehting like "see on \at{page}[ref] for the figure..
> But when the figure is one the same page it seems a bit superfluous to reference to it. In the same manner it is a bit of an overkill to put a hyperlink to the page where this link resides itself.
> 
> It is clear that ConTeXt knows if it is on the same page as is referenced, because then a link is coloured with contrastcolor instead of color.
> 
> Now the question: how easy/difficult is it to either suppress such an \at-reference or switch between chosen alternate texts for links on or off the same page as the referenced item?

\def\SamePage[#1]%
  {\doifreferencefoundelse{#1}
     {\ifnum\referencepagestate=1
        \unknown % reference is on the same page
       \else
         \at[#1]%
      \fi}
     {\donothing}}

\starttext

\pagereference[one]
\pagereference[two]

One: \SamePage[one]

\page

Two: \SamePage[one]

\stoptext

Wolfgang
___________________________________________________________________________________
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	other threads:[~2011-11-20 18:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-20 17:46 referencing Hans van der Meer
2011-11-20 18:42 ` Wolfgang Schuster [this message]
2011-11-20 20:26   ` referencing Meer, H. van der
2011-11-20 20:37     ` referencing Wolfgang Schuster
  -- strict thread matches above, loose matches on Subject: below --
2010-01-05 13:46 Referencing Willi Egger
2010-01-05 15:59 ` Referencing Hans Hagen
2002-02-06 14:38 Referencing Giuseppe Bilotta

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=BD35735D-FCF5-4390-A297-9444896EF087@googlemail.com \
    --to=schuster.wolfgang@googlemail.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).