diff options
author | Karl Berry <karl@freefriends.org> | 2017-04-19 23:04:15 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-04-19 23:04:15 +0000 |
commit | f74161ca4e7eb3c5af9afcbe92522ae3b58987c1 (patch) | |
tree | 3c30a13df5ac7968195c85070a2b074578e669d2 /Master/texmf-dist/tex/context/modules/mkiv/s-present-banner.mkiv | |
parent | 1d5a55ac8f5506a7ae9cfca52f4b588182e199d4 (diff) |
context beta/cont-tmf.zip (Apr 16 12:55)
git-svn-id: svn://tug.org/texlive/trunk@43931 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/modules/mkiv/s-present-banner.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/modules/mkiv/s-present-banner.mkiv | 132 |
1 files changed, 132 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-present-banner.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-present-banner.mkiv new file mode 100644 index 00000000000..d93c033f28d --- /dev/null +++ b/Master/texmf-dist/tex/context/modules/mkiv/s-present-banner.mkiv @@ -0,0 +1,132 @@ + +%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} |