summaryrefslogtreecommitdiff
path: root/tex/context/base/s-pre-66.tex
blob: 916a7de66b66ab8af5630afc974e911aed47a789 (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
%D \module
%D   [      file=s-pre-66,
%D        version=2009.02.24,
%D          title=\CONTEXT\ Style File,
%D       subtitle=Presentation Environment 66,
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright=Hans Hagen]
%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 Cambria (made in the aftermath of testing \OPENTYPE\ math).

% \enablemode[paper]

\usemodule[pre-60]
\usemodule[abr-01]

\definepapersize
  [wide]
  [width=960pt,
   height=600pt]

\setuppapersize
  [wide]
  [wide]

\setuplayout
  [topspace=20pt,
   bottomspace=20pt,
   header=0pt,
   footer=0pt,
   backspace=20pt,
   height=middle,
   rightmargin=0pt,
   rightedge=\dimexpr220pt-40pt\relax,
   rightedgedistance=40pt,
   leftedge=0pt,
   leftmargin=0pt,
   cutspace=220pt,
   width=\dimexpr960pt-40pt-220pt\relax]

\definebodyfontenvironment
  [20pt]

\definefontfeature[default][default][mode=node,script=latn]

\usetypescript
  [cambria]

\setupbodyfont
  [cambria,20pt] \bf

\setupwhitespace
  [big]

\setupcolors
  [state=start]

\definecolor[pagecolor][s=.25]
\definecolor[edgecolor][b=.50,g=.75,r=.75]

\setupinteraction
  [state=start,
   click=no,
   color=,
   contrastcolor=]

\defineoverlay[pagegraphic][\reuseMPgraphic{pagegraphic}]

\startuseMPgraphic{pagegraphic}
    StartPage ;
        fill Page enlarged 10pt withcolor \MPcolor{pagecolor} ;
        fill Page enlarged 10pt leftenlarged (CutSpace - bbwidth(Page) - 10pt) withcolor \MPcolor{edgecolor} ;
    %   fill Field[Text][RightEdge] withcolor green ;
    %   fill Field[Text][Text] withcolor yellow ;
    StopPage ;
\stopuseMPgraphic

\setupbackgrounds
  [page]
  [background=pagegraphic]

\setupbackgrounds
  [text]
  [rightedge]
  [background=edge]

\definelayer
  [edge]
  [width=\rightedgewidth,
   state=repeat]

\setuphead
  [chapter]
  [style=\bfc,
   color=edgecolor]

\setupcolors
  [textcolor=edgecolor]

\newcounter\MyCounter

\def\StartRemark#1%
  {\doglobal\increment\MyCounter % hm, we could use the autoref (todo in cont-xp)
   \title[topic:\MyCounter]{#1}
   \setlayer[edge][preset=middletop,y=\thelayerheight{edge}]{\strut\color[pagecolor]{\bf\goto{#1}[topic:\MyCounter]}}
   \StartSteps}

\def\StopRemark
  {\StopSteps
   \page}

\def\StartRemark#1%
  {\doglobal\increment\MyCounter % hm, we could use the autoref (todo in cont-xp)
   \title[topic:\MyCounter]{#1}
   \StartSteps
   \def\StopRemark
     {\StopSteps
      \page
      \setlayer[edge][preset=middletop,y=\thelayerheight{edge}]{\strut\color[pagecolor]{\bf\goto{#1}[topic:\MyCounter]}}}}

\def\StartTitlePage
  {\startstandardmakeup[top=\vss,bottom=\vss\vss]
   \definedfont[Bold sa 4]
   \raggedcenter
   \setupinterlinespace
   \baselineskip=1\baselineskip plus 1fil minus 1fil\relax}

\def\StopTitlePage
  {\stopstandardmakeup}