summaryrefslogtreecommitdiff
path: root/tex/context/base/s-pre-04.tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/s-pre-04.tex')
-rw-r--r--tex/context/base/s-pre-04.tex152
1 files changed, 86 insertions, 66 deletions
diff --git a/tex/context/base/s-pre-04.tex b/tex/context/base/s-pre-04.tex
index 29b040a8b..09cc79b72 100644
--- a/tex/context/base/s-pre-04.tex
+++ b/tex/context/base/s-pre-04.tex
@@ -8,17 +8,17 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
-\usemodule[pre-general]
+\usemodule[pre-general]
%D \macros
%D {setupbodyfont}
%D
%D This is just another environment for typesetting interactive
%D presentations. I wrote this module on behalf of a course I
-%D gave for the United Kingdom \TeX\ users group.
+%D gave for the United Kingdom \TeX\ users group.
\setupbodyfont[ams,pos,14.4pt]
@@ -28,33 +28,33 @@
%D I started using dark blue for the navigational elements. In
%D that context, dark red is a logical choice for the contrast
%D color. While playing around with the navigational elements
-%D I decided to use the not so dominant color yellow for the
-%D status bar.
-%D
+%D I decided to use the not so dominant color yellow for the
+%D status bar.
+%D
%D A few days before I wrote this style, the recent acquisition
%D of Mondriaans last painting by the Dutch governement was a
%D hot topic in the dutch news scenary. Therefore I decided to
%D replace the rather dull title page by something more
%D colorful, in mondriaan colors, but far more random than any
-%D of his paintings. For consistence we remap the already
-%D defined primary colors.
+%D of his paintings. For consistence we remap the already
+%D defined primary colors.
\setupcolors [state=start]
-\definecolor [NoneColor] [s=.6]
+\definecolor [NoneColor] [s=.6]
\definecolor [GotoColor] [b=.6] \definecolor[blue] [GotoColor]
\definecolor [ExitColor] [r=.6] \definecolor[red] [ExitColor]
-\definecolor [JumpColor] [s=.6]
+\definecolor [JumpColor] [s=.6]
\definecolor [UserColor] [g=.6] \definecolor[green] [UserColor]
\definecolor [StepColor] [r=.6,g=.6] \definecolor[yellow][StepColor]
\definecolor [PageColor] [s=.80] \definecolor[gray] [PageColor]
-\definecolor [TextColor] [s=.90]
+\definecolor [TextColor] [s=.90]
%D \macros
%D {setuppapersize}
%D
-%D As usual, we take a screen oriented paper size:
+%D As usual, we take a screen oriented paper size:
\setuppapersize
[S6][S6]
@@ -62,9 +62,9 @@
%D \macros
%D {setuplayout,setupinteractionscreen}
%D
-%D The layout definition fits into this $600\times450$ point
+%D The layout definition fits into this $600\times450$ point
%D area, but the dimensions are somewhat diffused by the text
-%D background offset.
+%D background offset.
\setuplayout
[width=530pt,
@@ -85,10 +85,10 @@
%D \macros
%D {setupbackgrounds}
%D
-%D Both the page and the text area have a gray background.
-%D The \type {[text,text]} area also has an offset. Later we
+%D Both the page and the text area have a gray background.
+%D The \type {[text,text]} area also has an offset. Later we
%D will see that we have to compensate for that in the
-%D navigational areas.
+%D navigational areas.
\setupbackgrounds
[page]
@@ -104,19 +104,19 @@
%D \macros
%D {setupinteraction}
%D
-%D For convenient navigation, we turn on interaction.
+%D For convenient navigation, we turn on interaction.
\setupinteraction
[state=start,
menu=on,
- color=UserColor,
+ color=UserColor,
contrastcolor=NoneColor]
%D \macros
%D {setupsubpagenumber}
%D
-%D When navigating the document, we keep the title page out
-%D of sight, therefore we use sub page numbers.
+%D When navigating the document, we keep the title page out
+%D of sight, therefore we use sub page numbers.
\setupsubpagenumber
[state=start,
@@ -127,7 +127,7 @@
%D
%D There is only one interaction menu, located in the right
%D edge of the screen. Both offsets enlarge the edge by the
-%D same amount as the text background offset.
+%D same amount as the text background offset.
\setupinteractionmenu
[right]
@@ -146,10 +146,10 @@
%D start||stop alternative for setting the content. The macro
%D \type {\interactioncolor} expands into either the
%D interaction color or the contrast color, the latter only
-%D when no jump is possible.
+%D when no jump is possible.
\startinteractionmenu[right]
- \setupinteraction[color=GotoColor]
+ \setupinteraction[color=GotoColor]
\but [previoussubpage] \Triangle {90}\framedwidth\interactioncolor \\
\vskip10pt
\but [nextsubpage] \Triangle{270}\framedwidth\interactioncolor \\
@@ -162,11 +162,11 @@
%D \macros
%D {setupinteractionbar}
%D
-%D The interaction bar at the bottom is also larger than the
-%D normal width of the bottom area.
+%D The interaction bar at the bottom is also larger than the
+%D normal width of the bottom area.
\setupinteractionbar
- [alternative=f,
+ [alternative=f,
width=\textwidth,
height=\bottomheight,
distance=10pt,
@@ -176,29 +176,29 @@
%D \macros
%D {setupbottomtexts}
%D
-%D The bar is centered in the middle.
+%D The bar is centered in the middle.
-\setupbottomtexts
+\setupbottomtexts
[\interactionbar]
-%D We can exit viewing with a close button, located on the
-%D rightmost bottom area.
+%D We can exit viewing with a close button, located on the
+%D rightmost bottom area.
\def\CloseButton
{\button
[width=\rightedgewidth,height=\bottomheight,offset=overlay,
background=color,backgroundcolor=ExitColor,frame=off]
{}%
- [CloseDocument]}
+ [CloseDocument]}
\setupbottomtexts
[edge][][\CloseButton]
-%D \macros
+%D \macros
%D {definesymbol,setupitemize}
%D
-%D Because some prominent things are rectangular or triangular,
-%D we prefer some different symbols in itemizations:
+%D Because some prominent things are rectangular or triangular,
+%D we prefer some different symbols in itemizations:
\definesymbol[1][$\blacktriangleright$]
\definesymbol[2][$\blacktriangledown$]
@@ -245,11 +245,11 @@
%D \macros
%D {Topic, Nopic, Subject,
-%D definehead, setuphead}
+%D definehead, setuphead}
%D
-%D We use \type {\Topic} and \type {\Subject} instead of
-%D chapters and sections. The \type {\Nopic} alternative is
-%D meant for internal use.
+%D We use \type {\Topic} and \type {\Subject} instead of
+%D chapters and sections. The \type {\Nopic} alternative is
+%D meant for internal use.
\definehead [Topic] [chapter]
\definehead [Nopic] [title]
@@ -275,9 +275,9 @@
%D {Topics, Subjects,
%D setuplist, placelist, startcolumns}
%D
-%D This style is meant for the more large presentations, and
-%D therefore provided for a list of topics as well as local
-%D lists of subjects. When many topics are introduces, the
+%D This style is meant for the more large presentations, and
+%D therefore provided for a list of topics as well as local
+%D lists of subjects. When many topics are introduces, the
%D list is typeset in columns.
\setuplist
@@ -291,28 +291,28 @@
[Topic]
[criterium=all]
-\def\Topics#1%
+\def\Topics#1%
{\determinelistcharacteristics[Topic]
- \ifnum\utilitylistlength>0
+ \ifnum\utilitylistlength>0
\Nopic[Topics]{#1}
- \ifnum\utilitylistlength>12
+ \ifnum\utilitylistlength>12
\startcolumns
\placelist[Topic]
\stopcolumns
\else
\placelist[Topic]
- \fi
+ \fi
\fi}
-\def\Subjects%
+\def\Subjects%
{\placelist[Subject]}
-%D Last we define the overlays. Look at the way colors are
+%D Last we define the overlays. Look at the way colors are
%D linked into the macros.
\startMPinclusions
def triangle (expr wid, rot, col) =
- x1 := x3 := y1 := 0 ; x2 := y3 := wid ; y2 := .5y3 ;
+ x1 := x3 := y1 := 0 ; x2 := y3 := wid ; y2 := .5y3 ;
fill (z1--z2--z3--cycle) rotated rot withcolor col ;
currentpicture := currentpicture xysized (wid,wid) ;
enddef ;
@@ -331,27 +331,47 @@
\def\Triangle#1#2#3%
{\uniqueMPgraphic{triangle}{rotation=#1,width=#2,color=#3}}
-\startuseMPgraphic{title} % can be simplified with "randomized"
- color c ; path p ;
- for i=1 upto 250 :
- x0 := uniformdeviate \overlaywidth ;
+\startuseMPgraphic{title} % can be simplified with "randomized"
+ color c ; path p ;
+ for i=1 upto 250 :
+ x0 := uniformdeviate \overlaywidth ;
y0 := uniformdeviate \overlayheight ;
- sx := uniformdeviate 20 ;
+ sx := uniformdeviate 20 ;
sy := uniformdeviate 20 ;
- cc := round(uniformdeviate 2) ;
- if cc=0 : c := \MPcolor{GotoColor} fi ;
- if cc=1 : c := \MPcolor{ExitColor} fi ;
- if cc=2 : c := \MPcolor{StepColor} fi ;
- qq := round(uniformdeviate 1) ;
- if qq=0 :
+ cc := round(uniformdeviate 2) ;
+ if cc=0 : c := \MPcolor{GotoColor} fi ;
+ if cc=1 : c := \MPcolor{ExitColor} fi ;
+ if cc=2 : c := \MPcolor{StepColor} fi ;
+ qq := round(uniformdeviate 1) ;
+ if qq=0 :
p := unitsquare xscaled sx yscaled sy ;
else :
- rr := round(uniformdeviate 3) * 90 ;
- x1 := x3 := y1 := 0 ; x2 := y3 := sx; y2 := .5y3 ;
+ rr := round(uniformdeviate 3) * 90 ;
+ x1 := x3 := y1 := 0 ; x2 := y3 := sx; y2 := .5y3 ;
p := (z1--z2--z3--cycle) rotated rr ;
- fi ;
- fill p shifted z0 withcolor c ;
+ fi ;
+ fill p shifted z0 withcolor c ;
endfor ;
\stopuseMPgraphic
-\endinput
+\doifnotmode{demo}{\endinput}
+
+%D The (rather silly) demo section.
+
+\starttext
+
+\TitlePage{Title Page\\pre-colorfull}
+
+\Topics{Some Nice Quotes}
+
+\Topic{A Few}
+
+\Subject{Knuth} \input knuth
+\Subject{Tufte} \input tufte
+
+\Topic{Some More}
+
+\Subject{Zapf} \input zapf
+\Subject{Bryson} \input bryson
+
+\stoptext