diff options
author | Hans Hagen <pragma@wxs.nl> | 2001-08-28 00:00:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2001-08-28 00:00:00 +0200 |
commit | 398264e8338d79fc389c76f0a1f0b30e4442f4e3 (patch) | |
tree | 01f154356243a9c3330689cd5b25a6d48e15ec6e /tex/context/base/s-pre-03.tex | |
parent | 60cc55d63b06031c0c852888fddeaff74a209011 (diff) | |
download | context-398264e8338d79fc389c76f0a1f0b30e4442f4e3.tar.gz |
stable 2001.08.28
Diffstat (limited to 'tex/context/base/s-pre-03.tex')
-rw-r--r-- | tex/context/base/s-pre-03.tex | 179 |
1 files changed, 108 insertions, 71 deletions
diff --git a/tex/context/base/s-pre-03.tex b/tex/context/base/s-pre-03.tex index 6eae357cb..440c1b931 100644 --- a/tex/context/base/s-pre-03.tex +++ b/tex/context/base/s-pre-03.tex @@ -17,7 +17,7 @@ %D use the same style three times. Therefore this is a rather %D simple, silly style. -\usemodule[pre-general] % mode=step +\usemodule[pre-general] %D \macros %D {setupbodyfont} @@ -26,14 +26,15 @@ %D background, this does not leave that much room for text, but %D presentations should use much text anyway. -\setupbodyfont - [lbr,14.4pt] +\startmode[asintended] \setupbodyfont[lbr] \stopmode + +\setupbodyfont[14.4pt] %D \macros %D {setuppapersize,setuplayout,setupinteractionscreen} %D -%D The page dimensions are set to size \type {S6}, being -%D 600pt by 450pt. We use wide margins and discard headers +%D The page dimensions are set to size \type {S6}, being +%D 600pt by 450pt. We use wide margins and discard headers %D and footers. We also launch the document full screen. \setuppapersize @@ -50,102 +51,132 @@ \setupinteractionscreen [option=max] -%D \macros +%D \macros %D {setupcolors,definecolor} %D -%D Next, color support is turned on and a dark red color is -%D defined. Other red shades will be derived from this one -%D color. +%D Next, color support is turned on and a dark red color is +%D defined. Other red shades will be derived from this one +%D color. \setupcolors [state=start] -\definecolor - [DarkRed][r=.5] +\definecolor [PageColor] [black] +\definecolor [BackgroundColor] [s=.85] +\definecolor [OrnamentColor] [r=.75] -%D \macros +%D \macros %D {setupinteraction} %D -%D We turn on interaction mode and use the same color for -%D hyperlinks and redundant hyperlinks (the ones that point -%D to the current page). +%D We turn on interaction mode and use the same color for +%D hyperlinks and redundant hyperlinks (the ones that point +%D to the current page). \setupinteraction [state=start, - contrastcolor=DarkRed, - color=DarkRed] + contrastcolor=OrnamentColor, + color=OrnamentColor] -%D \macros +%D \macros %D {defineoverlay, setupbackgrounds} %D -%D The joke in this presentation is the elliptical shape of -%D which the bottom part includes a page indication. +%D The joke in this presentation is the elliptical shape of +%D which the bottom part includes a page indication. \defineoverlay [PageShape][\useMPgraphic{PageShape}] +% \startuseMPgraphic{PageShape} +% lin := 20pt ; off := .75lin ; +% wid := \overlaywidth ; hei := \overlayheight ; +% pos := \currentpage ; tot := \lastpage ; +% path bb; bb := unitsquare xscaled wid yscaled hei ; +% filldraw bb withcolor \MPcolor{PageColor} ; +% pickup pencircle xscaled .5lin yscaled lin rotated 45 ; +% pair r, t, l, b ; +% r := (wid-off,.5hei) ; t := (.5wid,hei-off) ; +% l := (off,.5hei) ; b := (.5wid,off) ; +% path p; p := superellipse(r,t,l,b,.8) ; +% fill p withcolor \MPcolor{Backgroundcolor} ; +% draw p withcolor \MPcolor{OrnamentColor} ; +% color contrastcolor ; contrastcolor = 2/3 * \MPcolor{OrnamentColor} ; +% if (pos>0) and (tot>0): +% pair pa ; pa := point 5 of p ; +% pair pb ; pb := point 7 of p ; +% draw pa withcolor contrastcolor ; +% draw pb withcolor contrastcolor ; +% len := 2/tot ; +% pair pa ; pa := point (5+len*pos) of p ; +% pair pb ; pb := point (5+len*(pos-1)) of p ; +% p := p cutafter pa ; +% p := p cutbefore pb ; +% draw p withcolor contrastcolor ; +% fi ; +% setbounds currentpicture to bb ; +% \stopuseMPgraphic + \startuseMPgraphic{PageShape} - input mp-tool ; - color fillcolor ; fillcolor := .85white ; - color drawcolor ; drawcolor := .75red ; - color backcolor ; backcolor := black ; - color pagecolor ; pagecolor := .50red ; - lin := 20pt ; off := .75lin ; - wid := \overlaywidth ; hei := \overlayheight ; - pos := \currentpage ; tot := \lastpage ; - path bb; bb := unitsquare xscaled wid yscaled hei ; - filldraw bb withcolor backcolor ; - pickup pencircle xscaled .5lin yscaled lin rotated 45 ; - pair r, t, l, b ; - r := (wid-off,.5hei) ; t := (.5wid,hei-off) ; - l := (off,.5hei) ; b := (.5wid,off) ; - path p; p := superellipse(r,t,l,b,.8) ; - fill p withcolor fillcolor ; - draw p withcolor drawcolor ; - if (pos>0) and (tot>0): - pair pa ; pa := point 5 of p ; - pair pb ; pb := point 7 of p ; - draw pa withcolor pagecolor ; - draw pb withcolor pagecolor ; - len := 2/tot ; - pair pa ; pa := point (5+len*pos) of p ; - pair pb ; pb := point (5+len*(pos-1)) of p ; - p := p cutafter pa ; - p := p cutbefore pb ; - draw p withcolor pagecolor; - fi ; - setbounds currentpicture to bb ; + StartPage ; + path p ; pair pa, pb ; numeric len ; color contrastcolor ; + fill Page withcolor \MPcolor {PageColor} ; + pickup pencircle rotated 45 xscaled 10pt yscaled 20pt ; + p := Page enlarged (-10pt,-15pt) superellipsed .8 ; + p := p shifted (-1.5pt,0) ; % looks better + fill p withcolor \MPcolor{BackgroundColor} ; + draw p withcolor \MPcolor{OrnamentColor} ; + contrastcolor = 2/3 * \MPcolor{OrnamentColor} ; + if (PageNumber>0) and (NOfPages>0): + draw point 5 of p withcolor contrastcolor ; + draw point 7 of p withcolor contrastcolor ; + len := 2/NOfPages ; + pa := point (5+len*PageNumber) of p ; + pb := point (5+len*(PageNumber-1)) of p ; + draw (p cutafter pa) cutbefore pb + withcolor contrastcolor ; + fi ; + StopPage ; \stopuseMPgraphic -%D We use the viewer provided feature to go to the previous or +%D We use the viewer provided feature to go to the previous or %D next page. \defineoverlay[PrevButton][\overlaybutton{PreviousPage}] \defineoverlay[NextButton][\overlaybutton{NextPage}] \setupbackgrounds - [page][background={PageShape,PrevButton}] + [page] + [background={PageShape,PrevButton}] \setupbackgrounds - [text][text][background=NextButton] - -% \setupbackgrounds -% [state=repeat] + [text][text] + [background=NextButton] + +% or using hard coded next/prev pages: +% +% \defineoverlay[PrevButton][\overlaybutton{previouspage}] +% \defineoverlay[NextButton][\overlaybutton{nextpage}] +% +% \setupbackgrounds[state=repeat] +% \setupbackground[text][text][background=NextButton] +% +% or simply (using an repeated layer): +% +% \setupbackground[text][background=NextButton] -%D \macros +%D \macros %D {definehead, setuphead} -%D -%D Like the other presentation styles, we use \type {\Topic} -%D instead of \type {\chapters}. This time we don't provide -%D an additional sectioning. So we have: -%D -%D \starttypen +%D +%D Like the other presentation styles, we use \type {\Topic} +%D instead of \type {\chapters}. This time we don't provide +%D an additional sectioning. So we have: +%D +%D \starttypen %D \TitlePage{How nice} -%D +%D %D \Topics{This is about ...} -%D +%D %D \Topic{The first one} -%D +%D %D \Topic{Another one} %D \stoptypen @@ -167,19 +198,25 @@ before=, after=] -%D The tables of contents is associated with \type -%D {\Topics}. +\def\Subject + {\Topic} + +%D The tables of contents is associated with \type +%D {\Topics}. \def\Topics#1% {\Nopic[Topics]{#1} \placelist[Topic][criterium=all]} -%D Instead of \type {\TitlePage}, one can use the pair +\def\Subjects + {} + +%D Instead of \type {\TitlePage}, one can use the pair %D \type {\StartTitlePage} -- \type {\StopTitlePage}: %D -%D \starttypen +%D \starttypen %D \StartTitlePage -%D A Self Made Title +%D A Self Made Title %D \StopTitlePage %D \stoptypen |