diff options
Diffstat (limited to 'tex/context/base/s-pre-09.tex')
-rw-r--r-- | tex/context/base/s-pre-09.tex | 228 |
1 files changed, 114 insertions, 114 deletions
diff --git a/tex/context/base/s-pre-09.tex b/tex/context/base/s-pre-09.tex index 78e26ca95..cba452973 100644 --- a/tex/context/base/s-pre-09.tex +++ b/tex/context/base/s-pre-09.tex @@ -11,21 +11,21 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -%D I made this style when I had to give a presentation on -%D the \MAPS\ bibliography production for several user group -%D meetings. This style is rather tuned for combinations of -%D examples and explanations. The colors match the \MAPS\ -%D bibliography colors. +%D I made this style when I had to give a presentation on +%D the \MAPS\ bibliography production for several user group +%D meetings. This style is rather tuned for combinations of +%D examples and explanations. The colors match the \MAPS\ +%D bibliography colors. \startmode[asintended] \setupbodyfont[lbr] \stopmode \setupbodyfont[14.4pt] -%D A couple of years later, in 2001 this style was documented -%D and made public. While documenting, I also changed box -%D building on top of overlays into the now available layer -%D positioning. So, this styles demonstrates quite some -%D tricks. +%D A couple of years later, in 2001 this style was documented +%D and made public. While documenting, I also changed box +%D building on top of overlays into the now available layer +%D positioning. So, this styles demonstrates quite some +%D tricks. \setuppapersize [S6][S6] @@ -40,41 +40,41 @@ %D Local environments can be set by using the setups commands. %D For downward compatibility, we keep supporting the \type -%D {\...Settings} hooks. Using local environments is seldom -%D needed. +%D {\...Settings} hooks. Using local environments is seldom +%D needed. \let\TextSettings \empty \let\SampleSettings\empty -\startsetups text \TextSettings \stopsetups -\startsetups sample \SampleSettings \stopsetups +\startsetups [text] \TextSettings \stopsetups +\startsetups [sample] \SampleSettings \stopsetups -%D The dimensions are kind of fixed. +%D The dimensions are kind of fixed. \def\FrameWidth {448pt} \def\FrameHeight {348pt} \def\FrameOffset {24pt} \def\FrameSkip {12pt} -%D But they {\em can} and {\em will} be changed. +%D But they {\em can} and {\em will} be changed. \def\FrameWidth {408pt} \def\FrameHeight {318pt} -%D The funny values come from the $3:4$ display aspect +%D The funny values come from the $3:4$ display aspect %D ratio. \setupcolors [state=start] -\definecolor[PageColor] [s=.40] -\definecolor[TextColor] [s=.90] -\definecolor[InteractionColor][r=.40] -\definecolor[LineColor] [r=.60,g=.60] +\definecolor[PageColor] [s=.40] +\definecolor[TextColor] [s=.90] +\definecolor[InteractionColor][r=.40] +\definecolor[LineColor] [r=.60,g=.60] -%D Of course we go interactive and since we will probably -%D open other documents, we make sure that the viewer opens a -%D new window. +%D Of course we go interactive and since we will probably +%D open other documents, we make sure that the viewer opens a +%D new window. \setupinteraction [color=InteractionColor, @@ -85,31 +85,31 @@ \setupinteractionscreen [option=max] -%D Before we come to the real macros, we do a little bit of -%D tuning. +%D Before we come to the real macros, we do a little bit of +%D tuning. \setupitemize - [1][packed] + [1][packed] \setuptyping [blank=medium] -%D Apart from the titlepage, the page gets a simple colored -%D background. Later we will activate the background. +%D Apart from the titlepage, the page gets a simple colored +%D background. Later we will activate the background. \setupbackgrounds [page] [backgroundcolor=PageColor] -%D Everything gets frames by a nice \METAPOST\ frame. +%D Everything gets frames by a nice \METAPOST\ frame. \defineoverlay [background] [\uniqueMPgraphic{background}] \startuniqueMPgraphic{background} - path p ; color c, w, d ; - c := \MPcolor{PageColor} ; - w := \MPcolor{TextColor} ; - d := \MPcolor{LineColor} ; + path p ; color c, w, d ; + c := \MPcolor{PageColor} ; + w := \MPcolor{TextColor} ; + d := \MPcolor{LineColor} ; p := unitsquare xscaled OverlayWidth yscaled OverlayHeight ; pickup pencircle scaled (1.5*\FrameSkip) ; draw p withcolor c ; @@ -118,17 +118,17 @@ draw p withcolor d ; \stopuniqueMPgraphic -%D We will present samples and explanation pair||wise, so -%D we need a hyperlink that skips a page. +%D We will present samples and explanation pair||wise, so +%D we need a hyperlink that skips a page. \defineoverlay [nextpage] [\overlaybutton{nextpage}] \defineoverlay [previouspage] [\overlaybutton{previouspage}] \defineoverlay [skippage] [\overlaybutton{page(+2)}] -%D Layers are normally used to position multiple content on -%D a specific overlay. Here we will use them to position +%D Layers are normally used to position multiple content on +%D a specific overlay. Here we will use them to position %D only and since the samples and text will swap place, we -%D will use quite a few layers. +%D will use quite a few layers. \defineoverlay [text] [\composedlayer{text}] \defineoverlay [sample] [\composedlayer{sample}] @@ -136,43 +136,43 @@ %D There are three positions. When combined, the sample and %D text windows overlap, otherwise the lone window is -%D centered. We could have used one layer and reversed the -%D order by setting the \type {direction} parameter, but -%D this approach is more readable. +%D centered. We could have used one layer and reversed the +%D order by setting the \type {direction} parameter, but +%D this approach is more readable. \definelayer - [text] + [text] [x=\makeupwidth,y=\makeupheight,location=lt, hoffset=-\FrameSkip,voffset=-\FrameSkip] \definelayer - [sample] + [sample] [hoffset=\FrameSkip,voffset=\FrameSkip] \definelayer - [common] - [x=.5\makeupwidth,y=.5\makeupheight,location=c] + [common] + [x=.5\makeupwidth,y=.5\makeupheight,location=c] %D The topic is put in the lower right corner of the text -%D window. +%D window. \defineoverlay [topic] [\composedlayer{topic}] \definelayer - [topic] + [topic] [x=\FrameWidth,y=\FrameHeight,location=lt, hoffset=-\FrameOffset,voffset=-\FrameSkip] -%D The topic is put in a framed box. That way we can make -%D sure that it gets a background, which looks better when -%D it covers something else. Otherwise we could have stuct +%D The topic is put in a framed box. That way we can make +%D sure that it gets a background, which looks better when +%D it covers something else. Otherwise we could have stuct %D to: -%D +%D %D \starttypen %D \def\Topic#1% %D {\setlayer[topic]{\color[PageColor]{\bfb\setstrut#1}}} %D \stoptypen -%D +%D %D But, we go for the nice alternative: \def\Topic#1% @@ -184,10 +184,10 @@ background=color,backgroundcolor=TextColor] {#1}}}} -%D The sample as well as the explanation will be collected in -%D a buffer. That way we can reuse the content. We could +%D The sample as well as the explanation will be collected in +%D a buffer. That way we can reuse the content. We could %D have used a box instead, but can we be sure that the content -%D is not adapting itself? So, buffers we use. +%D is not adapting itself? So, buffers we use. \resetbuffer[sample] \resetbuffer[text] @@ -200,9 +200,9 @@ frame=off,align=normal,strut=no,before=,after=, background={background,nextpage}] -%D We safe some keying in by combining things in one macro. +%D We safe some keying in by combining things in one macro. -\def\DoSampleText#1#2#3% kind layer overlays +\def\DoSampleText#1#2#3% kind layer overlays {\setupframedtexts[SampleText][background={background,#3}] \setlayer[#2] {\startSampleText[none] @@ -217,24 +217,24 @@ \def\StopSample {\startstandardmakeup - \DoSampleText{sample}{common}{nextpage} + \DoSampleText{sample}{common}{nextpage} \stopstandardmakeup \resetbuffer[sample]} \def\StopText {\startstandardmakeup - \DoSampleText{text}{common}{topic,nextpage} + \DoSampleText{text}{common}{topic,nextpage} \stopstandardmakeup \resetbuffer[text]} \setupbackgrounds[page][background={color,nextpage}] \setupbackgrounds[text][background=common] -%D When we combine sample and text, we get slightly -%D different definitions. As you can see we generate two -%D pages. Watch how we manipulate the order of the -%D overlays and teh nature of the buttons. Here data -%D abstraction really pays off. +%D When we combine sample and text, we get slightly +%D different definitions. As you can see we generate two +%D pages. Watch how we manipulate the order of the +%D overlays and teh nature of the buttons. Here data +%D abstraction really pays off. \def\StartIdea {\bgroup @@ -245,68 +245,68 @@ {\setupbackgrounds[page][background={color,skippage}] \setupbackgrounds[text][background={text,sample}] \startstandardmakeup - \DoSampleText{sample}{sample}{previouspage} + \DoSampleText{sample}{sample}{previouspage} \DoSampleText{text} {text} {topic,nextpage} \stopstandardmakeup \setupbackgrounds[page][background={color,nextpage}] \setupbackgrounds[text][background={sample,text}] \startstandardmakeup \DoSampleText{sample}{sample}{previouspage} - \DoSampleText{text} {text} {topic,nextpage} + \DoSampleText{text} {text} {topic,nextpage} \stopstandardmakeup \egroup} %D The rest of the definitions takes care of the title page. -%D Please don't steal this one for your own documents. - -\defineoverlay[joke] [\useMPgraphic{joke}{n=0}] % not to be changed! +%D Please don't steal this one for your own documents. + +\defineoverlay[joke] [\useMPgraphic{joke}{n=0}] % not to be changed! \startuseMPgraphic{joke}{n} StartPage ; - path p, q ; numeric w ; pair xy ; + path p, q ; numeric w ; pair xy ; set_grid(OverlayWidth,OverlayHeight,OverlayWidth/8,OverlayHeight/8) ; - if \MPvar{n}=1 : - p := fulldiamond ; fill Page withcolor \MPcolor{TextColor} ; + if \MPvar{n}=1 : + p := fulldiamond ; fill Page withcolor \MPcolor{TextColor} ; else : - p := fullsquare ; fill Page withcolor \MPcolor{PageColor} ; - fi ; - forever : + p := fullsquare ; fill Page withcolor \MPcolor{PageColor} ; + fi ; + forever : xy := center Page randomized (OverlayWidth,OverlayHeight) ; - if new_on_grid(xpart xy, ypart xy) : - q := (p xyscaled (OverlayWidth/5,OverlayHeight/5)) - randomized (\FrameSkip,\FrameSkip) - shifted xy ; + if new_on_grid(xpart xy, ypart xy) : + q := (p xyscaled (OverlayWidth/5,OverlayHeight/5)) + randomized (\FrameSkip,\FrameSkip) + shifted xy ; w := (\FrameSkip) randomized (\FrameSkip/2) ; - draw q withcolor \MPcolor{PageColor} withpen pencircle scaled (1.5w) ; - fill q withcolor \MPcolor{TextColor} ; - draw q withcolor \MPcolor{LineColor} withpen pencircle scaled ( w) ; - fi ; + draw q withcolor \MPcolor{PageColor} withpen pencircle scaled (1.5w) ; + fill q withcolor \MPcolor{TextColor} ; + draw q withcolor \MPcolor{LineColor} withpen pencircle scaled ( w) ; + fi ; exitif grid_full ; - endfor ; + endfor ; StopPage ; \stopuseMPgraphic \defineoverlay[fuzzy][\useMPgraphic{fuzzy}] \startuseMPgraphic{fuzzy} - path p ; numeric w ; - p := (fullsquare xyscaled (OverlayWidth,OverlayHeight)) - randomized (\FrameSkip,\FrameSkip) ; + path p ; numeric w ; + p := (fullsquare xyscaled (OverlayWidth,OverlayHeight)) + randomized (\FrameSkip,\FrameSkip) ; w := (\FrameSkip) randomized (\FrameSkip/2) ; - draw p withcolor \MPcolor{PageColor} withpen pencircle scaled (1.5w) ; - fill p withcolor \MPcolor{TextColor} ; - draw p withcolor \MPcolor{LineColor} withpen pencircle scaled ( w) ; + draw p withcolor \MPcolor{PageColor} withpen pencircle scaled (1.5w) ; + fill p withcolor \MPcolor{TextColor} ; + draw p withcolor \MPcolor{LineColor} withpen pencircle scaled ( w) ; \stopuseMPgraphic -%D This time we use a fit window, but with a slightly randomized -%D frame, our trademark so to say. +%D This time we use a fit window, but with a slightly randomized +%D frame, our trademark so to say. \def\StartTitlePage {\bgroup \setupbackgrounds[page][background={joke,nextpage}] \startstandardmakeup \switchtobodyfont[big] - \setupframedtexts + \setupframedtexts [SampleText] [background=fuzzy, foregroundcolor=PageColor, @@ -325,56 +325,56 @@ \def\TitlePage#1% {\StartTitlePage#1\StopTitlePage} -%D Let's nill some error prone presentation macros. +%D Let's nill some error prone presentation macros. \let\Subject \Topic \let\Topics \gobbleoneargument \let\Subjects \relax -%D We will avoid \citeer {overfull} messages. +%D We will avoid \citeer {overfull} messages. -\dontcomplain +\dontcomplain \doifnotmode{demo}{\endinput} -%D The (rather silly) demo section. +%D The (rather silly) demo section. -\starttext +\starttext \setupbodyfont[12pt] \TitlePage{Quotes, Quotes\\and more quotes} \StartIdea - \StartSample - \input knuth \par + \StartSample + \input knuth \par \StopSample - \StartText + \StartText \Topic{Tufte} - \input tufte \par + \input tufte \par \StopText \StopIdea \StartIdea - \StartSample - \input materie \par + \StartSample + \input materie \par \StopSample - \StartText - \input reich \par + \StartText + \input reich \par \StopText \StopIdea -\StartText - \input tufte \par +\StartText + \input tufte \par \StopText \StartIdea - \StartSample - \input knuth \par + \StartSample + \input knuth \par \StopSample - \StartText - \input tufte \par + \StartText + \input tufte \par \StopText \StopIdea -\stoptext +\stoptext |