From 51b9ba900e58ddc023fb48e9f1cecb304ba24958 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 2 Oct 2011 00:16:41 +0000 Subject: context-simpleslides, and find scripts/context/lua/third/* (1oct11) git-svn-id: svn://tug.org/texlive/trunk@24165 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/context/interface/third/t-simpleslides.xml | 2 + .../third/simpleslides/simpleslides-c-default.tex | 179 +++++++++++++++++++++ .../third/simpleslides/simpleslides-s-Shaded.tex | 29 +++- .../third/simpleslides/simpleslides-s-Swoosh.tex | 2 +- .../context/third/simpleslides/t-simpleslides.tex | 12 +- 5 files changed, 213 insertions(+), 11 deletions(-) create mode 100644 Master/texmf-dist/tex/context/third/simpleslides/simpleslides-c-default.tex (limited to 'Master/texmf-dist/tex/context') diff --git a/Master/texmf-dist/tex/context/interface/third/t-simpleslides.xml b/Master/texmf-dist/tex/context/interface/third/t-simpleslides.xml index 200d25df4a5..3b9be870b91 100644 --- a/Master/texmf-dist/tex/context/interface/third/t-simpleslides.xml +++ b/Master/texmf-dist/tex/context/interface/third/t-simpleslides.xml @@ -23,10 +23,12 @@ + + diff --git a/Master/texmf-dist/tex/context/third/simpleslides/simpleslides-c-default.tex b/Master/texmf-dist/tex/context/third/simpleslides/simpleslides-c-default.tex new file mode 100644 index 00000000000..b6d19de0fa8 --- /dev/null +++ b/Master/texmf-dist/tex/context/third/simpleslides/simpleslides-c-default.tex @@ -0,0 +1,179 @@ +%D \module +%D [ file=simpleslides-c-default, +%D version=2010.09.20 +%D title=\CONTEXT\ Style File, +%D subtitle=Presentation Module simpleslides --- Default counter setup, +%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. + +\writestatus{simpleslides}{loading default counter setup} + +\startmodule[simpleslides-c-default] + +\unprotect + +%D Attempt to make the counters for the simpleslides module more "modular." +%D This file is called by t-simpleslides.tex and provides the metapost code for +%D page counters which are then included in the backgrounds of the style +%D modules. + +% \def\setupSlideCounter% +% {\dosingleargument\dosetupSlideCounter} +% +% \def\dosetupSlideCounter[#1]% +% {\setvariables[simpleslides:counter] +% [#1]} +% +% \processaction +% [\getvariable{simpleslides:counter}{alternative}] +% [ a=>\def\simpleslidescounter{simpleslides:shaded:counter1}, +% b=>\def\simpleslidescounter{simpleslides:shaded:counter2}, +% c=>\def\simpleslidescounter{simpleslides:shaded:counter3}, +% \v!default=>\def\simpleslidescounter{simpleslides:shaded:counter1}, +% \v!unknown=>\def\simpleslidescounter{simpleslides:shaded:counter1}] + +\def\simpleslidescounter{simpleslides:shaded:counter5} + +\startuseMPgraphic{simpleslides:shaded:counter1} +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 - 2) ; +for i = 2 upto NOfPages : + p[i] = unitcircle scaled a shifted (BackSpace + (i-2)*factor, (2cm - a)/2) ; + if i = PageNumber : + 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 ; +\stopuseMPgraphic + +\startuseMPgraphic{simpleslides:shaded:counter2} +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:variantcolor} + else : \MPcolor{simpleslides:contrastcolor} + fi ; +endfor ; +\stopuseMPgraphic + +\startuseMPgraphic{simpleslides:shaded:counter3} +save diff ;numeric diff; +if NOfPages <= 25: + diff = 0.4cm ; +elseif NOfPages <= 35: + diff = 0.3cm ; +else : + diff = 0.2cm ; +fi ; + +save factor; numeric factor; +factor = TextWidth/(NOfPages - 2) ; + +save p; path p ; +p = unitsquare xyscaled (diff,diff) + shifted (BackSpace,0.85cm) ; + +for i = 2 upto NOfPages: + if PageNumber = i: + fill p xyscaled (0,2) shifted ( (i-2)*factor,-diff-0.85cm) + withcolor \MPcolor{simpleslides:contrastcolor} ; + else : + fill p shifted ( (i-2)*factor, 0) + withcolor \MPcolor{simpleslides:variantcolor} ; + fi ; +endfor ; +\stopuseMPgraphic + +\startuseMPgraphic{simpleslides:shaded:counter4} +save p ; +path p[] ; +linejoin := rounded ; + +p[1] := unitsquare xyscaled(TextWidth,1cm) shifted (BackSpace,0.8cm) ; +save i ; +numeric i; +i = PageNumber/NOfPages ; + +p[2] = ulcorner p[1] -- urcorner p[1] ; +p[3] = llcorner p[1] -- lrcorner p[1] ; + +save o; +pair o[] ; + +o[1] := point i along p[2] ; +o[2] := point i along p[3] ; + +p[4] = ulcorner p[1] -- o[1] -- o[2] -- llcorner p[1] -- cycle ; + +fill p[1] withcolor 0.7\MPcolor{simpleslides:backgroundcolor} ; +fill p[4] withcolor \MPcolor{simpleslides:contrastcolor} ; + +pickup pencircle scaled 1pt ; +draw ulcorner p[1] -- urcorner p[1] -- lrcorner p[1] withcolor 0.3white ; +draw lrcorner p[1] -- llcorner p[1] -- ulcorner p[1] withcolor 0.8white ; + +%clip currentpicture to p[4] ; + +% linear_shade(p[1],0,white,red) ; +% +% % \MPcolor{simpleslides:backgroundcolor}, +% % \MPcolor{simpleslides:contrastcolor}) ; +% +% +% +% +\stopuseMPgraphic + +\startuseMPgraphic{simpleslides:shaded:counter5} +save a,b ; +numeric a,b ; +save p ; +path p ; +p = unitsquare xyscaled (3mm,7mm) randomized 2mm shifted (BackSpace, 5mm) ; +fill p withcolor red ; +% 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 : red +% else : yellow +% fi ; +% endfor ; +\stopuseMPgraphic + + +\protect + +\stopmodule 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 25869b1e0d4..a8da39b1c2c 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 @@ -85,12 +85,33 @@ \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}) ; + \MPcolor{simpleslides:backgroundcolor}, + \MPcolor{simpleslides:variantcolor}) ; if PageNumber >1: - \includeMPgraphic{\simpleslidescounter} ; -fi + 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/simpleslides-s-Swoosh.tex b/Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-Swoosh.tex index 86b20718664..3230523e1b4 100644 --- a/Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-Swoosh.tex +++ b/Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-Swoosh.tex @@ -94,7 +94,7 @@ fi ; \doifsetupselse{simpleslides:setups:\moduleparameter{simpleslides}{counter}} {\setups{simpleslides:setups:\moduleparameter{simpleslides}{counter}}} - {\setups{simpleslides:setups:dot}} + {\setups{simpleslides:setups:circle}} \doif% {\moduleparameter{simpleslides}{randomize}} diff --git a/Master/texmf-dist/tex/context/third/simpleslides/t-simpleslides.tex b/Master/texmf-dist/tex/context/third/simpleslides/t-simpleslides.tex index db81ce6737d..c39cb5dd0a8 100644 --- a/Master/texmf-dist/tex/context/third/simpleslides/t-simpleslides.tex +++ b/Master/texmf-dist/tex/context/third/simpleslides/t-simpleslides.tex @@ -71,13 +71,13 @@ [simpleslides-s] [default] -\usemodule - [simpleslides-c] - [default] +% \usemodule +% [simpleslides-c] +% [default] -\doiffileelse{\currentmoduleparameter\c!style} - {\usemodule[\currentmoduleparameter\c!style]} - {\usemodule[simpleslides-s][\currentmoduleparameter\c!style]} +\doiffileelse{s-\currentmoduleparameter\c!style} + {\ReadFile{s-\currentmoduleparameter\c!style}} + {\usemodule[simpleslides-s-\currentmoduleparameter\c!style]} \protect -- cgit v1.2.3