summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-BigNumber.tex16
-rw-r--r--Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-BottomSquares.tex74
-rw-r--r--Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-Boxed.tex30
-rw-r--r--Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-FuzzyTopic.tex384
-rw-r--r--Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-Shaded.tex47
-rw-r--r--Master/texmf-dist/tex/context/third/simpleslides/t-simpleslides.tex2
-rw-r--r--Master/texmf-dist/tex/context/third/simpleslides/t-slidesvisualcounter.tex502
7 files changed, 988 insertions, 67 deletions
diff --git a/Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-BigNumber.tex b/Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-BigNumber.tex
index dba3f68458e..2580c5e2dec 100644
--- a/Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-BigNumber.tex
+++ b/Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-BigNumber.tex
@@ -114,8 +114,7 @@
\unexpanded\def\TaspresentSometxtRight#1%
{\getvalue{simpleslides:framed:small}
- {\color[simpleslides:backgroundcolor]
- {\NumberFont #1}}}
+ {\NumberFont \color[simpleslides:backgroundcolor]{#1}}}
%D Now we define a \METAPOST| graphic that draws the number. The exact
%D dimensions have been found by trial and error.
@@ -125,14 +124,15 @@ StartPage ;
save Left, Right ;
picture Left, Right ;
-Left := \sometxt [simpleslides:sometxt:left]{\folio} ysized 6cm;
-Right := \sometxt[simpleslides:sometxt:right]{\folio} ysized 6cm;
+Left := textext("\NumberFont \color[simpleslides:contrastcolor]{\folio}") ysized 4cm ;
+Right := textext("\NumberFont \color[simpleslides:backgroundcolor]{\folio}") ysized 4cm ;
save LeftBox, RightBox ;
path LeftBox, RightBox ;
save split ; numeric split ;
-split := if PageNumber < 10 : 1/2 else : 2/3 fi ;
+split := if PageNumber < 10 : 1/2 else : 3/4 fi ;
+%split := 1/2 ;
LeftBox := llcorner Left -- split[llcorner Left, lrcorner Left]
-- split[ulcorner Left, urcorner Left] -- ulcorner Left --cycle ;
@@ -140,15 +140,17 @@ LeftBox := llcorner Left -- split[llcorner Left, lrcorner Left]
RightBox := lrcorner Right -- split[lrcorner Right, llcorner Right]
-- split[urcorner Right, ulcorner Right] -- urcorner Right --cycle ;
+save shft ; numeric shft ;
+shft = arclength(llcorner Right -- lrcorner Right) ;
if PageNumber >= 10 :
-RightBox := RightBox shifted split[lrcorner Right, llcorner Right] ;
+ RightBox := RightBox shifted (shft/2, 0) ;
fi;
clip Left to LeftBox ;
clip Right to RightBox ;
save corner; pair corner ;
-corner := lrcorner Field[Text][Text] shifted (.2cm,-1cm) ; % same as x2
+corner := lrcorner Field[Text][Text] shifted (.2cm,0.3cm) ; % same as x2
labeloffset := 0bp;
diff --git a/Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-BottomSquares.tex b/Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-BottomSquares.tex
index ea7bcbeba64..a319085f726 100644
--- a/Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-BottomSquares.tex
+++ b/Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-BottomSquares.tex
@@ -31,12 +31,13 @@
footer=0cm,
topspace=1cm,
bottomspace=2cm,
+ bottom=1cm,
backspace=1.5cm,
location=singlesided]
\setuplayout [simpleslides:layout:horizontal][header=1.4cm]
\setuplayout [simpleslides:layout:vertical] [header=0cm]
-\setuplayout [simpleslides:layout:title] [header=0cm]
+\setuplayout [simpleslides:layout:title] [header=0cm,bottom=0pt,bottomspace=0pt]
%D We also specify the position of the slidetitle.
@@ -64,6 +65,23 @@
\definecolor [simpleslides:variantcolor] [s=.3]
\definecolor [simpleslides:itemize:color] [simpleslides:contrastcolor]
+\definevisualcounter
+ [simpleslides:bottomsquarescounter]
+ [squaremarkers]
+ [counter=userpage,
+ distance={(\the\dimexpr\visualcounterparameter{maxwidth})/m + width},
+ path=unitsquare,
+ maxwidth=\textwidth,
+ height=0.3cm,
+ width=0.3cm]
+
+\definepalet[visualcounter:squaremarkers]
+ [active=simpleslides:contrastcolor,
+ future=simpleslides:variantcolor,
+ past=simpleslides:variantcolor]
+
+\setupbottomtexts[\usevisualcounter{simpleslides:bottomsquarescounter}]
+
%D We let \METAPOST\ calculate the background:
%AM: Why not implement this as an interaction bar?
@@ -72,33 +90,33 @@
StartPage ;
fill Page withcolor \MPcolor{simpleslides:backgroundcolor} ;
-
-save diff ;numeric diff;
-diff = .3cm ;
-
-save w; numeric w;
-w = xpart (lrcorner Field[Text][Text] - llcorner Field[Text][Text]) - diff ;
-
-save factor; numeric factor;
-if NOfPages <= 1 :
- factor = w ;
-else :
- factor = w/(NOfPages - 1) ;
-fi ;
-
-save p; path p ;
-p = unitsquare xyscaled (diff,diff)
- shifted (xpart llcorner Field[Text][Text],0.85cm) ;
-
-for i = 1 upto NOfPages:
- if PageNumber = i:
- fill p xyscaled (0,2) shifted ( (i-1)*factor,-diff-0.85cm)
- withcolor \MPcolor{simpleslides:contrastcolor} ;
- else :
- fill p shifted ( (i-1)*factor, 0)
- withcolor \MPcolor{simpleslides:variantcolor} ;
- fi ;
-endfor ;
+%
+% save diff ;numeric diff;
+% diff = .3cm ;
+%
+% save w; numeric w;
+% w = xpart (lrcorner Field[Text][Text] - llcorner Field[Text][Text]) - diff ;
+%
+% save factor; numeric factor;
+% if NOfPages <= 1 :
+% factor = w ;
+% else :
+% factor = w/(NOfPages - 1) ;
+% fi ;
+%
+% save p; path p ;
+% p = unitsquare xyscaled (diff,diff)
+% shifted (xpart llcorner Field[Text][Text],0.85cm) ;
+%
+% for i = 1 upto NOfPages:
+% if PageNumber = i:
+% fill p xyscaled (0,2) shifted ( (i-1)*factor,-diff-0.85cm)
+% withcolor \MPcolor{simpleslides:contrastcolor} ;
+% else :
+% fill p shifted ( (i-1)*factor, 0)
+% withcolor \MPcolor{simpleslides:variantcolor} ;
+% fi ;
+% endfor ;
StopPage ;
\stopuseMPgraphic
diff --git a/Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-Boxed.tex b/Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-Boxed.tex
index cec57643210..17c3ed506d7 100644
--- a/Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-Boxed.tex
+++ b/Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-Boxed.tex
@@ -28,7 +28,9 @@
leftmargindistance=1cm,
rightmargindistance=0cm,
header=2.8cm,
- footer=1cm,
+ bottomspace=0.4cm,
+ bottom=1cm,
+ footer=0cm,
topspace=.7cm,
backspace=2cm,
location=singlesided]
@@ -58,6 +60,24 @@
\definecolor [simpleslides:variantcolor] [yellow]
\definecolor [simpleslides:itemize:color] [simpleslides:contrastcolor]
+\definevisualcounter
+ [simpleslides:squarescounter]
+ [markers]
+ [counter=userpage,
+ distance={(\the\dimexpr\visualcounterparameter{maxwidth})/(max(m-1,1)) - width},
+ path=unitcircle,
+ maxwidth=\textwidth,
+ height=0.5cm,
+ width=0.5cm]
+
+\definepalet[visualcounter:markers]
+ [active=simpleslides:variantcolor,
+ future=simpleslides:backgroundcolor,
+ past=simpleslides:backgroundcolor]
+
+\setupbottomtexts[\usevisualcounter{simpleslides:squarescounter}]
+
+
%D We let Metapost calculate the background:
\startuniqueMPgraphic{simpleslides:MP:horizontal}
@@ -142,14 +162,14 @@ StopPage
[simpleslides:background:title]
[\useMPgraphic{simpleslides:MP:horizontal}]
-\defineoverlay
- [simpleslides:background:ornament]
- [\useMPgraphic{simpleslides:MP:ornament}]
+% \defineoverlay
+% [simpleslides:background:ornament]
+% [\useMPgraphic{simpleslides:MP:ornament}]
%D The title page:
\setupTitle
- [\c!headcolor={simpleslides:contrastcolor}]
+ [\c!color={simpleslides:contrastcolor}]
%D The slide title is typeset in a layer
diff --git a/Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-FuzzyTopic.tex b/Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-FuzzyTopic.tex
new file mode 100644
index 00000000000..270b7102859
--- /dev/null
+++ b/Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-FuzzyTopic.tex
@@ -0,0 +1,384 @@
+%D \module
+%D [ file=simpleslides-s-SideToc,
+%D version=2010.02.09,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Module --- SideToc style,
+%D author=Aditya Mahajan and Thomas A. Schmitz,
+%D date=\currentdate,
+%D copyright={Aditya Mahajan and Thomas A. Schmitz}]
+%C
+%C Copyright 2010 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{SideToc} style for the presentation
+%D module. It is loaded at runtime.
+
+\writestatus{simpleslides}{loading Fuzzy Topic style}
+
+\startmodule[simpleslides-s-FuzzyTopic]
+
+\unprotect
+
+%D We create different layouts for the title page, horizontal, and vertical
+%D slides.
+
+\setuplayout [simpleslides:layout:vertical]
+ [leftmargin=0cm,
+ rightmargin=3cm,
+ leftmargindistance=0cm,
+ rightmargindistance=1.85cm,
+ header=0.1cm,
+ headerdistance=0cm,
+ footer=0cm,
+ topspace=1cm,
+ backspace=8mm,
+ cutspace=5.5cm,
+ bottomspace=0cm,
+ bottom=0pt,
+ location=middle]
+
+\setuplayout [simpleslides:layout:horizontal]
+ [leftmargin=0cm,
+ rightmargin=3cm,
+ leftmargindistance=0cm,
+ rightmargindistance=1.85cm,
+ header=0.1cm,
+ headerdistance=1.7cm,
+ footer=0cm,
+ topspace=1cm,
+ backspace=8mm,
+ cutspace=5.5cm,
+ bottomspace=0cm,
+ bottom=0pt,
+ location=middle]
+
+\setuplayout [simpleslides:layout:title]
+ [width=fit,
+ leftmargin=0cm,
+ rightmargin=0cm,
+ height=fit,
+ header=0cm,
+ footer=0cm,
+ topspace=1cm,
+ backspace=1cm,
+ bottomspace=0cm,
+ bottom=0pt,
+ location=middle]
+
+\setupcombinations[distance=0.75cm]
+
+%D The interesting part of this presentation style is the "Topic" list which is
+%D typeset in the left margin. It is inspired by something Hans did in
+%D s-pre-19. The Difference is that I wanted the Topic to be independent from
+%D SlideTitle macro. This way, several slides can be combined into one Topic.
+
+% \definelayer
+% [Topiclayer]
+% [width=2.5cm,
+% height=\paperheight]
+%
+% \defineoverlay
+% [simpleslides:background:ornament]
+% [\setlayer[Topiclayer]{\completelist[MyTopic]}
+
+% \startsetups tlayer
+% \setlayer[Topiclayer]{\completelist[MyTopics]}
+%\stopsetups
+
+%D These macros are used for placing figures/pictures:
+
+\define\NormalHeight {\textheight}
+\define\NormalWidth {.476\textwidth}
+\define\PictureFrameHeight {\textheight}
+\define\PictureFrameWidth {.476\textwidth}
+
+\setuplayer
+ [simpleslides:layer:slidetitle]
+ [x=1cm,y=2mm]
+
+%D We define our color scheme
+\definecolor [simpleslides:contrastcolor] [r=0.6,g=0,b=0]
+\definecolor [simpleslides:backgroundcolor] [s=0.9]
+\definecolor [simpleslides:altcontrastcolor] [s=0.92]
+\definecolor [simpleslides:textcolor] [s=0]
+\definecolor [simpleslides:itemize:color] [simpleslides:contrastcolor]
+
+%D Here are the main macros for defining and typesetting the Topic list:
+
+\define[3]\FancyEntry%
+ {\doifelse{#1}{\MyMark}%
+ {\framed[width=3cm,height=1cm,frame=off,top=\vss,bottom=\vss,background=simpleslides:current,offset=1mm,align=center]{\switchtobodyfont[11pt]#1}}%
+ {\framed[width=3cm,height=1cm,frame=off,top=\vss,bottom=\vss,offset=2mm,align=center]{\switchtobodyfont[11pt]#1}}}
+
+\definelist[MyTopics][criterium=all]
+
+\def\MyMark{}
+
+\definemargindata [TopicMargin] [right] [style=small]
+
+\def\Topic%
+%{\relax}
+ {\dosingleargument\doTopic}
+
+\def\doTopic[#1]{%
+ \gdef\MyMark{#1}%
+ \writetolist[MyTopics][location=none]{#1}}%
+
+%\def\Topic%
+% {\dosingleargument\doTopic}
+
+%\def\doTopic[#1]{%
+% \gdef\MyMark{#1}%
+% \writetolist[MyTopics]{#1}{}%
+%}
+
+\setuplist[MyTopics]
+ [pagenumber=no,
+ expansion=yes,
+ alternative=command,
+ command=\FancyEntry]
+
+\setuptexttexts[margin][][\vbox{\placelist[MyTopics]}]
+
+%D We use \METAPOST to draw the background.
+
+\startuseMPgraphic{simpleslides:MP:title}
+StartPage ;
+def fuzzy (expr p,dx,dy) =
+ (xpart p +dx-uniformdeviate dx,ypart p+dy-uniformdeviate dy)
+enddef ;
+
+save a, b, c ; a := 4.7cm ; b := 0.2cm ; c := 4.1cm ;
+save dd ; dd := 7 ;
+StartPage ;
+save ll ; pair ll ; ll := (b, b) ;
+save ul ; pair ul ; ul := (b, PaperHeight - b) ;
+save ur ; pair ur ; ur := (PaperWidth - b, PaperHeight - b) ;
+save lr ; pair lr ; lr := (PaperWidth - b, b) ;
+save ple, pto, pri, pbo ; path ple, pto, pri, pbo ;
+fill Page withcolor black ;
+pickup pencircle scaled 8pt ;
+ple := ul.. for i=.1 step .1 until .9 : fuzzy (i[ul,ll],+dd,0).. endfor ll ;
+pbo := ll.. for i=.1 step .1 until .9 : fuzzy (i[ll,lr],0,+dd).. endfor lr ;
+pri := lr.. for i=.1 step .1 until .9 : fuzzy (i[lr,ur],-dd,0).. endfor ur ;
+pto := ur.. for i=.1 step .1 until .9 : fuzzy (i[ur,ul],0,-dd).. endfor ul ;
+fill ple & pbo & pri & pto -- cycle withcolor \MPcolor{simpleslides:backgroundcolor} ;
+draw pri withcolor \MPcolor{simpleslides:contrastcolor} ;
+draw pbo withcolor \MPcolor{simpleslides:contrastcolor} ;
+draw pto withcolor \MPcolor{simpleslides:contrastcolor} ;
+draw ple withcolor \MPcolor{simpleslides:contrastcolor} ;
+StopPage ;
+\stopuseMPgraphic
+
+\startuseMPgraphic{simpleslides:MP:horizontal}
+def fuzzy (expr p,dx,dy) =
+ (xpart p +dx-uniformdeviate dx,ypart p+dy-uniformdeviate dy)
+enddef ;
+
+save a, b, c ; a := 4.7cm ; b := 0.2cm ; c := 4.1cm ;
+save dd ; dd := 7 ;
+StartPage ;
+save ll ; pair ll ; ll := (b, b) ;
+save ul ; pair ul ; ul := (b, PaperHeight - b) ;
+save ur ; pair ur ; ur := (PaperWidth - a, PaperHeight - b) ;
+save lr ; pair lr ; lr := (PaperWidth - a, b) ;
+save tll ; pair tll ; tll := (PaperWidth - c, b) ;
+save tlr ; pair tlr ; tlr := (PaperWidth - b, b) ;
+save tul ; pair tul ; tul := (PaperWidth - c, PaperHeight - b) ;
+save tur ; pair tur ; tur := (PaperWidth - b, PaperHeight - b) ;
+save ple, pto, pri, pbo, sep ; path ple, pto, pri, pbo, sep ;
+save tle, tto, tri, tbo ; path tle, tto, tri, tbo ;
+fill Page withcolor black ;
+pickup pencircle scaled 8pt ;
+ple := ul.. for i=.1 step .1 until .9 : fuzzy (i[ul,ll],+dd,0).. endfor ll ;
+pbo := ll.. for i=.1 step .1 until .9 : fuzzy (i[ll,lr],0,+dd).. endfor lr ;
+pri := lr.. for i=.1 step .1 until .9 : fuzzy (i[lr,ur],-dd,0).. endfor ur ;
+pto := ur.. for i=.1 step .1 until .9 : fuzzy (i[ur,ul],0,-dd).. endfor ul ;
+tle := tul.. for i=.1 step .1 until .9 : fuzzy (i[tul,tll],+dd,0).. endfor tll ;
+tbo := tll.. for i=.1 step .2 until .9 : fuzzy (i[tll,tlr],0,+dd).. endfor tlr ;
+tri := tlr.. for i=.1 step .1 until .9 : fuzzy (i[tlr,tur],-dd,0).. endfor tur ;
+tto := tur.. for i=.1 step .2 until .9 : fuzzy (i[tur,tul],0,-dd).. endfor tul ;
+fill ple & pbo & pri & pto -- cycle withcolor \MPcolor{simpleslides:backgroundcolor} ;
+fill tle & tbo & tri & tto -- cycle withcolor \MPcolor{simpleslides:backgroundcolor};
+draw textext("\switchtobodyfont[55pt]\color[simpleslides:altcontrastcolor]{\pagenumber}") shifted (19cm, 1.5cm) ;
+draw pri withcolor \MPcolor{simpleslides:contrastcolor} ;
+draw pbo withcolor \MPcolor{simpleslides:contrastcolor} ;
+draw pto withcolor \MPcolor{simpleslides:contrastcolor} ;
+draw ple withcolor \MPcolor{simpleslides:contrastcolor} ;
+draw tle withcolor \MPcolor{simpleslides:contrastcolor} ;
+draw tbo withcolor \MPcolor{simpleslides:contrastcolor} ;
+draw tri withcolor \MPcolor{simpleslides:contrastcolor} ;
+draw tto withcolor \MPcolor{simpleslides:contrastcolor} ;
+z[1] = point 0.14 along ple shifted (8mm, 0) ;
+z[2] = point 0.86 along pri shifted (-8mm, 0) ;
+sep := z[1].. for i=.1 step .1 until .9 : fuzzy (i[z[1],z[2]],0,+dd).. endfor z[2] ;
+draw sep withcolor \MPcolor{simpleslides:contrastcolor} ;
+StopPage ;
+\stopuseMPgraphic
+
+\startuseMPgraphic{simpleslides:MP:vertical}
+def fuzzy (expr p,dx,dy) =
+ (xpart p +dx-uniformdeviate dx,ypart p+dy-uniformdeviate dy)
+enddef ;
+
+save a, b, c ; a := 4.7cm ; b := 0.2cm ; c := 4.1cm ;
+save dd ; dd := 7 ;
+StartPage ;
+save ll ; pair ll ; ll := (b, b) ;
+save ul ; pair ul ; ul := (b, PaperHeight - b) ;
+save ur ; pair ur ; ur := (PaperWidth - a, PaperHeight - b) ;
+save lr ; pair lr ; lr := (PaperWidth - a, b) ;
+save tll ; pair tll ; tll := (PaperWidth - c, b) ;
+save tlr ; pair tlr ; tlr := (PaperWidth - b, b) ;
+save tul ; pair tul ; tul := (PaperWidth - c, PaperHeight - b) ;
+save tur ; pair tur ; tur := (PaperWidth - b, PaperHeight - b) ;
+save ple, pto, pri, pbo, sep ; path ple, pto, pri, pbo, sep ;
+save tle, tto, tri, tbo ; path tle, tto, tri, tbo ;
+fill Page withcolor black ;
+pickup pencircle scaled 8pt ;
+ple := ul.. for i=.1 step .1 until .9 : fuzzy (i[ul,ll],+dd,0).. endfor ll ;
+pbo := ll.. for i=.1 step .1 until .9 : fuzzy (i[ll,lr],0,+dd).. endfor lr ;
+pri := lr.. for i=.1 step .1 until .9 : fuzzy (i[lr,ur],-dd,0).. endfor ur ;
+pto := ur.. for i=.1 step .1 until .9 : fuzzy (i[ur,ul],0,-dd).. endfor ul ;
+tle := tul.. for i=.1 step .1 until .9 : fuzzy (i[tul,tll],+dd,0).. endfor tll ;
+tbo := tll.. for i=.1 step .2 until .9 : fuzzy (i[tll,tlr],0,+dd).. endfor tlr ;
+tri := tlr.. for i=.1 step .1 until .9 : fuzzy (i[tlr,tur],-dd,0).. endfor tur ;
+tto := tur.. for i=.1 step .2 until .9 : fuzzy (i[tur,tul],0,-dd).. endfor tul ;
+fill ple & pbo & pri & pto -- cycle withcolor \MPcolor{simpleslides:backgroundcolor} ;
+fill tle & tbo & tri & tto -- cycle withcolor \MPcolor{simpleslides:backgroundcolor} ;
+draw textext("\switchtobodyfont[55pt]\color[simpleslides:altcontrastcolor]{\pagenumber}") shifted (19cm, 1.5cm) ;
+draw pri withcolor \MPcolor{simpleslides:contrastcolor} ;
+draw pbo withcolor \MPcolor{simpleslides:contrastcolor} ;
+draw pto withcolor \MPcolor{simpleslides:contrastcolor} ;
+draw ple withcolor \MPcolor{simpleslides:contrastcolor} ;
+draw tle withcolor \MPcolor{simpleslides:contrastcolor} ;
+draw tbo withcolor \MPcolor{simpleslides:contrastcolor} ;
+draw tri withcolor \MPcolor{simpleslides:contrastcolor} ;
+draw tto withcolor \MPcolor{simpleslides:contrastcolor} ;
+z[1] = point 0.5 along pto shifted (0, -8mm) ;
+z[2] = point 0.5 along pbo shifted (0, 8mm) ;
+sep := z[1].. for i=.1 step .1 until .9 : fuzzy (i[z[1],z[2]],+dd,0).. endfor z[2] ;
+draw sep withcolor \MPcolor{simpleslides:contrastcolor} ;
+StopPage ;
+\stopuseMPgraphic
+
+\startuseMPgraphic{FancyFrame}
+save p ; path p ;
+z[1] = (0, 0) ;
+z[2] = z[1] shifted (OverlayWidth, -3pt randomized 6pt) ;
+p := z[1].. for i=.1 step .1 until .8 : fuzzy (i[z[1],z[2]],+dd,0).. endfor z[2] ;
+pickup pencircle scaled 5pt ;
+draw p withcolor \MPcolor{simpleslides:contrastcolor} ;
+setbounds currentpicture to boundingbox OverlayBox ;
+\stopuseMPgraphic
+
+\startuseMPgraphic{FancyFrame_2}
+save p ; path p ;
+z[0] = (0, OverlayHeight/2) ;
+z[1] = z[0] shifted (-2.5mm randomized 5mm, -2.5mm randomized 5mm) ;
+z[2] = (OverlayWidth/2, OverlayHeight) ;
+z[3] = (OverlayWidth, OverlayHeight/2) ;
+z[4] = (OverlayWidth/2, 0) ;
+z[5] = z[0] shifted (-2.5mm randomized 5mm, -2.5mm randomized 5mm) ;
+pickup pencircle scaled 5pt ;
+draw z[1] .. z[2] .. z[3] .. z[4] .. z[5] withcolor \MPcolor{simpleslides:contrastcolor} ;
+setbounds currentpicture to boundingbox OverlayBox ;
+\stopuseMPgraphic
+
+\startuseMPgraphic{FancyFrame_3}
+w := OverlayWidth; width := 100; wfactor := w/width;
+h := OverlayHeight; height := 100; hfactor := h/height;
+color lightred; lightred := (.90,.50,.50);
+color lightgray; lightgray := (.95,.95,.95);
+color gray; gray := (.50,.50,.50);
+ %
+def random_delta (expr d) =
+ d-(uniformdeviate 2d)
+enddef;
+ %
+z1 = (0,height);
+z2 = (0,0);
+z3 = (width,0);
+z4 = (width,height);
+%
+z5 = (width+random_delta(.2width),height+random_delta(.2height));
+z6 = (.5width+random_delta(.1width),height+random_delta(.1height));
+%
+pickup pencircle
+ xscaled (15pt/wfactor)
+ yscaled (15pt/(2*hfactor))
+ rotated 30;
+ %
+draw z5..z1..z2..z3..z4..z6 withcolor \MPcolor{simpleslides:contrastcolor};
+%
+newwidth := (xpart (urcorner currentpicture)) -
+ (xpart (llcorner currentpicture));
+newheight := (ypart (urcorner currentpicture)) -
+ (ypart (llcorner currentpicture));
+%
+currentpicture := currentpicture
+ xscaled (w/newwidth) yscaled (h/newheight);
+\stopuseMPgraphic
+
+%D We define these backgrounds as overlays:
+
+\defineoverlay
+ [simpleslides:background:horizontal]
+ [\useMPgraphic{simpleslides:MP:horizontal}]
+
+\defineoverlay
+ [simpleslides:background:vertical]
+ [\useMPgraphic{simpleslides:MP:vertical}]
+
+\defineoverlay
+ [simpleslides:background:title]
+ [\useMPgraphic{simpleslides:MP:title}]
+
+\defineoverlay[simpleslides:current][\useMPgraphic{FancyFrame_3}]
+
+%D We want the title to placed in color.
+
+\setupTitle
+ [\c!title=,
+ \c!author=,
+ \c!date=\currentdate,
+ \c!headstyle=,
+ \c!headcolor={simpleslides:contrastcolor},
+ \c!align=\v!middle,
+ \c!before=\vfill,
+ \c!after=\vfill,
+ \c!title\c!style={\switchtobodyfont[\TitleSize]},
+ \c!title\c!color=simpleslides:contrastcolor,
+ \c!title\c!align=,%\v!middle,
+ \c!author\c!style=,
+ \c!author\c!color={simpleslides:contrastcolor},
+ \c!author\c!align=,%\v!middle,
+ \c!date\c!style=,
+ \c!date\c!color={simpleslides:contrastcolor},
+ \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 want the slide title on the top
+
+\setupSlideTitle
+ [\c!after=,
+ \c!alternative=layer,
+ \c!width=\textwidth,
+ \c!height=2.5cm,
+ \c!color=black]
+
+%D The symbol for the first level of itemizations.
+
+\definesymbol[1][\useMPgraphic{simpleslides:itemize:square}]
+%\setupitemize[1][inmargin][color=simpleslides:backgroundcolor]
+
+\protect
+\stopmodule
+
+\endinput
+
diff --git a/Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-Shaded.tex b/Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-Shaded.tex
index a8da39b1c2c..6e07bdd8623 100644
--- a/Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-Shaded.tex
+++ b/Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-Shaded.tex
@@ -21,7 +21,8 @@
%D The page layout:
-\setuplayout [width=fit,
+\setuplayout [simpleslides:layout:horizontal]
+ [width=fit,
margin=1.5cm,
leftmargindistance=0pt,
rightmargindistance=0pt,
@@ -34,6 +35,9 @@
bottom=1cm,
location=singlesided]
+\setuplayout [simpleslides:layout:title]
+ [bottomspace=0pt]
+
%D These macros are used for placing figures/pictures:
\define\NormalHeight {.88\textheight}
@@ -77,6 +81,23 @@
\setupcolors[textcolor={simpleslides:textcolor}]
+\definevisualcounter
+ [simpleslides:shadedcounter]
+ [markers]
+ [counter=userpage,
+% distance=0.5cm,
+ distance={(\the\dimexpr\visualcounterparameter{maxwidth})/m + width},
+ path=unitcircle,
+ maxwidth=\textwidth,
+ width=0.3cm]
+
+\definepalet[visualcounter:markers]
+ [active=blue, %simpleslides:interactioncolor, % not enough contrast
+ future=simpleslides:contrastcolor,
+ past=simpleslides:variantcolor]
+
+\setupbottomtexts[\usevisualcounter{simpleslides:shadedcounter}]
+
\setupTitle[color=white]
%D This module shades the background in a gradient. We use \METAPOST\ to draw
@@ -85,33 +106,9 @@
\startuseMPgraphic{simpleslides:MP:ornament}
StartPage ;
-save p ; path p[] ;
-save a ;
-if NOfPages <= 15:
- a = 0.7cm ;
-elseif NOfPages <= 30:
- a = 0.45cm ;
-else :
- a = 0.25cm ;
-fi ;
-save factor ; numeric factor ;
-factor = (TextWidth - a)/(NOfPages - 1) ;
linear_shade(Page, 6,
\MPcolor{simpleslides:backgroundcolor},
\MPcolor{simpleslides:variantcolor}) ;
-if PageNumber >1:
- for i = 1 upto NOfPages :
- p[i] = unitcircle scaled a shifted (BackSpace + (i-1)*factor, (2cm - a)/2) ;
- if i = PageNumber :
-% p[i] := p[i] zscaled (1.2,1.5) ;
- pickup pencircle scaled 5pt ;
- drawfill p[i] withcolor \MPcolor{simpleslides:variantcolor} ;
- else :
- circular_shade(p[i],2,\MPcolor{simpleslides:backgroundcolor},
- \MPcolor{simpleslides:variantcolor}) ;
- fi
- endfor ;
-fi ;
StopPage ;
\stopuseMPgraphic
diff --git a/Master/texmf-dist/tex/context/third/simpleslides/t-simpleslides.tex b/Master/texmf-dist/tex/context/third/simpleslides/t-simpleslides.tex
deleted file mode 100644
index 65d6eccefc9..00000000000
--- a/Master/texmf-dist/tex/context/third/simpleslides/t-simpleslides.tex
+++ /dev/null
@@ -1,2 +0,0 @@
-% Temporary file, otherwise the file from the distro is loaded
-\loadmarkfile{t-simpleslides}
diff --git a/Master/texmf-dist/tex/context/third/simpleslides/t-slidesvisualcounter.tex b/Master/texmf-dist/tex/context/third/simpleslides/t-slidesvisualcounter.tex
new file mode 100644
index 00000000000..2c0bea60ae0
--- /dev/null
+++ b/Master/texmf-dist/tex/context/third/simpleslides/t-slidesvisualcounter.tex
@@ -0,0 +1,502 @@
+% macros=mkvi
+
+%D \module
+%D [ file=t-visualcounter,
+%D version=2011.10.05,
+%D title=\CONTEXT\ User Module,
+%D subtitle=Visual Counter,
+%D author=Aditya Mahajan,
+%D date=\currentdate,
+%D copyright=Aditya Mahajan,
+%D email=adityam <at> ieee <dot> org,
+%D license=Simplified BSD License]
+
+\writestatus{loading}{Visual Counter (ver: 2011.10.05)}
+
+\startmodule [visualcounter]
+
+\unprotect
+
+\startinterface all
+ \setinterfaceconstant {last} {last}
+ \setinterfaceconstant {palette} {palette}
+ \setinterfaceconstant {path} {path}
+\stopinterface
+
+\definenamespace
+ [visualcounter]
+ [ \c!type=module,
+ \c!name=visualcounter,
+ \c!command=\v!yes,
+ setup=\v!list,
+ \c!style=\v!yes,
+ \s!parent=visualcounter,
+ ]
+
+\setupvisualcounter
+ [ \s!counter=,
+ \c!n={\rawstructurecounter[\visualcounterparameter\s!counter]},
+ \c!text={\getstructurecounter[\visualcounterparameter\s!counter]},
+ \c!max\c!text={\laststructurecounter[\visualcounterparameter\s!counter]},
+ \c!last={\laststructurecounter[\visualcounterparameter\s!counter]},
+ \c!style=,
+ \c!color=,
+ \c!mp=visualcounter:countdown,
+ \c!palette=visualcounter:countdown,
+ \c!width=1EmWidth,
+ \c!height=1ExHeight,
+ \c!rulethickness=1bp,
+ \c!distance=1cm,
+ % Parameters passed to scale
+ \c!maxwidth=\maxdimen,
+ \c!maxheight=\maxdimen,
+ ]
+
+
+\def\usevisualcounter#{name}%
+ {\edef\currentvisualcounter{#{name}}%
+ \scale
+ [
+ \c!maxwidth=\visualcounterparameter\c!maxwidth,
+ \c!maxheight=\visualcounterparameter\c!maxheight,
+ ]{\useMPgraphic{\visualcounterparameter\c!mp}}}
+
+\unexpanded\def\getvisualcountertext
+ {\dosetvisualcounterattributes\c!style\c!color
+ \visualcounterparameter\c!text}
+
+\unexpanded\def\getmaxvisualcountertext
+ {\dosetvisualcounterattributes\c!style\c!color
+ \visualcounterparameter{\c!max\c!text}}
+
+%D \section {The counters}
+%D
+%D \subsection {SqareMarker}
+
+\definevisualcounter
+ [squaremarkers]
+ [ \c!mp=visualcounter:squaremarkers,
+ \c!palette=visualcounter:squaremarkers,
+ \c!width=1EmWidth,
+ \c!distance=1EmWidth,
+ ]
+
+\definepalet
+ [visualcounter:squaremarkers]
+ [active=orange,
+ past=blue,
+ future=gray]
+
+\startuseMPgraphic{visualcounter:squaremarkers}
+ begingroup ;
+
+ newnumeric n, m ;
+ % current count
+ n := \visualcounterparameter\c!n ;
+ % total count
+ m := max(\visualcounterparameter\c!last, 1) ;
+
+ newnumeric width ; width := \visualcounterparameter\c!width ;
+ newnumeric height ; height := \visualcounterparameter\c!height ;
+ newnumeric distance ; distance := \visualcounterparameter\c!distance ;
+
+ newpath marker ;
+
+ pickup pencircle scaled \visualcounterparameter\c!rulethickness ;
+
+ for i := 1 upto m :
+% fill marker shifted (i*(width + distance), 0)
+% hmm, I found no more elegant way of including the scaling
+ if i < n : marker := \visualcounterparameter{path} xyscaled (width, height) ;
+ fill marker shifted (i*(width + distance), 0) withcolor \MPcolor{\visualcounterparameter{\c!palette}:past}
+ elseif i = n : marker := \visualcounterparameter{path} xyscaled (width, 2*height) ;
+ fill marker shifted (i*(width + distance), -height) withcolor \MPcolor{\visualcounterparameter{\c!palette}:active}
+ else : marker := \visualcounterparameter{path} xyscaled (width, height) ;
+ fill marker shifted (i*(width + distance), 0) withcolor \MPcolor{\visualcounterparameter{\c!palette}:future}
+ fi ;
+ endfor ;
+ endgroup ;
+\stopuseMPgraphic
+
+%
+% save diff ;numeric diff;
+% diff = .3cm ;
+%
+% save w; numeric w;
+% w = xpart (lrcorner Field[Text][Text] - llcorner Field[Text][Text]) - diff ;
+%
+% save factor; numeric factor;
+% if NOfPages <= 1 :
+% factor = w ;
+% else :
+% factor = w/(NOfPages - 1) ;
+% fi ;
+%
+% save p; path p ;
+% p = unitsquare xyscaled (diff,diff)
+% shifted (xpart llcorner Field[Text][Text],0.85cm) ;
+%
+% for i = 1 upto NOfPages:
+% if PageNumber = i:
+% fill p xyscaled (0,2) shifted ( (i-1)*factor,-diff-0.85cm)
+% withcolor \MPcolor{simpleslides:contrastcolor} ;
+% else :
+% fill p shifted ( (i-1)*factor, 0)
+% withcolor \MPcolor{simpleslides:variantcolor} ;
+% fi ;
+% endfor ;
+
+%D
+%D \subsection {Dots}
+
+\definevisualcounter
+ [markers]
+ [ \c!mp=visualcounter:markers,
+ \c!palette=visualcounter:markers,
+ \c!width=1EmWidth,
+ \c!distance=1EmWidth,
+ path=unitcircle,
+ ]
+
+\definepalet
+ [visualcounter:markers]
+ [active=orange,
+ past=blue,
+ future=gray]
+
+\startuseMPgraphic{visualcounter:markers}
+ begingroup ;
+
+ newnumeric n, m ;
+ % current count
+ n := \visualcounterparameter\c!n ;
+ % total count
+ m := max(\visualcounterparameter\c!last, 1) ;
+
+ newnumeric width ; width := \visualcounterparameter\c!width ;
+ newnumeric distance ; distance := \visualcounterparameter\c!distance ;
+
+ newpath marker ;
+ marker := \visualcounterparameter{\c!path} %
+ xyscaled (width, width) ;
+
+ pickup pencircle scaled \visualcounterparameter\c!rulethickness ;
+
+ for i := 1 upto m :
+ fill marker shifted (i*(width + distance), 0) withcolor
+ if i < n : \MPcolor{\visualcounterparameter{\c!palette}:past}
+ elseif i = n : \MPcolor{\visualcounterparameter{\c!palette}:active}
+ else : \MPcolor{\visualcounterparameter{\c!palette}:future}
+ fi ;
+ endfor ;
+\stopuseMPgraphic
+
+%D \subsection {Count down}
+
+\definevisualcounter
+ [countdown]
+ [ \c!mp=visualcounter:countdown,
+ \c!palette=visualcounter:countdown,
+ \c!width=1EmWidth,
+ \c!height=1ExHeight,
+ \c!distance=1cm,
+ ]
+
+\definepalet
+ [visualcounter:countdown]
+ [active=orange,
+ past=blue,
+ future=gray]
+
+\startMPdefinitions
+ % mp-tool does not define new pair.
+ def newpair text v = forsuffixes i=v : save i ; pair i ; endfor ; enddef ;
+\stopMPdefinitions
+
+\startuseMPgraphic{visualcounter:countdown}
+ begingroup ;
+
+ % label
+ newpicture countertext ; countertext := textext("\getvisualcountertext") ;
+ newpicture max_countertext ; max_countertext := textext("\getmaxvisualcountertext") ;
+
+ newnumeric inner_diameter, outer_diameter ;
+ inner_diameter := 1.5 * max(bbwidth(max_countertext), bbheight(max_countertext));
+ outer_diameter := inner_diameter +
+ max(\visualcounterparameter\c!width, \visualcounterparameter\c!height) ;
+
+ newpath inner_circle, outer_circle ;
+ % make the circle start at 12 o'clock and go clockwise
+ inner_circle := reverse (fullcircle scaled inner_diameter) rotated 90;
+ outer_circle := reverse (fullcircle scaled outer_diameter) rotated 90;
+
+ newnumeric n, m ;
+ % current count
+ n := \visualcounterparameter\c!n ;
+ % total count
+ m := max(\visualcounterparameter\c!last, 1) ;
+
+ % boundary distance
+ newnumeric inner_boundary, outer_boundary ;
+ inner_boundary := \visualcounterparameter\c!distance/m * (inner_diameter)/(outer_diameter) ;
+ outer_boundary := \visualcounterparameter\c!distance/m ;
+
+ % step size
+ newnumeric inner_time, outer_time ;
+ inner_time := arclength (inner_circle)/m ;
+ outer_time := arclength (outer_circle)/m ;
+
+ newpath slice ;
+
+ newpair pt_inner_left, pt_inner_right ;
+ newpair pt_outer_left, pt_outer_right ;
+
+ for i = 1 upto m :
+ pt_inner_left := point ((i-1)*inner_time) on inner_circle ;
+ pt_inner_right := point (i*inner_time - inner_boundary) on inner_circle ;
+
+ pt_outer_left := point ((i-1)*outer_time) on outer_circle ;
+ pt_outer_right := point (i*outer_time - outer_boundary) on outer_circle ;
+
+ slice := inner_circle cutbefore pt_inner_left cutafter pt_inner_right
+ --- reverse (outer_circle cutbefore pt_outer_left cutafter pt_outer_right )
+ --- cycle ;
+
+ fill slice withcolor
+ if i < n : \MPcolor{\visualcounterparameter{\c!palette}:past}
+ elseif i = n : \MPcolor{\visualcounterparameter{\c!palette}:active}
+ else : \MPcolor{\visualcounterparameter{\c!palette}:future}
+ fi ;
+
+ endfor ;
+
+ label (countertext, origin) ;
+
+ endgroup ;
+
+\stopuseMPgraphic
+
+%D \subsection {Pulse line}
+
+\definevisualcounter
+ [pulseline]
+ [ \c!mp=visualcounter:pulseline,
+ \c!path={origin -- (((n-1)*width, 0) .. ((n-0.5)*width, -0.2height)
+ -- (n*width, height) -- ((n+0.5)*width, -0.2height)
+ .. ((n+1)*width,0)) -- ((m+1)*width, 0)
+ randomized 0.3width},
+ \c!palette=visualcounter:pulseline,
+ \c!width=0.5EmWidth,
+ \c!height=3ExHeight,
+ \c!rulethickness=1bp,
+ ]
+
+
+\definepalet
+ [visualcounter:pulseline]
+ [active=lightgreen,
+ past=darkgreen,
+ future=gray]
+
+\startuseMPgraphic{visualcounter:pulseline}
+ begingroup ;
+
+ newnumeric width ; width := \visualcounterparameter\c!width ;
+ newnumeric height ; height := \visualcounterparameter\c!height ;
+
+ numeric n ; n := \visualcounterparameter\c!n ;
+ numeric m ; m := max(\visualcounterparameter\c!last, 5) ;
+
+
+ newpath pulse ;
+ pulse := \visualcounterparameter\c!path ;
+
+ newpath helper_line ;
+ helper_line := (0,-height) -- (0,height) ;
+
+ newpair start_pulse, stop_pulse ;
+ start_pulse := pulse intersectionpoint (helper_line shifted ((n-1)*width, 0)) ;
+ stop_pulse := pulse intersectionpoint (helper_line shifted ((n+1)*width, 0)) ;
+
+
+ newpath past_pulse, active_pulse, future_pulse ;
+ past_pulse := pulse cutafter start_pulse ;
+ active_pulse := pulse cutbefore start_pulse cutafter stop_pulse ;
+ future_pulse := pulse cutbefore stop_pulse ;
+
+ pickup pencircle scaled \visualcounterparameter\c!rulethickness ;
+ draw past_pulse withcolor \MPcolor{\visualcounterparameter{\c!palette}:past} ;
+ draw active_pulse withcolor \MPcolor{\visualcounterparameter{\c!palette}:active} ;
+ draw future_pulse withcolor \MPcolor{\visualcounterparameter{\c!palette}:future} ;
+
+ endgroup ;
+\stopuseMPgraphic
+
+%D \subsection {Scratch Marks}
+
+\definevisualcounter
+ [scratchmarks]
+ [ \c!mp=visualcounter:scratchmarks,
+ \c!palette=visualcounter:scratchmarks,
+ \c!width=3bp,
+ \c!height=3ExHeight,
+ \c!distance=0.5EmWidth,
+ angle=75,
+ ]
+
+\definepalet
+ [visualcounter:scratchmarks]
+ [active=orange,
+ past=blue,
+ future=gray]
+
+\startuseMPgraphic{visualcounter:scratchmarks}
+ begingroup ;
+
+ linecap := rounded ;
+
+ newnumeric distance ; distance := \visualcounterparameter\c!distance ;
+ newnumeric width ; width := \visualcounterparameter\c!width ;
+ newnumeric height ; height := \visualcounterparameter\c!height ;
+ newnumeric theta ; theta := \visualcounterparameter{angle} ;
+
+ numeric n ; n := \visualcounterparameter\c!n ;
+ numeric m ; m := max(\visualcounterparameter\c!last, 1) ;
+
+
+ newpath left_marker, right_marker ;
+
+ left_marker := origin -- height*dir(theta) ;
+ right_marker := (-4*width, height*sind(theta)) -- origin ;
+
+ save marker ;
+ def marker (expr i) =
+ (if i mod 5 = 0 : right_marker else : left_marker fi)
+ shifted (i*distance, 0)
+ withcolor
+ if i < n : \MPcolor{\visualcounterparameter{\c!palette}:past}
+ elseif i = n : \MPcolor{\visualcounterparameter{\c!palette}:active}
+ else : \MPcolor{\visualcounterparameter{\c!palette}:future}
+ fi ;
+ enddef ;
+
+ pickup pencircle scaled \visualcounterparameter\c!width ;
+
+ for i := m downto 1 :
+ draw marker(i) ;
+ endfor ;
+
+ draw marker(n) ;
+
+ endgroup ;
+\stopuseMPgraphic
+
+%D \subsection {Maya markers}
+
+\definevisualcounter
+ [mayanumbers]
+ [ \c!mp=visualcounter:mayanumbers,
+ \c!palette=visualcounter:mayanumbers,
+ \c!width=1EmWidth,
+ \c!height=1ExHeight,
+ \c!distance=0.25EmWidth,
+ ]
+
+\definepalet
+ [visualcounter:mayanumbers]
+ [active=orange,
+ past=blue,
+ future=gray]
+
+
+\startuseMPgraphic{visualcounter:mayanumbers}
+ begingroup ;
+
+ newnumeric n, m ;
+ % current count
+ n := \visualcounterparameter\c!n ;
+ % total count
+ m := max(\visualcounterparameter\c!last, 1) ;
+
+ newnumeric distance ; distance := \visualcounterparameter\c!distance ;
+
+ newnumeric width ; width := \visualcounterparameter\c!width ;
+ newnumeric height; height := \visualcounterparameter\c!height ;
+
+ newnumeric linewidth ; linewidth := 4width + 5distance ;
+ newnumeric linedistance ; linedistance := 2distance ;
+
+ newpath marker;
+ marker := ((0,0.5height) .. (0.5width,-0.1height) .. (0.5width, -0.4height)
+ .. (0,-0.8height)
+ .. (-0.5width,-0.4height) .. (-0.5width, -0.1height) .. cycle) ;
+
+ newpath line ;
+ line := (-0.5width - distance, 0) .. (0.1width,0.8height)
+ --- (3.1width + 3distance, 0.8height) .. (3.5width + 4distance, 0) .. (3.6width + 2distance, -0.8height)
+ --- (0.1width, -0.8height) .. cycle ;
+
+ newpath boundary ;
+ boundary := (linewidth -0.5width - distance, 0.9height)
+ -- ( (1 + floor(m/5))*(linewidth+linedistance), 0.9height)
+ -- ( (1 + floor(m/5))*(linewidth+linedistance), -0.9height)
+ -- (linewidth -0.5width - distance, -0.9height)
+ -- cycle;
+
+
+ % Draw the filled solid lines
+ newnumeric linecount ; linecount := floor ((n - 1) / 5) ;
+ for i = 1 upto linecount :
+ fill line shifted (i*(linewidth + linedistance), 0)
+ withcolor \MPcolor{\visualcounterparameter{\c!palette}:past} ;
+ endfor
+
+ % Draw the filled dots
+ newnumeric offset ; offset := (linecount + 1)*(linewidth + linedistance) ;
+
+ newnumeric markercount ; markercount := n - linecount*5 ;
+ if markercount = 5 :
+ fill line shifted (offset,0)
+ withcolor
+ \MPcolor{\visualcounterparameter{\c!palette}:active} ;
+ else : for i = 1 upto markercount :
+ fill marker shifted (offset + (i-1)*(width+distance), 0 )
+ withcolor
+ if i = markercount :
+ \MPcolor{\visualcounterparameter{\c!palette}:active} ;
+ else :
+ \MPcolor{\visualcounterparameter{\c!palette}:past} ;
+ fi
+ endfor fi
+
+ % Draw the empty dots
+ newnumeric markermax ; markermax := min(m - linecount*5, 4) ;
+ if markercount < 4 :
+ for i = markercount + 1 upto markermax :
+ fill marker shifted (offset + (i-1)*(width+distance),0)
+ withcolor
+ \MPcolor{\visualcounterparameter{\c!palette}:future} ;
+ endfor
+ fi
+
+ for blockcount = linecount + 1 upto ceiling(m/5) :
+ offset := (blockcount + 1)*(linewidth + linedistance) ;
+ markercount := min(4, m - blockcount*5) ;
+ for i = 1 upto markercount :
+ fill marker shifted (offset + (i-1)*(width+distance),0)
+ withcolor
+ \MPcolor{\visualcounterparameter{\c!palette}:future} ;
+ endfor
+ endfor
+
+ setbounds currentpicture to boundary ;
+
+ endgroup ;
+
+\stopuseMPgraphic
+
+
+\protect
+
+\stopmodule
+