ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: Giving a float its own number
       [not found] <mailman.1.1161252001.22451.ntg-context@ntg.nl>
@ 2006-10-19 10:46 ` Duncan Hothersall
  0 siblings, 0 replies; 2+ messages in thread
From: Duncan Hothersall @ 2006-10-19 10:46 UTC (permalink / raw)


I said:

> Where did I go wrong? I'm sure there is an easy way to do this.

And yes there is! The easy way is to use the new beta, which works.

Sorry for the noise.

Duncan

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Giving a float its own number
@ 2006-10-19  9:13 Duncan Hothersall
  0 siblings, 0 replies; 2+ messages in thread
From: Duncan Hothersall @ 2006-10-19  9:13 UTC (permalink / raw)


I have a book with parts and chapters; figures in the chapters are
numbered 1.1, 2.1 etc. but sometimes a part has a figure in it as well,
before the chapters start. The desired numbering for such figures is to
follow the Part numbers, and be in capitalised roman numerals (in other
words, Figure II would be the figure in the intro of Part 2).

So I define a new clone of figure called Partfigure, and give it the
necessary setups to make the numbering come out in cap roman; and I
thought the easiest way of managing the number itself would be just to
increment it each time \part is called. (Not every part has a figure.)

But I can't seem to get the number to come out when I place the figure.

Minimal example below (I have culled the actual \parts and just put in
two increments, but the effect is the same).

----
\definefloat[Partfigure][figure]\definenumber[TrackingPartfigurenumber]
\setuplabeltext[en][Partfigure=Figure ]
\setupnumber[Partfigure][number=TrackingPartfigurenumber,conversion=Romannumerals,way=bytext]
\setupcaption[Partfigure][style=\bf,numberstyle=\bf,headstyle=\it,align=middle,location=bottom]

\starttext
\incrementnumber[TrackingPartfigurenumber]
\incrementnumber[TrackingPartfigurenumber]
TrackingPartfigurenumber now equals
\rawnumber[TrackingPartfigurenumber], which will display as
\convertednumber[TrackingPartfigurenumber]. But it doesn't get used:
\placefloat[Partfigure][here][-:PMRWFII]{A cow}{\externalfigure[koe]}
Why not?
\stoptext
----

I tried also \increment[Partfigure] but this produces exactly the same
output.

I also tried using ownnumber=true in the Partfigure setup and then
feeding it the value {2} in the \placefloat call but that wouldn't compile.

Where did I go wrong? I'm sure there is an easy way to do this.

This one is a bit desperate, again, a very fussy author is waiting on
it, so...

Thanks all.

Duncan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-10-19 10:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.1.1161252001.22451.ntg-context@ntg.nl>
2006-10-19 10:46 ` Giving a float its own number Duncan Hothersall
2006-10-19  9:13 Duncan Hothersall

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).