From: Hans Hagen <pragma@wxs.nl>
To: ntg-context@ntg.nl
Subject: Re: Wrong float numbering with default=top
Date: Wed, 19 Dec 2012 01:53:31 +0100 [thread overview]
Message-ID: <50D1100B.5020705@wxs.nl> (raw)
In-Reply-To: <20121218171320.GF3400@homerow>
On 12/18/2012 6:13 PM, Marco Patzer wrote:
> On 2012–12–08 Marco Patzer wrote:
>
>> Thanks. It does not break anything in the final document and all
>> numbers are correct.
>
> Referring to the figures is messed up:
>
> \useMPlibrary
> [dum]
>
> \setupfloat
> [figure]
> [default=top]
>
> \ctxlua{structures.lists.autoreorder = true}
>
> \starttext
> \input knuth
>
> alpha: \in{figure}[alpha] \par
> beta: \in{figure}[beta] \par
> gamma: \in{figure}[gamma] \par
>
> \startplacefigure [title=Alpha, reference=alpha]
> \externalfigure [dummy]
> \stopplacefigure
>
> \startplacefigure [title=Beta, reference=beta]
> \externalfigure [dummy] [width=10cm, height=16cm]
> \stopplacefigure
>
> \startplacefigure [title=Gamma, reference=gamma]
> \externalfigure [dummy]
> \stopplacefigure
>
> \stoptext
>
> For the moment I would actually be happy with a workaround to get
> the numbers right. With autoreorder the referencing is wrong,
> without autoreorder the float numbers are not in order.
this kind of messy stuff needs some time to get right (apart from
messing up de code)
you cna try to patch this in strc-ref.lua
function filters.generic.number(data,what,prefixspec) -- todo: spec and
then no stopper
if data then
-- local numberdata = data.numberdata
numberdata = lists.reordered(data)
if numberdata then
helpers.prefix(data,prefixspec)
sections.typesetnumber(numberdata,"number",numberdata)
else
local useddata = data.useddata
if useddata and useddsta.number then
context(useddata.number)
end
end
end
end
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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 prev parent reply other threads:[~2012-12-19 0:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-04 12:21 Marco Patzer
2012-12-04 15:59 ` Hans Hagen
2012-12-04 18:18 ` Marco Patzer
2012-12-06 11:43 ` Marco Patzer
2012-12-06 16:31 ` Hans Hagen
2012-12-08 14:34 ` Marco Patzer
2012-12-08 23:23 ` Hans Hagen
2012-12-18 17:13 ` Marco Patzer
2012-12-19 0:53 ` Hans Hagen [this message]
2012-12-19 13:30 ` Marco Patzer
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=50D1100B.5020705@wxs.nl \
--to=pragma@wxs.nl \
--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).