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
|
%D \module
%D [ file=simpleslides-s-FramedTitle,
%D version=2009.03.30
%D title=\CONTEXT\ Style File,
%D subtitle=Presentation Module --- FramedTitle 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{FramedTitle} style for the presentation
%D module. It is loaded at runtime. The most interesting part is the scratch
%D counter at the bottom of the page, which is explained in the metafun manual.
\writestatus{simpleslides}{loading style FramedTitle}
\startmodule[simpleslides-s-FramedTitle]
\unprotect
%D The page layout:
\setuplayout [width=fit,
margin=0cm,
height=fit,
header=2.2cm,
footer=.8cm,
topspace=.6cm,
backspace=1cm,
location=singlesided]
\setuplayout [simpleslides:layout:horizontal][header=2.2cm]
\setuplayout [simpleslides:layout:vertical] [header=0.5cm]
\setuplayout [simpleslides:layout:title] [header=0.5cm]
%D We also specify the position of the slidetitle.
\setuplayer[simpleslides:layer:slidetitle]
[x=10mm,y=2mm]
%D These macros are used for placing figures/pictures:
\define\NormalHeight {\textheight}
\define\NormalWidth {.476\textwidth}
\define\PictureFrameHeight {\textheight}
\define\PictureFrameWidth {.476\textwidth}
\setupframed[simpleslides:framed]
[corner=round,
background=color,backgroundcolor={simpleslides:contrastcolor}]
%D We define our color scheme:
\definecolor [simpleslides:backgroundcolor] [s=.9]
\definecolor [simpleslides:variantcolor] [s=.7]
\definecolor [simpleslides:contrastcolor] [r=.5]
\definecolor [simpleslides:itemize:color] [simpleslides:contrastcolor]
%D We let Metapost calculate the background:
\startuniqueMPgraphic{simpleslides:MP:horizontal}
StartPage ;
fill Page withcolor \MPcolor{simpleslides:backgroundcolor} ;
StopPage ;
\stopuniqueMPgraphic
\startuseMPgraphic{simpleslides:MP:ornament}
StartPage ;
save a,b ;
numeric a,b ;
a = 7mm ;
b = PaperWidth/2 - NOfPages * 2.5pt ;
save p,q; path p,q ;
p =((0,5mm) -- (1mm,11mm)) shifted (b,0) ;
q =((-8mm,5mm) -- (0,11mm) ) shifted (b,0) ;
pickup pencircle scaled 3pt ;
for i := NOfPages-1 downto 1:
draw (if i mod 5 = 0 : q else : p fi)
shifted (i*5pt, 0pt)
withcolor if i < PageNumber : \MPcolor{simpleslides:contrastcolor}
else : \MPcolor{simpleslides:variantcolor}
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 We want the title to placed in a framed box. We redefine all the keys of
%D \type{\setupTitle}, so that the module is easier to maintain.
\setupTitle
[\c!title=,
\c!author=,
\c!date=\currentdate,
\c!headstyle=,
\c!headcolor={simpleslides:backgroundcolor},
\c!align=\v!middle,
\c!before={\vfill\getvalue{simpleslides:framed}
[\c!width=\textwidth,\c!height=.75\textheight,
\c!align=\v!middle, \c!strut=\v!no]
\bgroup},
\c!after={\egroup\vfill},
\c!title\c!style={\switchtobodyfont[\TitleSize]},
\c!title\c!color=,
\c!title\c!align=,%\v!middle,
\c!author\c!style=,
\c!author\c!color=,
\c!author\c!align=,%\v!middle,
\c!date\c!style=,
\c!date\c!color=,
\c!date\c!align=,%\v!middle,
\c!before\c!title=,
\c!before\c!author=,
\c!before\c!date=,
\c!after\c!title={\blank[1*line]},
\c!after\c!author={\blank[2*line]},
\c!after\c!date=]
%D We also want the slide title in a framed box.
\setupSlideTitle
[\c!after=,
\c!alternative=layer,
\c!height=2.1cm,
\c!width=\textwidth,
\c!color=simpleslides:backgroundcolor]
%D The symbol for the first level of itemizations.
\definesymbol[1][\useMPgraphic{simpleslides:itemize:square}]
\setupitemize[1][color=simpleslides:contrastcolor]
\protect
\stopmodule
\endinput
|