summaryrefslogtreecommitdiff
path: root/tex/context/modules/mkiv/s-present-lines.mkiv
blob: 3a2fdae53b0249c10da0bf897a37d05a47a58a36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
%D \module
%D   [      file=s-present-lines,
%D        version=1017.09.01,
%D          title=\CONTEXT\ Style File,
%D       subtitle=Presentation Environment Balls,
%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 This style was made for the \CONTEXT\ 2017 meeting. According to Alan Braslau we
%D should not display items that we discuss but for now I stick to it. As a
%D compromise this is a simple and effective style.

\startmodule[present-lines]

\definecolor[backcolor][s=.6]
\definecolor[pagecolor][s=.3]
\definecolor[dotscolor][s=.2]
\definecolor[maincolor][b=.6]

\definecolor[maincolor][r=.6]

\setuppapersize
  [S6]

\setuplayout
  [header=0pt,
   footer=0pt,
   topspace=20mm,
   backspace=20mm,
   width=middle,
   height=middle]

\setupbackgrounds
  [page]
  [background=page]

\defineoverlay
  [page]
  [\useMPgraphic{page}]

\setupitemgroup
% [color=dotscolor]
  [color=maincolor]

\definesymbol
  [1][{\symbol[\char"25A0]}]

\setupbodyfont
  [dejavu]

\startuseMPgraphic{page}
    StartPage ;
        numeric d ; d := 15pt ;
        fill Page
            enlarged 2d
            withcolor "pagecolor" ;
        fill Field[Text][Text]
            enlarged 2d
            withcolor "backcolor" ;
        draw leftboundary Field[Text][Text]
            bottomenlarged 3d
            topenlarged -(d/10)
            shifted (-d,0)
            withpen pensquare scaled (d/5)
            withcolor "maincolor" ;
        draw bottomboundary Field[Text][Text]
            leftenlarged 3d
            rightenlarged -(d/10)
            shifted (0,-d)
            withpen pensquare scaled (d/5)
            withcolor "maincolor" ;
        draw rightboundary Field[Text][Text]
            topenlarged 3d
            bottomenlarged -(d/10)
            shifted (d,0)
            withpen pensquare scaled (d/5)
            withcolor "maincolor" ;
        draw topboundary Field[Text][Text]
            rightenlarged 3d
            leftenlarged -(d/10)
            shifted (0,d)
            withpen pensquare scaled (d/5)
            withcolor "maincolor" ;
    StopPage ;
\stopuseMPgraphic

\setuphead
  [chapter,title]
  [placehead=empty,
   number=no,
   after={\blank[disable]},
   before=]

\setuptext
  [color=pagecolor,
   style=\bfd]

\setuptexttexts
  [\directsetup{text:texts}]

\startsetups text:texts
    \vbox to \textheight {
        \vfill
        \hfill
        \setstrut
        \strut
        \getmarking[chapter]
        \getmarking[title]
        \vskip-\strutdp
    }
\stopsetups

\startsetups document:start
    \startstandardmakeup
        \startparagraph
            % Per 01-02-2017 the Bold abstraction also makes sure that CurrentFont
            % works well which in turn makes MixedCaps and such working.
            \definedfont[Bold*default @ 42pt]
            \setupinterlinespace
            \startcolor[pagecolor]
                \begstrut
                    \documentvariable{title}
                \endstrut
            \stopcolor
        \stopparagraph
        \blank[2*line]
        \determinelistcharacteristics[chapter]
        \ifnum\listlength>10\relax
            \startcolumns
                \placelist[chapter][alternative=f]
            \stopcolumns
        \else
            \placelist[chapter][alternative=f]
        \fi
        \vfill
        \hfill
        \bfb
        \setstrut
        \strut
        \startcolor[pagecolor]
            \documentvariable{subtitle}
        \stopcolor
        \vskip-\strutdp
    \stopstandardmakeup
\stopsetups

\setupinteraction
  [state=start,
   color=maincolor,
   contrastcolor=maincolor,
   style=]

\setuptyping
  [color=maincolor]

\setuptype
  [color=maincolor]

\usemodule[abr-04]

\stopmodule

\continueifinputfile{s-present-lines.mkiv}

% \usemodule[present-common]

% \inputpresentationfile{examples/....} % todo, 2017 presentations