summaryrefslogtreecommitdiff
path: root/tex/context/modules/mkiv
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2018-09-30 20:33:04 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2018-09-30 20:33:04 +0200
commite3ad6b783e6162de6dad5531299e69c3d3079b9c (patch)
tree5b78f96f02bd8eb4b784484aa720930959afa404 /tex/context/modules/mkiv
parentd6c24a529d922ac67d2a30595c52b6b9547dce77 (diff)
downloadcontext-e3ad6b783e6162de6dad5531299e69c3d3079b9c.tar.gz
2018-09-30 19:42:00
Diffstat (limited to 'tex/context/modules/mkiv')
-rw-r--r--tex/context/modules/mkiv/s-cgj.mkiv714
-rw-r--r--tex/context/modules/mkiv/s-present-dark.mkiv357
2 files changed, 1071 insertions, 0 deletions
diff --git a/tex/context/modules/mkiv/s-cgj.mkiv b/tex/context/modules/mkiv/s-cgj.mkiv
new file mode 100644
index 000000000..2950a799d
--- /dev/null
+++ b/tex/context/modules/mkiv/s-cgj.mkiv
@@ -0,0 +1,714 @@
+%D \module
+%D [file=s-cgj.mkiv,
+%D version=2018.09.28,
+%D title=Context group style file,
+%D subtitle=CG-journal base style,
+%D author={Adrian Egger, W. Egger, Taco Hoekwater},
+%D date=\currentdate,
+%D copyright={Context Group}]
+
+%D \type {\enablemode[draft]} has to come before loading the style. Maybe some
+%D day I'll make something more official and then some \type {everydraft} or so.
+
+% Fixme and todo ...
+
+\startmodule[cgj]
+
+\definecolor[NoteColor][g=1,r=.25,b=.25]
+\definecolor[WarnColor][r=1,g=.25,b=.25]
+
+\unexpanded\def\todo#1%
+ {\startframedtext[background=color,backgroundcolor=NoteColor]
+ \dontleavehmode\start\bf TODO:\stop~~#1\par
+ \stopframedtext}
+
+\unexpanded\def\fixme#1%
+ {\startframedtext[background=color,backgroundcolor=WarnColor]
+ \dontleavehmode\start\bf FIXME:\stop~~#1\par
+ \stopframedtext }
+
+%D Base set of variables. The actual values are set in the file
+%D CG-journal.
+
+\setvariables
+ [CG-Journal]
+ [Title={Journal},
+ RunningTitle={Journal},
+ SubTitle={From the base set of variables},
+ Version=1.0,
+ NOFColumns=2]
+
+\startmode[onecolumn,fullwidth]
+ \setvariables
+ [CG-Journal]
+ [NOFColumns=1]
+\stopmode
+
+% Fonts setup.
+
+\usetypescriptfile[plex]
+
+\starttypescript [cgj]
+ \definetypeface [cgj] [rm] [serif][ibmplex-light] [default]
+ \definetypeface [cgj] [ss] [sans] [ibmplex-light] [default]
+ \definetypeface [cgj] [mm] [math] [palatino] [default]
+ \definetypeface [cgj] [tt] [mono] [ibmplex] [default][rscale=0.9]
+\stoptypescript
+
+\starttypescript [cgj-light]
+ \definetypeface [cgj-light] [rm] [serif][ibmplex-extralight] [default]
+ \definetypeface [cgj-light] [ss] [sans] [ibmplex-extralight] [default]
+ \definetypeface [cgj-light] [mm] [math] [palatino] [default]
+ \definetypeface [cgj-light] [tt] [mono] [ibmplex-extralight] [default][rscale=0.9]
+\stoptypescript
+
+\starttypescript [cgj-extralight]
+ \definetypeface [cgj-extralight] [rm] [serif][ibmplex-thin] [default]
+ \definetypeface [cgj-extralight] [ss] [sans] [ibmplex-thin] [default]
+ \definetypeface [cgj-extralight] [mm] [math] [palatino] [default]
+ \definetypeface [cgj-extralight] [tt] [mono] [ibmplex-thin] [default][rscale=0.9]
+\stoptypescript
+
+\usebodyfont
+ [cgj-light,cgj-extralight]
+
+\setupbodyfont
+ [cgj,ss,10pt]
+
+\definebodyfontenvironment[10pt][interlinespace=13pt]
+\definebodyfontenvironment[12pt][interlinespace=16pt]
+\definebodyfontenvironment[16pt][interlinespace=20pt]
+
+\setupinterlinespace
+ [line=13pt]
+
+\let\sl\it
+
+%D Path to the logos
+
+\setupexternalfigures
+ [directory=./Logos,
+ location={global,local,default}]
+
+%D Logos: black logo only.
+
+\useexternalfigure
+ [Logo]
+ [cg_corp_logo_loop_black_cmyk]
+ [width=30mm,
+ height=19mm]
+
+%D Black logo with text
+
+\useexternalfigure
+ [LogoText]
+ [cg_corp_logo_text_black_cmyk]
+ [width=50mm,
+ height=35.2mm]
+
+%D Colors
+
+\definecolor[CGlightblue][c=1,m=.15,y=0,k=0]
+\definecolor[CGdeepblue] [c=1,m=.8,y=0,k=.3]
+\definecolor[CGgray] [c=0,m=0,y=0,k=.1]
+
+%D Article styles
+
+\definealternativestyle
+ [Articleheading]
+ [{\switchtobodyfont[16pt,ss]\bf}]
+
+\definealternativestyle
+ [Articlesubheading]
+ [{\switchtobodyfont[16pt,ss]\tf}]
+
+\definealternativestyle
+ [Authorname]
+ [{\switchtobodyfont[12pt,ss]\it}]
+
+\definealternativestyle
+ [Sectionheading]
+ [{\switchtobodyfont[12pt,ss]\bf\setupinterlinespace[line=12pt]}]
+
+\definealternativestyle
+ [Subsectionheading]
+ [{\switchtobodyfont[cgj-light,10pt,ss]\bf\setupinterlinespace[line=10pt]}]
+
+\definealternativestyle
+ [IntroCopy]
+ [{\switchtobodyfont[12pt,ss]\tf}]
+
+\definealternativestyle
+ [PagenumberStyle]
+ [{\switchtobodyfont[cgj-light,10pt,ss]\bf}]
+
+%D Headerstyles:Breadcrumbs
+
+\definealternativestyle
+ [BreadcrumbMd]
+ [{\switchtobodyfont[cgj-light,10pt,ss]\bf}]
+
+\definealternativestyle
+ [BreadcrumbRg]
+ [{\switchtobodyfont[cgj,10pt,ss]}]
+
+\definealternativestyle
+ [BreadcrumbLt]
+ [{\switchtobodyfont[10pt,ss]\tf}]
+
+\definealternativestyle
+ [BreadcrumbTh]
+ [{\switchtobodyfont[cgj-light,10pt,ss]\tf}]
+
+%D Captionstyles
+
+\definealternativestyle
+ [Captionheading]
+ [{\switchtobodyfont[8pt,ss]\bf\setupinterlinespace[line=8pt]}]
+
+\definealternativestyle
+ [Captiontext]
+ [{\switchtobodyfont[8pt,ss]\tf\setupinterlinespace[line=8pt]}]
+
+%D Article signature
+
+\definealternativestyle
+ [Signaturestyle]
+ [{\switchtobodyfont[10pt,ss]\it}]
+
+%D Article footnotes
+
+\definealternativestyle
+ [Articlefootnotes]
+ [{\switchtobodyfont[8pt,ss]\tf}]
+
+%D Index and TOC styles
+
+\definealternativestyle
+ [IndexContents]
+ [{\switchtobodyfont[16pt,ss]\bf\setupinterlinespace[line=18pt]}]
+
+\definealternativestyle
+ [IndexArticleTitle]
+ [{\switchtobodyfont[12pt,ss]\tf\setupinterlinespace[line=20pt]}]
+
+\definealternativestyle
+ [IndexNumber]
+ [{\switchtobodyfont[12pt,ss]\bf\setupinterlinespace[line=20pt]}]
+
+\definealternativestyle
+ [IndexAuthor]
+ [{\switchtobodyfont[12pt,ss]\it\setupinterlinespace[line=20pt]}]
+
+%D Math: still missing.
+
+%D Verbatim
+
+\definealternativestyle
+ [DisplayMonospaced]
+ [\tt]
+
+\definealternativestyle
+ [DisplayMonospacedX]
+ [{\switchtobodyfont[8pt,tt]}]
+
+\definealternativestyle
+ [DisplayMonospacedS]
+ [{\switchtobodyfont[9pt,tt]\setupinterlinespace[line=10pt]}]
+
+%D Blank adjustment
+
+\defineblank[CGblank] [6pt]
+\defineblank[BigCGblank] [24pt]
+\defineblank[MediumCGblank][12pt]
+
+%D Paper definition
+
+\definepapersize
+ [Journal]
+ [width=210mm,
+ height=266mm]
+
+\setuppapersize
+ [Journal]
+ [Journal]
+
+%D General layout
+
+\definelayout
+ [General]
+ [topspace=18mm,
+ backspace=28mm,
+ header=5mm,
+ headerdistance=7mm,
+ footer=5mm,
+ footerdistance=5mm,
+ width=157mm,
+ height=224mm,
+ marking=on]
+
+\definelayout
+ [Content]
+ [topspace=18mm,
+ backspace=28mm,
+ header=5mm,
+ headerdistance=7mm,
+ footer=0mm,
+ footerdistance=0mm,
+ width=157mm,
+ height=224mm,
+ margindistance=4mm,
+ rightmargin=21mm,
+ leftmargin=21mm,
+ marking=on]
+
+\definelayout
+ [Imprint]
+ [topspace=18mm,
+ backspace=28mm,
+ header=5mm,
+ headerdistance=7mm,
+ footer=5mm,
+ footerdistance=5mm,
+ width=107mm,
+ height=224mm,
+ margindistance=4mm,
+ rightmargin=45.3mm,
+ leftmargin=21mm,
+ marking=on]
+
+\definelayout
+ [SingleColumn]
+ [topspace=18mm,
+ backspace=55mm,
+ header=5mm,
+ headerdistance=7mm,
+ footer=5mm,
+ footerdistance=5mm,
+ width=130mm,
+ height=224mm,
+ margindistance=4mm,
+ leftmargin=48mm,
+ rightmargin=21mm,
+ marking=on]
+
+%D Pagenumbering: Pagenumber is set in the footer
+
+\setuppagenumbering
+ [location=,
+ alternative=doublesided]
+
+%D Head-definitions
+
+\setuphead
+ [title]
+ [style=Articleheading,
+ after={\blank[BigCGblank]},
+ page=yes]
+
+\setuphead
+ [part]
+ [placehead=no,
+ after=,
+ before=,
+ page=no,
+ numbercommand=,
+ expansion=yes]
+
+\setuphead
+ [section]
+ [style=Sectionheading,
+ before={\blank[BigCGblank]},
+ after={\blank[CGblank]},
+ sectionstopper={.},
+ distance=4pt,
+ align={flushleft,nothyphenated},
+ resetnumber=yes,
+ continue=yes]
+
+\setuphead
+ [subsection]
+ [style=Subsectionheading,
+ before={\blank[CGblank]},
+ after={\blank[CGblank]},
+ sectionstopper=,
+ distance=4pt,
+ align={flushleft,nothyphenated},
+ resetnumber=yes,
+ continue=yes]
+
+\setuphead
+ [subject]
+ [style=Sectionheading,
+ before={\blank[BigCGblank]},
+ after=]
+
+\setuphead
+ [subsubject]
+ [style=Subsectionheading,
+ before={\blank[CGblank]},
+ after={\blank[CGblank]},
+ sectionstopper=]
+
+%D A special head for the footnote section in multicolumn mode excuse the low-level
+%D rule, I wanted it to look like the start of footnotes in single column mode. (TH)
+
+\definehead
+ [footnotesubject]
+ [subject]
+
+\setuphead
+ [footnotesubject]
+ [style=Sectionheading,
+ before={\kern -13pt},
+ after={\smash{\lower 13pt\hbox{\vrule width 2.5cm height 1pt depth 0pt}}}]
+
+
+%D The setup of the columns is done at the moment columns are started (see end
+%D of file)
+
+%D Index/TOC page setups
+
+\definelistalternative
+ [CGJ:Index]
+ [renderingsetup=CGJ:Indexheading]
+
+\definelistalternative
+ [CGJ:Index:Chapter]
+ [renderingsetup=CGJ:Indexheading:Chapter]
+
+\startsetups[CGJ:Indexheading:Chapter]
+ \listparameter{before}
+ \vbox \listboxproperties{all} {
+ \forgetall
+ \dontleavehmode
+ \listrenderingsynchronize
+ \hbox to 15mm{
+ \bgroup
+ \useliststyleandcolor{numberstyle}{numbercolor}
+ \currentlistentrypagenumber
+ \egroup}
+ \bgroup
+ \useliststyleandcolor{textstyle}{textcolor}
+ \smash{\currentlistentrytitle}%
+ \egroup
+ }
+ \par
+ \listparameter{after}
+\stopsetups
+
+\startsetups[CGJ:Indexheading]
+ \listparameter{before}
+ \vbox \listboxproperties{all} {
+ \forgetall
+ \dontleavehmode
+ \listrenderingsynchronize
+ \hbox to 15mm{
+ \bgroup
+ \useliststyleandcolor{numberstyle}{numbercolor}
+ \currentlistentrypagenumber
+ \egroup}
+ \bgroup
+ \useliststyleandcolor{textstyle}{textcolor}
+ \currentlistentrytitle
+ \egroup
+ \par
+ }
+ \par
+ \listparameter{after}
+\stopsetups
+
+\setuplist
+ [part]
+ [before={\blank[CGblank]},
+ after=,
+ style=IndexContents,
+ numberstyle=\IndexNumber,
+ textstyle=\IndexArticleTitle,
+ prefix=no,
+ alternative=CGJ:Index:Chapter]
+
+%D Captions
+
+\setupcaptions
+ [suffix={.},
+ headstyle=\Captionheading,
+ style=\Captiontext,
+ distance=6pt]
+
+\setupcaption[figure][way=bypart]
+\setupcaption[table] [way=bypart]
+
+%D Datacollection: article parameters (other fields and defaults)
+
+\unexpanded\def\CGJBibData[#1]%
+ {\getparameters
+ [CGJ]
+ [SubTitle=,
+ RunningAuthor=,
+ RunningTitle=Example,
+ Email=,
+ Address=,
+ Page=1,
+ Title={My Article},
+ Author={Example Author},
+ Period=,
+ Number=,
+ Year=,
+ TocAuthor=,
+ TocTitle=,
+ #1]%
+ \doifnothing
+ {\CGJRunningTitle}
+ {\let\CGJRunningTitle\CGJTitle}%
+ \doifnothing
+ {\CGJRunningAuthor}
+ {\let\CGJRunningAuthor\CGJAuthor}%
+ \doifnothing
+ {\CGJTocAuthor}
+ {\let\CGJTocAuthor\CGJAuthor}%
+ \doifnothing
+ {\CGJTocTitle}
+ {\let\CGJTocTitle\CGJTitle}%
+ \setvariables
+ [CGJToc]
+ [Author=\CGJTocAuthor,
+ Title=\CGJTocTitle]% for TOC
+ }
+
+\unexpanded\def\dostartArticle[#1]
+ {\CGJBibData[#1]
+ \doifelse
+ {\getvariable{CG-Journal}{NOFColumns}}
+ {1}
+ {\doifmodeelse{fullwidth}
+ {\setuplayout[General]}
+ {\setuplayout[SingleColumn]}}
+ {\setupnotes[location=none]
+ \setuplayout[General]}%
+ \bgroup
+ {\switchtobodyfont[16pt]\Articleheading\CGJTitle\par}
+ {\doifsomething{\CGJSubTitle}
+ {\switchtobodyfont[16pt]\Articlesubheading\CGJSubTitle\par}}
+ {\doifsomething{\CGJAuthor}
+ {\switchtobodyfont[12pt]\Authorname \CGJAuthor}\par}
+ \part
+ {\getvariable{CGJToc}{Title}%
+ \doifsomething{\getvariable{CGJToc}{Author}}{ \emdash\ }%
+ \IndexAuthor\getvariable{CGJToc}{Author}}
+ \godown[13pt]%
+ \egroup
+ \par
+ \hyphenpenalty1000\relax}
+
+\unexpanded\def\startArticle
+ {\dosingleempty\dostartArticle}
+
+\def\signArticle
+ {}
+
+%D In multicolumn mode, footnotes come are at the end of the article:
+
+\startsetups article:after
+ \startfootnotesubject[title=]
+ \placefootnotes
+ \stopfootnotesubject
+\stopsetups
+
+\unexpanded\def\stopArticle
+ {\doifelse{\getvariable{CG-Journal}{NOFColumns}}{1}
+ {\par
+ \signArticle}
+ {\setups{article:after}
+ \par
+ \signArticle
+ \stoppagecolumns}
+ \page}
+
+\unexpanded\def\startAbstract
+ {\bgroup
+ \switchtobodyfont[12pt]
+ \IntroCopy}
+
+\unexpanded\def\stopAbstract
+ {\par
+ \egroup
+ \finishAbstract}
+
+\unexpanded\def\finishAbstract
+ {\doifelse {\getvariable{CG-Journal}{NOFColumns}} {1}
+ {\blank[BigCGblank]}
+ {\vbox{\blank[BigCGblank]}%
+ \par
+ \startpagecolumns[balance=yes,distance=12pt,page=no,n=\getvariable{CG-Journal}{NOFColumns}]
+ \setupitemgroup[itemize][packed]
+ \setuplayout[grid=yes]} % grid mode only in columns
+ }
+
+
+\unexpanded\def\noAbstract
+ {\kern -24pt
+ \finishAbstract}
+
+%D Headertexts
+
+\startsetups[Header:texts]
+ \setupheadertexts
+ [] [{{\BreadcrumbLt\CGJRunningTitle}{\BreadcrumbTh\doifsomething{\CGJRunningAuthor}{\ > }\CGJRunningAuthor}}] %odd
+ [{\BreadcrumbMd contextgroup}{\BreadcrumbRg\ > \getvariable{CG-Journal}{RunningTitle}}] [] %even
+\stopsetups
+
+%D Footertexts
+
+\startsetups[Footer:texts]
+ \setupfootertexts
+ [] [\PagenumberStyle\pagenumber]
+ [\PagenumberStyle\pagenumber] []
+\stopsetups
+
+%D Setup tolerance, stretch.
+
+\setuptolerance
+ [tolerant,stretch]
+
+%D Setting up footnotes.
+
+\setupnotation
+ [footnote]
+ [way=bypart,
+ rule=on]
+
+%D Adjustments to the container containing the footnotes.
+
+\setupnote
+ [footnote]
+ [frame=off,
+ topframe=off ,
+ framecolor=black,
+ background=,
+ rulecolor=black, %% the line above the inserts
+ rulethickness=1pt,
+ next={ },
+ split=verystrict,
+ scope=page,
+ style=Articlefootnotes]
+
+\doifmodeelse {draft} {\setupnote[footnote][frame=on]}
+
+% Setup typing.
+
+\setupnarrower
+ [middle=3mm,
+ left=5mm]
+
+\definetextbackground
+ [verbatim]
+ [frame=off,
+ background=color,
+ backgroundcolor=CGgray,
+ leftoffset=2mm,rightoffset=2mm,
+ topoffset=2mm,bottomoffset=2mm,
+ location=paragraph,
+ align=flushleft]
+
+\doifmodeelse {draft} {\definetextbackground[verbatim][frame=on]}
+
+\definetextbackground
+ [verbatimitem]
+ [verbatim]
+
+\setuptextbackground
+ [verbatimitem]
+ [before=,
+ after=,
+ width=\the\dimexpr\hsize-10.5mm\relax]
+
+\startsetups typing:before
+ \blank[MediumCGblank]
+ \starttextbackground[verbatim]
+\stopsetups
+
+\startsetups typing:before:small
+ \blank[MediumCGblank]
+ \starttextbackground[verbatim]
+\stopsetups
+
+\startsetups typing:after
+ \stoptextbackground
+ \blank[MediumCGblank]
+\stopsetups
+
+\startsetups typing:before:item
+ \starttextbackground[verbatimitem]
+\stopsetups
+
+\startsetups typing:after:item
+ \stoptextbackground
+\stopsetups
+
+\setuptyping
+ [typing]
+ [style=DisplayMonospaced,
+ before=\setups{typing:before},
+ after=\setups{typing:after}]
+
+\setuptype
+ [style=DisplayMonospaced]
+
+%D When verbatim becomes too large:
+
+\definetyping
+ [smalltyping]
+
+\setuptyping
+ [smalltyping]
+ [style=DisplayMonospacedX,
+ before=\setups{typing:before:small},
+ after=\setups{typing:after}]
+
+\unexpanded\def\smalltypefile{\typefile[smalltyping][]}
+
+%D Bullet lists.
+
+\setupitemgroup
+ [itemize]
+ [each]
+ []
+ [symbol=1,
+ indentnext=no,
+ align=right,
+ before={\blank[MediumCGblank]\startnarrower[left]},
+ after={\stopnarrower\blank[MediumCGblank]},
+ inbetween={\blank[CGblank]}]
+
+\definedescription
+ [description]
+ [location=hanging,
+ width=broad,
+ before={\blank},
+ after={\blank}]
+
+\setupformula
+ [align=flushleft,
+ margin=5mm]
+
+\setupquotation
+ [before={\blank[CGblank]\switchtobodyfont[10pt]},
+ after={\blank[CGblank]}]
+
+\setupwhitespace
+ [medium]
+
+\usemodule[abr-02,abr-03,abr-04]
+
+\unexpanded\def\Href#1{\underbar{\hyphenatedurl{#1}}}
+\unexpanded\def\CG {\ConTeXt\ group}
+
+\setnewconstant\kindofpagetextareas\plusone % partial page. HH: low level, no high level switch (yet)
+
+%D There is a draft mode, which enables all frames:
+
+\doifmode {draft} {\showframe}
+
+\stopmodule
+
diff --git a/tex/context/modules/mkiv/s-present-dark.mkiv b/tex/context/modules/mkiv/s-present-dark.mkiv
new file mode 100644
index 000000000..a3b6f6e14
--- /dev/null
+++ b/tex/context/modules/mkiv/s-present-dark.mkiv
@@ -0,0 +1,357 @@
+%D \module
+%D [ file=s-present-dark, % tug-2001
+%D version=2018.09.25, % 2000.*.*
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment Dark,
+%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-dark]
+
+%D The original document dates from 2000 and was meant for a presentation at \TUG\
+%D 2001. It used widgets and in particular check fields and push buttons.
+%D \JAVASCRIPT\ was used to show or hide them when rolling over, and appearances
+%D changed in a subtle way. It actually worked quite well at that time.
+%D
+%D However, over time these widgets proved to be sort of unstable. For instance we
+%D used the parent|-|child model of which (inheritance and appearance) behaviour
+%D changed over time. We're talking of a few decades ago when \TEX\ was one of the
+%D few (maybe only) tools that could actually support everything that the manual
+%D introduced: the \quote {standard} seemed to be ahead of the viewer. Anyway, we
+%D adapted but it meant that old document in principle were not always future proof.
+%D
+%D We used in this document a push button in the background of the menu so that it
+%D could become visible when rolled over. There were no layers in \PDF\ at that
+%D time! Nowadays such a trick doesn't work well because of the way a viewer
+%D intercepts regions. One gets kind of erratic behaviour when applying \JAVASCRIPT.
+%D
+%D I spent quite some time to test if we could still do the same without side
+%D effects and in the process also noticed that some functionality in \JAVASCRIPT\
+%D seems broken (or changed due to maybe security issues). So, in the end I decided
+%D to simplify the approach and use layers to pop up the menu when the mouse goes
+%D over it but no longer hide it when the mouse leaves that area. It just doesn't
+%D work too well otherwise.
+
+%D We start with the layout. We basically have three areas: edge, margin and text.
+%D Each are more or less the same width.
+
+\setuppapersize
+ [S6][S6]
+
+\setuplayout
+ [backspace=380pt,
+ topspace=20pt,
+ leftedge=100pt,
+ leftedgedistance=10pt,
+ leftmargin=230pt,
+ leftmargindistance=20pt,
+ header=0pt,
+ footer=0pt,
+ width=200pt,
+ backspace=360pt,
+ width=220pt,
+ leftmargin=210pt,
+ height=middle]
+
+%D The bodyfont is the Latin Modern Variable (of course at that time we used
+%D the Computer Modern predecessors). We still apply protrusion and expansion.
+%D The new \quotation {Modern Latin} look also works ok on screen.
+
+\definefontfeature
+ [default]
+ [default]
+ [expansion=pure,
+ protrusion=pure]
+
+\setupalign
+ [verytolerant,stretch,hanging] % space
+
+\setupbodyfont
+ [modernvariable,11pt]
+
+% \setupbodyfont
+% [modernlatin,11pt]
+
+\setupinmargin
+ [style=,
+ color=]
+
+%D We use some predefined \JAVASCRIPT\ functions. These are rather old helpers.
+%D Normally only the libraries (sets of functions) that are used will be
+%D embedded.
+
+\useJSscripts[fld]
+\useJSscripts[nav]
+
+%D The remarks that will pop up. By default they are not visible. Clicking
+%D on the page (or menu item) will show them step by step.
+
+\newcounter\bofremarks
+\newcounter\nofremarks
+
+\setupfield
+ [remark]
+ [offset=overlay,
+ option={readonly,hidden},
+ color=,
+ style=,
+ frame=off]
+
+\defineframed
+ [remarkable]
+ [frame=off,
+ backgroundcolor=white,
+ background=RollBackground]
+
+\starttexdefinition unexpanded remark #1#2
+
+ \doglobal\increment\nofremarks
+
+ \definesymbol
+ [remark:x:\nofremarks]
+ [\remarkable{#1}]
+
+ \definesymbol
+ [remark:y:\nofremarks]
+ [\remarkable{#2}]
+
+ \definefield
+ [remark:x:\nofremarks][check][remark]
+ [remark:x:\nofremarks]
+ [remark:x:\nofremarks]
+
+ \definefield
+ [remark:y:\nofremarks][check][remark]
+ [remark:y:\nofremarks]
+ [remark:y:\nofremarks]
+
+ \inleft
+ [scope=local]
+ {
+ \hpack to \hsize {
+ \hss
+ \linebox {
+ \fitfield[remark:y:\nofremarks]
+ }
+ }
+ }
+
+ \bgroup
+
+ \setbox\scratchbox\hbox {
+ #1
+ }
+
+ \hpack to \wd\scratchbox {
+ \wd\scratchbox\zeropoint
+ \box\scratchbox
+ \hss
+ \linebox {
+ \fitfield[remark:x:\nofremarks]
+ }
+ \hss
+ }
+
+ \egroup
+
+\stoptexdefinition
+
+%D We use lots of backgrounds. The \METAPOST\ graphics are a bit overkill
+%D but we keep them.
+
+\setupbackgrounds
+ [text]
+ [background=StepFields]
+
+\defineoverlay
+ [StepFields]
+ [\directsetup{syncrefs}\overlaybutton{ShowRemark}]
+
+\setupbackgrounds
+ [page]
+ [background=PageBackground]
+
+%D Just look in \type {java-imp-fld.mkiv} how \type {HideFields} and
+%D alike are defined. They are defined references to \JAVASCRIPT\ calls.
+
+\setupinteraction
+ [state=start,
+ click=no,
+ menu=on,
+ style=,
+ color=,
+ frame=off,
+ contrastcolor=]
+
+\setupinteractionscreen
+ [option=max]
+
+\setupbackgrounds
+ [paper]
+ [background=color,
+ backgroundcolor=black]
+
+\defineoverlay
+ [PageBackground]
+ [\useMPgraphic{PageBackground}]
+
+\startuseMPgraphic{PageBackground}
+ StartPage ;
+ numeric w ; w := 1.25 * PaperWidth ;
+ numeric n ; n := 2.50 * PageNumber ;
+ numeric d ; d := (1 + (PageNumber-1)/5) * 5pt ;
+ fill Page
+ withcolor black ;
+ for i=1 upto 500 :
+ draw
+ center Page
+ randomized w
+ rotatedaround(center Page,n)
+ withpen pencircle
+ scaled (uniformdeviate d)
+ withcolor
+ (yellow randomized (.3,.8))
+ ;
+ endfor ;
+ StopPage ;
+\stopuseMPgraphic
+
+\defineoverlay
+ [TextBackground]
+ [\uniqueMPgraphic{TextBackground}]
+
+\startuniqueMPgraphic{TextBackground}
+ fill
+ OverlayBox
+ withcolor black ;
+ draw
+ OverlayBox
+ withpen pencircle scaled 1pt
+ withcolor OverlayColor ;
+\stopuniqueMPgraphic
+
+\defineoverlay
+ [RollBackground]
+ [\uniqueMPgraphic{RollBackground}]
+
+\startuniqueMPgraphic{RollBackground}
+ fill
+ OverlayBox
+ withcolor black ;
+ draw
+ OverlayBox
+ withpen pencircle scaled 1pt
+ withcolor OverlayColor ;
+\stopuniqueMPgraphic
+
+\setupinteractionmenu
+ [left]
+ [state=start,
+ width=\leftedgewidth,
+ frame=on,
+ framecolor=white,
+ rulethickness=1pt,
+ foregroundcolor=white,
+ background=RollBackground]
+
+\startsetups syncrefs
+ \normalexpanded {
+ \definereference
+ [ShowRemark]
+ [StepFields{remark:x,\bofremarks,\nofremarks},
+ StepFields{remark:y,\bofremarks,\nofremarks}]
+ }
+\stopsetups
+
+%D The menu buttons used to be rollover buttons but are now normal simple
+%D ones (more predictable).
+
+\defineviewerlayer
+ [buttons]
+
+\startinteractionmenu[left]
+ \vfill
+ \directsetup{syncrefs}
+ \startviewerlayer[buttons]
+ \startbut [previouspage,HideFields] Previous \stopbut
+ \startbut [nextpage,HideFields] Next \stopbut
+ \startbut [ShowRemark] Remark \stopbut
+ \startbut [HideFields] Reset \stopbut
+ \startbut [CloseDocument,HideFields] Quit \stopbut
+ \stopviewerlayer
+\stopinteractionmenu
+
+\setupinteraction
+ [closeaction=ForgetChanges,
+ openpageaction={HideFields,HideLayer{buttons}},
+ closepageaction={HideFields,HideLayer{buttons}}]
+
+\defineoverlay
+ [ShowMenu]
+ [\overlayrollbutton{VideLayer{buttons}}{}]
+
+\setupbackgrounds
+ [text][leftedge]
+ [backgroundoffset=10pt,
+ background=ShowMenu]
+
+%D The environment has been adapted a bit. Instead of taking two
+%D arguments we now use a key|-|value approach. The remark is shown
+%D when one rolls over the title (author).
+
+\defineframedtext
+ [MainText]
+ [frame=off,
+ offset=10pt,
+ width=\textwidth,
+ before=,
+ after=,
+ color=,
+ foregroundcolor=white,
+ background=TextBackground,
+ backgroundcolor=white]
+
+\starttexdefinition unexpanded StartIdea
+ \dosingleempty{\texdefinition{StartIdeaIndeed}}
+\stoptexdefinition
+
+\starttexdefinition StartIdeaIndeed [#1]
+ \let\bofremarks\nofremarks
+ \increment\bofremarks
+ \startstandardmakeup
+ \setvariables[Idea][#1]
+ \startMainText
+ \setupalign[verytolerant,stretch,hanging]
+\stoptexdefinition
+
+\starttexdefinition unexpanded StopIdea
+ \doifvariable {Idea} {text} {
+ \blank
+ \rightaligned {
+ \doifelsevariable {Idea} {remark} {
+ \tooltip
+ [left]
+ {\getvariable{Idea}{title}}
+ {\getvariable{Idea}{remark}}
+ } {
+ \getvariable{Idea}{title}
+ }
+ }
+ }
+ \stopMainText
+ \vfill
+ \stopstandardmakeup
+\stoptexdefinition
+
+\stopmodule
+
+\continueifinputfile{s-present-dark.mkiv}
+
+\usemodule[present-common]
+
+\inputpresentationfile{tug/2001/tug-2001-ideas.tex}