%D \module
%D   [      file=s-pre-50,
%D        version=2003.01.26,
%D          title=\CONTEXT\ Style File,
%D       subtitle=Presentation Environment 50,
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

%D When my mailbox started to overflow with messages about
%D problems with the presentation step mechanism, I looked up
%D old presentaton, hacked a bit and cooked up an alternative
%D that is less dependent on \PDF\ trickery.
%D
%D Consider it a cheap trick and prelude to a couple of new
%D presentation styles. (At the time of writing this, I
%D still have some 10 of those styles to clean up and
%D document.) You can give it a try:
%D
%D \starttyping
%D texexec --pdf --mode=demo s-pre-50
%D \stoptyping

% Basic definitions.

\defineframedtext
  [horizontal]
  [width=\textwidth,
   frame=off,
   strut=no,
   height=fit,
   align={right,lohi},
   before=,
   after=]

\definecollector
  [contribution]
  [state=repeat,
   corner={left,bottom},
   location={right,bottom}]

%D An example of tuning:

\startmode[demo]

  \setupcollector
    [contribution]
    [voffset=-.25\bodyfontsize]

  \setupframedtexts
    [horizontal]
    [background=color,
     backgroundcolor=darkgray,
     foregroundcolor=white]

\stopmode

%D Structure and trick.

\def\StartSteps
  {\doifnotmode{mkiv}{\checkutilities}}

\def\StopSteps
  {\resetcollector[contribution]}

\long\def\StartStep#1\StopStep
  {\setcollector
     [contribution]
     {\starthorizontal[none]#1\stophorizontal}
   \flushcollector[contribution]
   \page}

%D Trick. Nowadays we can use streams.

\installoutputroutine\FlushStep
  {\StartStep\unvbox\normalpagebox\StopStep}

%D Demo.

\doifnotmode{demo}{\endinput}

\setupcolors[state=start] \setuppapersize[S6][S6] \setuplayout[middle]

\starttext

\StartSteps

  \title[whow]{How Much?} \FlushStep
  \startitem More              \stopitem \FlushStep
  \startitem And More          \stopitem \FlushStep
  \startitem And Even More     \stopitem \FlushStep

  \StartStep And So On    \StopStep

\StopSteps

\stoptext
