* place figures at the end of document
@ 2008-01-18 16:36 Peter I. Hansen
2008-01-18 19:56 ` Wolfgang Schuster
2008-01-19 18:59 ` Carsten Fechtmann
0 siblings, 2 replies; 3+ messages in thread
From: Peter I. Hansen @ 2008-01-18 16:36 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: place figures at the end of document
2008-01-18 16:36 place figures at the end of document Peter I. Hansen
@ 2008-01-18 19:56 ` Wolfgang Schuster
2008-01-19 18:59 ` Carsten Fechtmann
1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Schuster @ 2008-01-18 19:56 UTC (permalink / raw)
To: ntg-context
On Fri, 18 Jan 2008 17:36:26 +0100
"Peter I. Hansen" <peterih@gmail.com> wrote:
> 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
Interesting but very hard topic, I found a solution but it did only
work for a few pictures.
\unprotect
\installfloathandler {save} \somesavefloat
\def\placesomesavefloat{\OTRcommand\somesavefloat}
%\def\somesavefloat[#1]{\dosavefloat}
\def\somesavefloat{\placesomesavefloat}
\def\somesavefloat[#1]%
{\global\setbox\floatlist\vbox
{\nointerlineskip
\unvbox\floatlist
\uncenteredfloatbox}}
%\def\OTRONEsomesavefloat[#1]{\savefloat}
\def\OTRONEsomesavefloat[#1]{\setbox\floatbox\vbox{\box\floatbox}}
\def\placesavedfloats{\box\floatlist}
%\def\placesavedfloats
% {\loop\ifdim\ht\floatlist>0pt
% \vsplit\floatlist to\lineheight
% \repeat}
\protect
\starttext
\dorecurse{4} % 5 and more did fail
{\input knuth\par
\expanded{\placefigure[save]{Figure \recurselevel}{\blackrule[width=6cm,height=4cm]}}}
\page
\placesavedfloats
\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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: place figures at the end of document
2008-01-18 16:36 place figures at the end of document Peter I. Hansen
2008-01-18 19:56 ` Wolfgang Schuster
@ 2008-01-19 18:59 ` Carsten Fechtmann
1 sibling, 0 replies; 3+ messages in thread
From: Carsten Fechtmann @ 2008-01-19 18:59 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-01-19 18:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-18 16:36 place figures at the end of document Peter I. Hansen
2008-01-18 19:56 ` Wolfgang Schuster
2008-01-19 18:59 ` Carsten Fechtmann
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).