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 173
|
%D \module
%D [ file=simpleslides-s-Boxed,
%D version=2009.03.30
%D title=\CONTEXT\ Style File,
%D subtitle=Presentation Module --- Boxed Style,
%D author=Aditya Mahajan and Thomas A. Schmitz,
%D date=\currentdate,
%D copyright={Aditya Mahajan and Thomas A. Schmitz}]
%C
%C Copyright 2007 Aditya Mahajan and Thomas A. Schmitz
%C This file may be distributed under the GNU General Public License v. 2.0.
%D This file provides the \quotation{Boxed} style for the presentation
%D module. It is loaded at runtime. The look of this style was inspired by the
%D screen version of the Metafun manual.
\writestatus{simpleslides}{loading style Boxed}
\startmodule[simpleslides-s-Boxed]
\unprotect
%D The page layout:
\setuplayout [width=fit,
margin=2cm,
height=fit,
leftmargindistance=1cm,
rightmargindistance=0cm,
header=2.8cm,
footer=1cm,
topspace=.7cm,
backspace=2cm,
location=singlesided]
\setuplayout [simpleslides:layout:horizontal][header=2.8cm]
\setuplayout [simpleslides:layout:vertical] [header=1.4cm]
\setuplayout [simpleslides:layout:title] [header=1.4cm]
%D We also specify the position of the slidetitle.
\setuplayer[simpleslides:layer:slidetitle]
[x=20mm,
y=15mm]
%D These macros are used for placing figures/pictures:
\define\NormalHeight {\textheight}
\define\NormalWidth {.476\textwidth}
\define\PictureFrameHeight {\textheight}
\define\PictureFrameWidth {.476\textwidth}
%D We define our colorscheme:
\definecolor [simpleslides:backgroundcolor] [s=.75]
\definecolor [simpleslides:altbackgroundcolor] [s=.2]
\definecolor [simpleslides:contrastcolor] [r=.55, g=0, b=.04]
\definecolor [simpleslides:variantcolor] [yellow]
\definecolor [simpleslides:itemize:color] [simpleslides:contrastcolor]
%D We let Metapost calculate the background:
\startuniqueMPgraphic{simpleslides:MP:horizontal}
StartPage ;
save p; path p[] ;
save a ; numeric a ;
a := 1.5cm ;
fill Page withcolor \MPcolor{simpleslides:backgroundcolor} ;
z1 = ulcorner Page shifted (a,0) ; z2 = urcorner Page shifted (-a,0) ;
z3 = urcorner Page shifted (0,-a); z4 = lrcorner Page shifted (0,a) ;
z5 = (x2,0) ; z6 = (x1,0) ;
z7 = (0,y4) ; z8 = (0,y3) ;
z9 = (x1,y3) ; z10 = (x2,y3) ;
z11 = (x2,y4) ; z12 = (x1,y4) ;
p[1] = z9 -- z12 -- z7 -- z8 -- cycle ;
p[2] = z10 -- z3 -- z4 -- z11 -- cycle ;
p[3] = z12 -- z11 -- z5 -- z6 -- cycle ;
p[4] = z9 -- z10 -- z2 -- z1 -- cycle ;
fill p[1] withcolor \MPcolor{simpleslides:altbackgroundcolor} ;
fill p[2] withcolor \MPcolor{simpleslides:altbackgroundcolor} ;
fill p[3] withcolor \MPcolor{simpleslides:altbackgroundcolor} ;
fill p[4] withcolor \MPcolor{simpleslides:altbackgroundcolor} ;
pickup pencircle scaled 8 pt ;
draw z1 -- z6 withcolor \MPcolor{simpleslides:contrastcolor} ;
draw z2 -- z5 withcolor \MPcolor{simpleslides:contrastcolor} ;
draw z7 -- z4 withcolor \MPcolor{simpleslides:contrastcolor} ;
draw z8 -- z3 withcolor \MPcolor{simpleslides:contrastcolor} ;
StopPage ;
\stopuniqueMPgraphic
\startuseMPgraphic{simpleslides:MP:ornament}
StartPage
save a; numeric a;
a := 1.5cm ;
save factor, allpages, shift ;
numeric factor, allpages, shift ;
factor :=(NOfPages div 18) + 1 ;
allpages := if NOfPages <= 18 : NOfPages elseif odd NOfPages : NOfPages + 1
else : NOfPages fi ;
shift := factor * (PaperWidth -2a)/allpages ;
save p ;path p ;
p := fullcircle scaled 4mm shifted (a + shift/2, a/2) ;
for i = 1 upto allpages/factor :
fill p shifted ( (i-1)*shift, 0)
if i - 1 = floor ((PageNumber - 1)/factor) :
withcolor \MPcolor{simpleslides:variantcolor} ;
else :
withcolor \MPcolor{simpleslides:backgroundcolor} ;
fi ;
endfor ;
StopPage
\stopuseMPgraphic
%D We define these backgrounds as overlays:
\defineoverlay
[simpleslides:background:horizontal]
[\useMPgraphic{simpleslides:MP:horizontal}]
\defineoverlay
[simpleslides:background:vertical]
[\useMPgraphic{simpleslides:MP:horizontal}]
\defineoverlay
[simpleslides:background:title]
[\useMPgraphic{simpleslides:MP:horizontal}]
\defineoverlay
[simpleslides:background:ornament]
[\useMPgraphic{simpleslides:MP:ornament}]
%D The title page:
\setupTitle
[\c!headcolor={simpleslides:contrastcolor}]
%D The slide title is typeset in a layer
\setupSlideTitle
[\c!color={simpleslides:contrastcolor},
\c!alternative=layer,
\c!align=\v!center,
\c!width=\textwidth,
\c!height=2.3cm,
\c!after=]
%D The symbol for the first level of itemizations.
\definesymbol[1][\useMPgraphic{simpleslides:itemize:square}]
\setupitemize[1][inmargin][color={simpleslides:itemize:color}]
\protect
\stopmodule
\endinput
|