ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Robert Blackstone <blackstone.robert@gmail.com>
To: ntg-context@ntg.nl
Subject: Re: References to floats
Date: Wed, 9 May 2012 16:16:39 +0200	[thread overview]
Message-ID: <CANOUSwetk1mUp6kuhgHn1OGbk=DbE9dPLN=95v=kRxikK=E9gg@mail.gmail.com> (raw)

On Mon, 7 May 2012 22:25:37, Wolfgang Schuster
<schuster.wolfgang@googlemail.com> wrote:

> 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]
>>>
>>
>
> 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
>
Thank you, Wolfgang, for your help. Though this command works
perfectly and is nicely adaptable, in the end it does not give me what
I would have liked.
Perhaps my description of what I want was not clear enough.

For me, both commands, \somewhere{}{}[ref] and \atpage[ref], have in
common that they are imprecise when I want precision, namely when the
float is not at the same page as its reference, and precise when they
are in fact redundant, that is, when float and reference are on the
same page, where the reader will see it at one glance, whether it is
above or below.

Writing, for instance, on page 20: "See example 2 on page 20" is not
wrong but somehow it looks clumsy and unprofessional to me, and
unworthy of ConTeXt, if I may say so.
The challenge would seem "to pick ConTeXt's brain" just before the
final processing run, when it knows whether float and reference will
be on the same page or not. Could this perhaps be solvable by some
Lua-code?

Anyway, for lack of a better solution, I will for the time being refer
to each float with
"\in{ex.}[ref]
on \at{page}[ref]
\somewhere{on the previous page}{on the next page}[ref]
\somewhere{above}{below}[ref]"

and manually comment out, after the final processing run, what I cannot use.
Not very elegant, to put it mildly, and I hope that someone on this
list has a better solution.

Kind regards,

Robert Blackstone
___________________________________________________________________________________
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-09 14:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-09 14:16 Robert Blackstone [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-05-09 15:24 Alan BRASLAU
2012-05-07 13:03 Robert Blackstone
2012-05-07 20:25 ` Wolfgang Schuster
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='CANOUSwetk1mUp6kuhgHn1OGbk=DbE9dPLN=95v=kRxikK=E9gg@mail.gmail.com' \
    --to=blackstone.robert@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).