From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/38696 Path: news.gmane.org!not-for-mail From: Carsten Fechtmann Newsgroups: gmane.comp.tex.context Subject: Re: place figures at the end of document Date: Sat, 19 Jan 2008 19:59:50 +0100 Message-ID: <1E95026F-5D2C-456B-97F3-96C48848AAF4@zarm-technik.de> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v915) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1200769290 17183 80.91.229.12 (19 Jan 2008 19:01:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 19 Jan 2008 19:01:30 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Jan 19 20:01:48 2008 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 1JGIwt-0008UJ-Uy for gctc-ntg-context-518@m.gmane.org; Sat, 19 Jan 2008 20:01:48 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3DDAB1FBCC; Sat, 19 Jan 2008 20:01:22 +0100 (CET) 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 07436-03-9; Sat, 19 Jan 2008 20:00:40 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 797E01FB8E; Sat, 19 Jan 2008 20:00:40 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 01C4C1FBA6 for ; Sat, 19 Jan 2008 20:00:37 +0100 (CET) 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 07436-03-8 for ; Sat, 19 Jan 2008 19:59:55 +0100 (CET) Original-Received: from www.zarm-technik.de (zarm5.zarm.uni-bremen.de [134.102.236.5]) by ronja.ntg.nl (Postfix) with ESMTP id F3E171FB74 for ; Sat, 19 Jan 2008 19:59:54 +0100 (CET) Original-Received: from localhost (unknown [127.0.0.1]) by www.zarm-technik.de (Postfix) with ESMTP id 152D43ACDD for ; Sat, 19 Jan 2008 19:00:14 +0000 (UTC) X-Virus-Scanned: amavisd-new 2.5.2 (20070627) at zarm-technik.de Original-Received: from www.zarm-technik.de ([127.0.0.1]) by localhost (www.zarm-technik.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8bKxdGCjUShJ for ; Sat, 19 Jan 2008 20:00:12 +0100 (CET) Original-Received: from [10.0.1.2] (pD955D10C.dip.t-dialin.net [217.85.209.12]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by www.zarm-technik.de (Postfix) with ESMTP id B5B86DF94 for ; Sat, 19 Jan 2008 20:00:11 +0100 (CET) In-Reply-To: X-Mailer: Apple Mail (2.915) 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:38696 Archived-At: Dear Peter, please be aware that I am still a ConTeXt newbie, therefore, I am not sure if this is really the way things "should" be done, only that it seems to work with up to a 999 figures (tested) and probably more ;-) Nonetheless, the following code probably does the trick you were looking for.... It has the further benefit that only those figures with the option [list] will go to the list and that you can do all the other tricks with this list of figures that you can do with any sort of list. Unfortunately you have to change all \placefigure to \PlaceFigure (or some other name of your choosing for this macro) Cheers Carsten %------ setting things up --------- \definesorting[Figure][Figures] \setupsorting[Figure][criterium=all] \newcounter\FigureCounter \def\PlaceFigure{\dodoubleempty\doPlaceFigure} \def\doPlaceFigure[#1][#2]#3#4{ \ifsecondargument \doifsamestringelse{#1}{list}{ \expanded{\Figure[\FigureCounter]{\noexpand\placefigure[#2]{#3} {{#4}} }} \increment\FigureCounter }{ \placefigure[#1][#2]{#3}{#4} } \else \placefigure[#2]{#3}{#4} \fi } %------ the actual "text" --------- \starttext \dorecurse{100}{ \PlaceFigure[here][fig:\recurselevel]{Blackbox in text at level \recurselevel}{\blackrule[width=6cm,height=4cm]} \input knuth\par \PlaceFigure[list][fig:\recurselevel]{Blackbox in list at level \recurselevel}{\blackrule[width=6cm,height=4cm]} } \page \placelistofFigures \stoptext On 18.01.2008 at 17:36 wrote Peter I. Hansen: > Hi, > > Is there a way in ConTeXt to place figures (and other floats) at the > very end of the document? > > More specifically I would like to keep on having to placefigure code > at the relevant place in the text where I would normally typeset with > the option [here], but sometimes readers want all figures moved to the > end of the document and it would be handy if this could be done by > changing a keyword. > > thanks, Peter > ___________________________________________________________________________________ > 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 > ___________________________________________________________________________________ ___________________________________________________________________________________ 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 ___________________________________________________________________________________