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
___________________________________________________________________________________

Reply via email to