s-present-slanted.mkiv /size: 4737 b    last modification: 2020-07-01 14:35
1%D \module
2%D   [      file=s-present-slanted, % was: s-pre-64,
3%D        version=2006.05.11,
4%D          title=\CONTEXT\ Style File,
5%D       subtitle=Presentation Environment Slanted,
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 This style is kept as reference (but can be usedof course). It was used at the
15%D TUG conference in San Diego in 2007 (the very early days if \LUATEX\ and \MKIV).
16%D
17%D This was one of he four presentations, each with a different style. The other
18%D styles were quite ok but I just lack time (ane motivation) to generalize them,
19
20\usemodule[s][pre-60]
21
22\newcounter\shapesynctag
23\newdimen  \slantedshapedimen
24\newdimen  \slantedshapestep
25\newdimen  \slantedshapeleftskip
26\newdimen  \slantedshapeoffset
27\newdimen  \slantedshapeextra
28\newdimen  \slantedshapedelta
29
30\positioningtrue
31
32\unexpanded\def\AdaptShape
33  {\doglobal\increment\shapesynctag
34   \getnoflines\textheight
35   \slantedshapestep\dimexpr\slantedshapeleftskip/\noflines\relax
36   \leftskip\slantedshapeleftskip
37   \scratchdimen\dimexpr
38     \MPy{text:\MPp\shapesynctag}
39    +\MPh{text:\MPp\shapesynctag}
40    -\topskip
41    -\MPy\shapesynctag
42    +\slantedshapeextra
43   \relax
44   \getnoflines\scratchdimen
45   \slantedshapedimen \noflines \slantedshapestep
46   \scratchtoks\emptytoks
47   \dorecurse{30}
48     {\appendetoks
49         \the\dimexpr
50           -\slantedshapedimen
51           +\slantedshapeoffset
52           +\slantedshapedelta
53         \relax
54         \space
55         \the\dimexpr
56           \hsize
57          -2\slantedshapeoffset
58         \relax
59         \space
60      \to\scratchtoks
61      \advance\slantedshapedimen \slantedshapestep}%
62   \parshape 30 \the\scratchtoks
63   \strut\xypos\shapesynctag}
64
65\setuppapersize[S6][S6]
66
67\setupinteraction
68  [state=start,
69   click=no]
70
71\setupinteractionscreen
72  [option=max]
73
74\setuplayout
75  [backspace=12pt,
76   topspace=24pt,
77   height=middle,
78   width=middle,
79   header=0pt,
80   footer=0pt]
81
82\definecolor[maincolor][b=.5]
83\definecolor[somecolor][g=.5]
84\definecolor[morecolor][r=.5]
85
86\setupcolors
87  [textcolor=maincolor]
88
89\setupbodyfont
90  [pagella]
91
92\setupbackgrounds
93  [text]% [text]
94  [background={base,text,invoke}]
95
96\definelayer
97  [text]
98  [width=\textwidth,
99   height=\textheight]
100
101\definelayer
102  [base]
103  [width=\textwidth,
104   height=\textheight]
105
106\definetype [epet] [style=,color=morecolor]
107\setuptype         [style=,color=somecolor]
108\slantedshapeleftskip150pt
109\slantedshapeoffset   12pt
110\slantedshapeextra    10pt
111
112\startreusableMPgraphic{page}
113    StartPage ;
114        fill Page withcolor \MPcolor{maincolor} ;
115        path p ; p := Field[Text][Text] enlarged 6pt ;
116        p :=
117            llcorner p shifted (0,-12pt) --
118            lrcorner p shifted (-150pt,0) --
119            urcorner p shifted (0,12pt) --
120            ulcorner p shifted (150pt,0) --
121            cycle ;
122        fill p
123            withcolor .9white ;
124    StopPage ;
125\stopreusableMPgraphic
126
127\defineoverlay
128  [page]
129  [\reuseMPgraphic{page}]
130
131\setupbackgrounds
132  [page]
133  [background=page]
134
135\setupalign
136  [flushleft]
137
138\unexpanded\def\StartItem
139  {\blank[line]
140   \begingroup
141   \EveryPar {\AdaptShape}} % beware: \ABBREV aan begin gaat fout
142
143\unexpanded\def\StopItem
144  {\endgraf
145   \endgroup
146   \blank[line]}
147
148\unexpanded\def\StartType
149  {\blank[halfline]
150   \begingroup
151   \EveryPar {\AdaptShape}
152   \dontleavehmode \quad}
153
154\unexpanded\def\StopType
155  {\endgraf
156   \endgroup
157   \blank[halfline]}
158
159\unexpanded\def\StartTopic#1%
160  {\page
161   \setlayer
162     [text]
163     [preset=lefttop,
164      rotation=90]
165     {\color[white]{\scale[height=24pt]{\strut#1}}}}
166
167\unexpanded\def\StopTopic
168  {\page}
169
170\startsetups document:start
171    \ifdefined\TitleFont \else
172        \definedfont[TitleFont][Bold*default sa 4]
173    \fi
174    \ifdefined\MainTextFont
175        \MainTextFont
176    \fi
177    \Banner{\documentvariable{location}}
178    \StartTopic{\documentvariable{author}}
179    \startstandardmakeup
180        \TitleFont
181        \setupinterlinespace[line=3ex]
182        \vfill
183        \def\docommand##1{\StartItem\dontleavehmode\quad{\morecolor##1}\StopItem}
184        \processcommacommand[\documentvariable{title}]\docommand
185        \vfill
186    \stopstandardmakeup
187    \StopTopic
188\stopsetups
189
190\startsetups document:stop
191\stopsetups
192
193\unexpanded\def\Banner#1%
194  {\setuplayer
195     [base]
196     [state=repeat]
197   \setlayer
198     [base]
199     [preset=rightbottom]
200     {\color[white]{\scale[height=9pt]{\strut#1}}}}
201
202\continueifinputfile{s-present-slanted.mkiv}
203
204\usemodule[present-common]
205
206\inputpresentationfile{tug/2007/tug-2007-fonts.tex}
207