diff options
author | Hans Hagen <pragma@wxs.nl> | 2016-10-25 10:54:32 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-10-25 10:54:32 +0200 |
commit | f0bc9c17c5298a3a4645f28a39273f52c27c646a (patch) | |
tree | 89360fdd95a8e80462c740a3d6c0ae379c22bc63 /tex/context/modules/mkiv/s-present-banner.mkiv | |
parent | f46e5a9b112dd6c1601fd1734b03064b4336a262 (diff) | |
download | context-f0bc9c17c5298a3a4645f28a39273f52c27c646a.tar.gz |
2016-10-25 10:03:00
Diffstat (limited to 'tex/context/modules/mkiv/s-present-banner.mkiv')
-rw-r--r-- | tex/context/modules/mkiv/s-present-banner.mkiv | 132 |
1 files changed, 132 insertions, 0 deletions
diff --git a/tex/context/modules/mkiv/s-present-banner.mkiv b/tex/context/modules/mkiv/s-present-banner.mkiv new file mode 100644 index 000000000..2ecafe3b9 --- /dev/null +++ b/tex/context/modules/mkiv/s-present-banner.mkiv @@ -0,0 +1,132 @@ +%D \module +%D [ file=s-present-banner, +%D version=2016.04.30, % around +%D title=\CONTEXT\ Style File, +%D subtitle=Presentation Environment Banner, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D This style was made for the Bacho\TeX\ 2016 conference. The banner below +%D the text advances through the title. + +\startmodule[present-banner] + +\definecolor[maincolor] [b=.65] +\definecolor[othercolor][s=.35] + +\startluacode + function mp.Banner(s,mode) + -- local r = tex.count.realpageno + local r = tex.count.realpageno - 1 + local n = #s + local i = mode and 1 or 0 + local t = string.gsub(s,".",function(s) + if s == " " or i > n then + return s + elseif i == r then + i = i + 1 + if mode then + return "\\color[othercolor]{" .. s .. "}" + else + return "\\maincolor " .. s + end + else + i = i + 1 + return s + end + end) + mp.quoted(t) + end +\stopluacode + +\startuseMPgraphic{page} + StartPage ; + fill Page withcolor \MPcolor{maincolor} ; + draw anchored(image ( + % draw textext.top (lua.mp.Banner("\documentvariable{title}",true)) + draw textext.top (lua.mp.Banner("\documentvariable{title}",false)) + xsized (.9PaperWidth) + withcolor white; + ), center bottomboundary Page); + % fill Field[Text][Text] enlarged 10pt withcolor (\MPcolor{maincolor})/1.5 ; + fill Field[Text][Text] enlarged 10pt withcolor .1white ; + StopPage ; +\stopuseMPgraphic + +\setupbackgrounds + [page] + [background=page] + +\defineoverlay + [page] + [\useMPgraphic{page}] + +\setupbodyfont + [lucidaot,10pt] + +\setuppapersize + [S6] + +\setuplayout + [backspace=30pt, + width=middle, + height=middle, + topspace=30pt, + bottomspace=100pt, + header=0pt, + footer=0pt, + margin=0pt] + +\setupcolors + [textcolor=white] + +\setupwhitespace + [big] + +\setuphead + [chapter] + [style=\bfd, + after={\blank[big]}] + +\setuphead + [section] + [style=\bfa, + before=\blank, + after={\blank[medium]}] + +\definehighlight[nb][style=bold] + +\setupitemgroup[itemize][before=,after=] +\setupitemgroup[itemize][packed] + +\setupdocument + [title=Title, + subtitle=Subtitle, + location=\currentdate] + +\startsetups document:start + + \startstandardmakeup + + \raggedcenter + + \dontleavehmode\scale[width=1.00\textwidth]{\documentvariable{title}} \vfil + \dontleavehmode\scale[width=0.75\textwidth]{\documentvariable{subtitle}} \vfil + \dontleavehmode\scale[width=0.45\textwidth]{\documentvariable{location}} \vfil + + \stopstandardmakeup + +\stopsetups + +\stopmodule + +\continueifinputfile{s-present-banner.mkiv} + +\usemodule[present-common] + +\inputpresentationfile{bachotex/2016/bachotex-2016-opentype.tex} |