From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/36404 Path: news.gmane.org!not-for-mail From: "Wolfgang Schuster" Newsgroups: gmane.comp.tex.context Subject: Re: how to reuse float numbers? Date: Fri, 7 Sep 2007 13:54:52 +0200 Message-ID: <115224fb0709070454v7d2e77fcsf791fc1d83e64856@mail.gmail.com> References: <5c5e660c0709070015x1381dc41n77ea1e598b1522b6@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1189166361 4727 80.91.229.12 (7 Sep 2007 11:59:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 7 Sep 2007 11:59:21 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Fri Sep 07 13:59:21 2007 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1ITcUT-0006dD-GX for gctc-ntg-context-518@m.gmane.org; Fri, 07 Sep 2007 13:59:13 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4D88C201C7; Fri, 7 Sep 2007 13:59:11 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 28838-01-2; Fri, 7 Sep 2007 13:59:00 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C6F0C2011E; Fri, 7 Sep 2007 13:59:00 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id D394920118 for ; Fri, 7 Sep 2007 13:58:58 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 28381-03 for ; Fri, 7 Sep 2007 13:58:54 +0200 (CEST) Original-Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.229]) by ronja.ntg.nl (Postfix) with ESMTP id 960CD201BD for ; Fri, 7 Sep 2007 13:54:53 +0200 (CEST) Original-Received: by wx-out-0506.google.com with SMTP id i27so487968wxd for ; Fri, 07 Sep 2007 04:54:52 -0700 (PDT) Original-Received: by 10.90.96.7 with SMTP id t7mr3551655agb.1189166092255; Fri, 07 Sep 2007 04:54:52 -0700 (PDT) Original-Received: by 10.90.35.1 with HTTP; Fri, 7 Sep 2007 04:54:47 -0700 (PDT) In-Reply-To: <5c5e660c0709070015x1381dc41n77ea1e598b1522b6@mail.gmail.com> Content-Disposition: inline X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:36404 Archived-At: 2007/9/7, William S. : > 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 > 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. you can start with the following example from Hans. \definefloat[Exhibit][table] \starttext \input tufte\par \splitfloat[lines=auto]{\placeExhibit{Knuth}} {\dorecurse{4}{\input knuth \par}} \input tufte\page[yes] \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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________