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-balls.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-balls.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/modules/mkiv/s-present-balls.mkiv | 194 |
1 files changed, 194 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-present-balls.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-present-balls.mkiv new file mode 100644 index 00000000000..6774b83407f --- /dev/null +++ b/Master/texmf-dist/tex/context/modules/mkiv/s-present-balls.mkiv @@ -0,0 +1,194 @@ +%D \module +%D [ file=s-present-balls, % s-pre-15, +%D version=1999.09.01, +%D title=\CONTEXT\ Style File, +%D subtitle=Presentation Environment Balls, +%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. + +\startmodule[present-balls] + +%D This is one of the styles I made for the presentation on the \NTS\ project at +%D Euro\TeX\ 1998. You need balls to let \TEX\ typeset graphics, but this style +%D demonstrates that it can be done. +%D +%D This presentation is meant for presentations that build up an idea stepwise. +%D +%D \starttyping +%D \TitlePage{Do you know \TEX ?} +%D +%D \StartIdea +%D \StartItem We use \TEX\ for typesetting \unknown \StopItem +%D \StartItem mathematical text \unknown \StopItem +%D \StartItem but also for text that has no math \unknown \StopItem +%D \StartItem or presentations like this \unknown \StopItem +%D \StartItem and whatever you can come up with! \StopItem +%D \StopIdea +%D \stoptyping +%D +%D The basic layout is rather simple and used as much of the screen as possible. + +\setuppapersize + [S6][S6] + +\setuplayout + [backspace=25pt, + topspace=25pt, + width=middle, + height=middle, + header=0pt, + footer=0pt] + +\setupinteraction + [state=start, + display=new, + color=LineColor, + contrastcolor=LineColor, + click=no] + +\setupinteractionscreen + [option=max] + +\startmode[asintended,atpragma] \setupbodyfont[lucidaot] \stopmode + +\setupbodyfont[14.4pt] + +%D We use a lot of color. You can remap them if you want different ones. The ideas +%D circulate over the colors. + +\definecolor[TextColor][s=.8] +\definecolor[PageColor][s=.6] +\definecolor[LineColor][s=.4] + +\definecolor[red] [r=.4] \definecolor[cyan] [g=.4,b=.4] +\definecolor[green][g=.4] \definecolor[magenta][r=.4,b=.4] +\definecolor[blue] [b=.4] \definecolor[yellow] [r=.4,g=.4] + +\definecolor[linecolor 1][red] \definecolor[linecolor 5][cyan] +\definecolor[linecolor 2][green] \definecolor[linecolor 6][magenta] +\definecolor[linecolor 3][blue] \definecolor[linecolor 4][yellow] + +%D We use variables to make sure that the graphics are reused but unique. + +\setupMPvariables[pageframe][pagecolor=PageColor,linecolor=LineColor] +\setupMPvariables[textframe][textcolor=TextColor,linecolor=LineColor] + +\setupbackgrounds + [page] + [background={pageframe,nextpage}] + +\defineoverlay [pageframe] [\uniqueMPgraphic{pageframe}] +\defineoverlay [textframe] [\uniqueMPgraphic{textframe}] +\defineoverlay [nextpage] [\overlaybutton{forward}] + +\startuniqueMPgraphic{pageframe}{pagecolor,linecolor} + path p ; p := fullsquare xyscaled (OverlayWidth,OverlayHeight) ; + pickup pencircle scaled 10pt ; + fill p withcolor \MPvar{pagecolor} ; + draw p withcolor \MPvar{linecolor} ; +\stopuniqueMPgraphic + +\startuniqueMPgraphic{textframe}{textcolor,linecolor} + path p ; p := fullcircle xyscaled (OverlayWidth,OverlayHeight) ; + pickup pencircle scaled 10pt ; + fill p withcolor \MPvar{textcolor} ; + draw p withcolor \MPvar{linecolor} ; +\stopuniqueMPgraphic + +%D The rest of the file implements the nasty part: typesetting text embedded in a +%D graphic. The text is collected in a box so that we can reuse it. + +\newbox \CollectedIdeas +\newcount\CurrentTopic + +\unexpanded\def\StartItem + {\setbox\CollectedIdeas=\hbox\bgroup + \ifdim\wd\CollectedIdeas>\zeropoint + \unhbox\CollectedIdeas + \hskip25pt + \fi + \setbox\scratchbox=\hbox\bgroup + \framed + [width=160pt, + height=160pt, + align=middle, + frame=off, + background=textframe, + offset=15pt, + top=\vfill, + bottom=\vfill] + \bgroup} + +\unexpanded\def\StopItem + {\egroup + \egroup + \setbox\scratchbox=\hbox{\lower.5\ht\scratchbox\box\scratchbox}% + \ht\scratchbox=.5\ht\scratchbox + \dp\scratchbox= \ht\scratchbox + \box\scratchbox + \egroup + \startstandardmakeup + \dontcomplain + \leftskip 0pt plus 50pt + \rightskip 0pt plus 50pt + \parfillskip 0pt + \baselineskip 100pt + \unhcopy\CollectedIdeas + \stopstandardmakeup} + +\unexpanded\def\StartIdea + {\ifnum\CurrentTopic=6 + \global\CurrentTopic\plusone + \else + \global\advance\CurrentTopic\plusone + \fi + \definecolor[LineColor][linecolor \number\CurrentTopic] + \setbox\CollectedIdeas\null} + +\unexpanded\def\StopIdea + {} + +\unexpanded\def\StartTitlePage + {\startstandardmakeup + \setupalign[middle] + \unexpanded\def\\{\vfil\bfb\setupinterlinespace} + \bfd\setupinterlinespace + \vfil} + +\unexpanded\def\StopTitlePage + {\vfil\vfil + \stopstandardmakeup} + +\unexpanded\def\TitlePage#1% + {\StartTitlePage#1\StopTitlePage} + +\startsetups document:start + \StartTitlePage + \documentvariable{title} + \doifsomething {\documentvariable{subtitle}} { + \\ + \documentvariable{subtitle} + } + \doifsomething {\documentvariable{location}} { + \\ + \documentvariable{location} + } + \StopTitlePage +\stopsetups + +\startsetups document:stop + % +\stopsetups + +\stopmodule + +\continueifinputfile{s-present-balls.mkiv} + +\usemodule[present-common] + +\inputpresentationfile{examples/present-balls-001.tex} |