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: References to floats
Date: Mon, 7 May 2012 22:25:37 +0200	[thread overview]
Message-ID: <671E3BCD-462C-4BD5-A8A8-C927E64CC68E@googlemail.com> (raw)
In-Reply-To: <CANOUSwfmaNxmr9uaLhF8t8A2BHnbBVCun3mCzkEawOw-=BHGdw@mail.gmail.com>


Am 07.05.2012 um 15:03 schrieb Robert Blackstone:

> On Mon, May 7, 2012 at 12:00 PM,   Hans Hagen <pragma@wxs.nl>
> wrote
>> 
>> On 6-5-2012 23:18, Robert Blackstone wrote:
> 
>>> Sometimes however the example is placed at the same page as the text discussing it.
>>> Is there any trick to adapt the reference to this situation, so that, instead of saying, for instance, "ex. 3.4 on page 12", it just says "ex. 3.4", or "ex. 3.4 below" or even "ex. 3.4 on this page"?
>>> 
> 
>> 
>> you can try \atpage[ref]
>> 
> 
> Thank you, Hans, for your quick reply. Unfortunately it does not help me.
> The result is basically the same as when I write "on \at{page}[ref]",
> except that, instead of "on page 20", I get "at page 20", (with the
> float sitting on page 20).
> Frankly, I'm rather surprised that this wish of mine seems not to have
> come up before.

The mechanism to check if float and reference are on the same page is available
as Hans has shown with \atpage but there are to many ways to format the output.

The best way is to define your own command for this.

\starttext

<\somewhere{above}{below}[fig:test]>

\page

<\somewhere{above}{below}[fig:test]>

\placefigure[][fig:test]{Test}{\framed{test}}

\page

<\somewhere{above}{below}[fig:test]>

\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:[~2012-05-07 20:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-07 13:03 Robert Blackstone
2012-05-07 20:25 ` Wolfgang Schuster [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-05-09 15:24 Alan BRASLAU
2012-05-09 14:16 Robert Blackstone
2012-05-06 21:18 Robert Blackstone
2012-05-07  7:41 ` Hans Hagen

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=671E3BCD-462C-4BD5-A8A8-C927E64CC68E@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).