ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* how to reuse float numbers?
@ 2007-09-07  7:15 William S.
  2007-09-07 11:54 ` Wolfgang Schuster
  2007-09-07 16:17 ` William S.
  0 siblings, 2 replies; 7+ messages in thread
From: William S. @ 2007-09-07  7:15 UTC (permalink / raw)
  To: ntg-context

Hello,

I am wondering if the float numbers can be reused for floats that are longer
than a page. I use floats that contain program segments (source code) for
a project report for my university studies.

The guidelines specify that captions for code which is longer than one page
or crosses page boundaries should be reprinted and the title changed to
(continued).

example:

Program Segment 1.1: Hello World
  #include <stdio.h>
  main() {

...on next page...

Program Segment 1.1: (continued)
    printf("hello world!\n");
  }

Can someone help me do this in ConTeXt? I think I can do the splitting of
the code myself if needed, but I don't know how to reuse the float number.
Currently this is how I define the float:

\definetyping[Program][blank=halfline]
\definefloat[ProgramSegment][ProgramSegments]
\setupcaption[ProgramSegment][location=top,align=right,headstyle=bold,style=bold,inbetween={}]
\setuplabeltext[en][ProgramSegment=Program Segment ]

And I use it like this:
\placeProgramSegment[here]{Hello World}
{
\startProgram
main() {
  printf("hello world!\n");
}
\stopProgram
}

Any help will be appreciated.

Thanks,
William.
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2007-09-10  5:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-07  7:15 how to reuse float numbers? William S.
2007-09-07 11:54 ` Wolfgang Schuster
2007-09-07 12:44   ` William S.
2007-09-07 13:29     ` Wolfgang Schuster
2007-09-07 14:15       ` William S.
2007-09-07 16:17 ` William S.
2007-09-10  5:43   ` Wolfgang Schuster

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