summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/modules/mkiv/s-present-ovals.mkiv
blob: 45af6c823c9fb2f7480e3023aa3c81672e96c90f (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
%D \module
%D   [      file=s-present-ovals,
%D        version=2015.04.20,
%D          title=\CONTEXT\ Style File,
%D       subtitle=Presentation Environment Ovals,
%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 some of the font and language related presentations at
%D Bacho\TeX\ 2015. It's a bit boring but it suits simple presentations. It provides
%D no structure as each page content is kind of special.

\startmodule[s-present-ovals]

\setuppapersize[S6]

\definecolor[maincolor] [darkred]
\definecolor[othercolor][maincolor]

\startuseMPgraphic{page}

    fill Page enlarged 2mm withcolor .5[white,\MPcolor{othercolor}] ;

    if NOfPages > 1 :

        numeric PageFraction ; PageFraction := (RealPageNumber-1) / (NOfPages-1) ;
        numeric WidthDelta   ; WidthDelta   := 2 * PaperWidth  / 10 ;
        numeric HeightDelta  ; HeightDelta  := 2 * PaperHeight / 10 ;
        numeric WidthOffset  ; WidthOffset  := WidthDelta  + PageFraction*(PaperWidth  - 2WidthDelta ) ;
        numeric HeightOffset ; HeightOffset := HeightDelta + PageFraction*(PaperHeight - 2HeightDelta) ;

        fill
            (ulcorner Page) shifted (WidthOffset,0)   ..
            (urcorner Page) shifted (0,-HeightOffset) ..
            (lrcorner Page) shifted (-WidthOffset,0)  ..
            (llcorner Page) shifted (0,HeightOffset)  ..
            cycle withcolor \MPcolor{maincolor} ;

        clip currentpicture to Page ;

    fi ;

\stopuseMPgraphic

% e-mess has always been okay by definition which makes it easier to blame generators

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

\setupbackgrounds
  [page]
  [background=page]

\setupalign
  [middle,broad]

\setupcolors
  [textcolor=white]

\setupbodyfont
  [pagella,17.3pt]

\setuplayout
  [height=middle,
   width=middle,
   topspace=.05\paperheight,
   backspace=.15\paperwidth,
   header=0pt,
   footer=0pt]

\setupwhitespace
  [line]

\setuphead
  [title]
  [style=\bfb,
   alternative=middle,
   before=,
   number=no]

\stopmodule

\continueifinputfile{s-present-ovals.mkiv}

\usemodule[present-common]

\inputpresentationfile{bachotex/2015/bachotex-2015-ligatures.tex}
%inputpresentationfile{bachotex/2015/context-2015-status.tex}