s-pre-50.tex /size: 2243 b    last modification: 2020-07-01 14:35
1
%D \module
2
%D [ file=s-pre-50,
3
%D version=2003.01.26,
4
%D title=\CONTEXT\ Style File,
5
%D subtitle=Presentation Environment 50,
6
%D author=Hans Hagen,
7
%D date=\currentdate,
8
%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
9
%C
10
%C This module is part of the \CONTEXT\ macro||package and is
11
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
12
%C details.
13 14
%D When my mailbox started to overflow with messages about
15
%D problems with the presentation step mechanism, I looked up
16
%D old presentaton, hacked a bit and cooked up an alternative
17
%D that is less dependent on \PDF\ trickery.
18
%D
19
%D Consider it a cheap trick and prelude to a couple of new
20
%D presentation styles. (At the time of writing this, I
21
%D still have some 10 of those styles to clean up and
22
%D document.) You can give it a try:
23
%D
24
%D \starttyping
25
%D texexec --pdf --mode=demo s-pre-50
26
%D \stoptyping
27 28
% Basic definitions.
29 30
\defineframedtext
31
[
horizontal
]
32
[
width
=
\textwidth
,
33
frame
=
off
,
34
strut
=
no
,
35
height
=
fit
,
36
align
=
{
right
,
lohi
}
,
37
before
=
,
38
after
=]
39 40
\definecollector
41
[
contribution
]
42
[
state
=
repeat
,
43
corner
=
{
left
,
bottom
}
,
44
location
=
{
right
,
bottom
}
]
45 46
%D An example of tuning:
47 48
\startmode
[
demo
]
49 50
\setupcollector
51
[
contribution
]
52
[
voffset
=
-
.
2
5
\bodyfontsize
]
53 54
\setupframedtexts
55
[
horizontal
]
56
[
background
=
color
,
57
backgroundcolor
=
darkgray
,
58
foregroundcolor
=
white
]
59 60
\stopmode
61 62
%D Structure and trick.
63 64
\def
\StartSteps
65
{
\doifnotmode
{
mkiv
}{
\checkutilities
}}
66 67
\def
\StopSteps
68
{
\resetcollector
[
contribution
]
}
69 70
\long\def
\StartStep
#
1
\StopStep
71
{
\setcollector
72
[
contribution
]
73
{
\starthorizontal
[
none
]#
1
\stophorizontal
}
74
\flushcollector
[
contribution
]
75
\page
}
76 77
%D Trick. Nowadays we can use streams.
78 79
\installoutputroutine
\FlushStep
80
{
\StartStep
\unvbox
\normalpagebox
\StopStep
}
81 82
%D Demo.
83 84
\doifnotmode
{
demo
}{
\endinput
}
85 86
\setupcolors
[
state
=
start
]
\setuppapersize
[
S
6
][
S
6
]
\setuplayout
[
middle
]
87 88
\starttext
89 90
\StartSteps
91 92
\title
[
whow
]
{
How
Much
?
}
\FlushStep
93
\startitem
More
\stopitem
\FlushStep
94
\startitem
And
More
\stopitem
\FlushStep
95
\startitem
And
Even
More
\stopitem
\FlushStep
96 97
\StartStep
And
So
On
\StopStep
98 99
\StopSteps
100 101
\stoptext
102