From 2ad220abb483dea0ba0d85d9963095f5c7dfdfa1 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Fri, 4 Nov 2016 12:01:00 +0100 Subject: 2016-11-04 11:12:00 --- tex/context/base/mkii/cont-new.mkii | 2 +- tex/context/base/mkii/context.mkii | 2 +- tex/context/base/mkiv/buff-imp-parsed-xml.lua | 2 +- tex/context/base/mkiv/buff-ver.lua | 2 +- tex/context/base/mkiv/buff-ver.mkiv | 3 +- tex/context/base/mkiv/cont-new.mkiv | 2 +- tex/context/base/mkiv/context.mkiv | 2 +- tex/context/base/mkiv/mtx-context-domotica.tex | 133 +++++++++++++ tex/context/base/mkiv/publ-aut.lua | 4 +- tex/context/base/mkiv/status-files.pdf | Bin 25644 -> 25648 bytes tex/context/base/mkiv/status-lua.pdf | Bin 368441 -> 368443 bytes tex/context/interface/mkiv/i-context.pdf | Bin 835924 -> 836040 bytes tex/context/interface/mkiv/i-readme.pdf | Bin 60764 -> 60764 bytes tex/context/modules/common/s-pre-50.tex | 6 +- tex/context/modules/common/s-pre-63.tex | 77 -------- tex/context/modules/common/s-pre-64.tex | 208 --------------------- tex/context/modules/common/s-pre-68.tex | 150 --------------- tex/context/modules/mkii/s-pre-63.mkii | 73 ++++++++ tex/context/modules/mkii/s-pre-64.mkii | 208 +++++++++++++++++++++ tex/context/modules/mkii/s-pre-68.mkii | 152 +++++++++++++++ .../modules/mkiv/s-characters-properties.mkiv | 2 +- tex/context/modules/mkiv/s-domotica-settings.lua | 98 ++++++++++ tex/context/modules/mkiv/s-domotica-settings.mkiv | 26 +++ tex/context/modules/mkiv/s-present-banner.mkiv | 2 +- tex/context/modules/mkiv/s-present-simple.mkiv | 151 +++++++++++++++ tex/context/modules/mkiv/s-present-slanted.mkiv | 206 ++++++++++++++++++++ tex/generic/context/luatex/luatex-fonts-merged.lua | 2 +- 27 files changed, 1063 insertions(+), 450 deletions(-) create mode 100644 tex/context/base/mkiv/mtx-context-domotica.tex delete mode 100644 tex/context/modules/common/s-pre-63.tex delete mode 100644 tex/context/modules/common/s-pre-64.tex delete mode 100644 tex/context/modules/common/s-pre-68.tex create mode 100644 tex/context/modules/mkii/s-pre-63.mkii create mode 100644 tex/context/modules/mkii/s-pre-64.mkii create mode 100644 tex/context/modules/mkii/s-pre-68.mkii create mode 100644 tex/context/modules/mkiv/s-domotica-settings.lua create mode 100644 tex/context/modules/mkiv/s-domotica-settings.mkiv create mode 100644 tex/context/modules/mkiv/s-present-simple.mkiv create mode 100644 tex/context/modules/mkiv/s-present-slanted.mkiv (limited to 'tex') diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii index 3e4ba8a57..9b133226d 100644 --- a/tex/context/base/mkii/cont-new.mkii +++ b/tex/context/base/mkii/cont-new.mkii @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2016.11.01 10:08} +\newcontextversion{2016.11.04 11:06} %D This file is loaded at runtime, thereby providing an %D excellent place for hacks, patches, extensions and new diff --git a/tex/context/base/mkii/context.mkii b/tex/context/base/mkii/context.mkii index 47fce6bfe..b93ed8140 100644 --- a/tex/context/base/mkii/context.mkii +++ b/tex/context/base/mkii/context.mkii @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2016.11.01 10:08} +\edef\contextversion{2016.11.04 11:06} %D For those who want to use this: diff --git a/tex/context/base/mkiv/buff-imp-parsed-xml.lua b/tex/context/base/mkiv/buff-imp-parsed-xml.lua index 22611ac8a..b18fb65aa 100644 --- a/tex/context/base/mkiv/buff-imp-parsed-xml.lua +++ b/tex/context/base/mkiv/buff-imp-parsed-xml.lua @@ -92,7 +92,7 @@ local function parsedxml(root,pattern) end local function parser(str,settings) - parsedxml(xml.convert(str),settings and settings.pattern) + parsedxml(xml.convert(string.strip(str)),settings and settings.pattern) end visualizers.parsedxml = parsedxml -- for use at the lua end (maybe namespace needed) diff --git a/tex/context/base/mkiv/buff-ver.lua b/tex/context/base/mkiv/buff-ver.lua index a9d6696cb..ed0e327a1 100644 --- a/tex/context/base/mkiv/buff-ver.lua +++ b/tex/context/base/mkiv/buff-ver.lua @@ -554,7 +554,7 @@ local beginline = C(patterns.beginline) * CargOne / f_beginline local anything = C(patterns.somecontent) * CargOne / f_default ----- verbosed = (space + newline * (emptyline^0) * beginline + anything)^0 -local verbosed = (space + newline * (emptyline^0) * beginline + emptyline + newline + anything)^0 +local verbosed = (space + newline * (emptyline^0) * beginline + newline * emptyline + newline + anything)^0 local function write(s,settings) -- bad name lpegmatch(verbosed,s,1,settings or false) diff --git a/tex/context/base/mkiv/buff-ver.mkiv b/tex/context/base/mkiv/buff-ver.mkiv index 8f222b1ff..27535dba9 100644 --- a/tex/context/base/mkiv/buff-ver.mkiv +++ b/tex/context/base/mkiv/buff-ver.mkiv @@ -974,7 +974,8 @@ \fi\fi\fi} \unexpanded\def\dodisplayverbatiminitialize#1% - {\c_buff_verbatim_noflines#1\relax + {\forgetparindent % maybe more + \c_buff_verbatim_noflines#1\relax \c_buff_verbatim_current\zerocount} \loadmarkfile{buff-imp-default} % preloaded as otherwise spurious spaces inline due to loading diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index f1b595bd9..6815414db 100644 --- a/tex/context/base/mkiv/cont-new.mkiv +++ b/tex/context/base/mkiv/cont-new.mkiv @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2016.11.01 10:08} +\newcontextversion{2016.11.04 11:06} %D This file is loaded at runtime, thereby providing an excellent place for %D hacks, patches, extensions and new features. diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv index d27ac04e8..aceb8fe35 100644 --- a/tex/context/base/mkiv/context.mkiv +++ b/tex/context/base/mkiv/context.mkiv @@ -39,7 +39,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2016.11.01 10:08} +\edef\contextversion{2016.11.04 11:06} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/mkiv/mtx-context-domotica.tex b/tex/context/base/mkiv/mtx-context-domotica.tex new file mode 100644 index 000000000..a904d865b --- /dev/null +++ b/tex/context/base/mkiv/mtx-context-domotica.tex @@ -0,0 +1,133 @@ +%D \module +%D [ file=mtx-context-domotica, +%D version=2016.10.20, +%D title=\CONTEXT\ Extra Trickry, +%D subtitle=Domotica Goodies, +%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. + +% begin help +% +% usage: context --extra=domotica [options] list-of-files +% +% --topspace=dimension : distance above first line +% --backspace=dimension : distance before left margin +% --bodyfont=list : additional bodyfont settings +% --paperformat=spec : paper*print or paperxprint +% --compact : small margins, 8pt font +% --verycompact : small margins, 7pt font +% +% --openzwave : process openzwave xml files +% +% --pattern=spec : files to process +% +% example: context --extra=domotica --openzwave ./config/fibaro/fgms.xml ./open-zwave-master/config/aeotec/zw100.xml +% example: context --extra=domotica --openzwave --pattern="./open-zwave-master/config/**.xml" +% +% end help + +% --pattern="e:/domotica/open-zwave/open-zwave-master/config/**.xml" + +\input mtx-context-common.tex + +\usemodule[domotica-settings] + +\doifdocumentargument {compact} { + \setdocumentargument{topspace} {5mm} + \setdocumentargument{backspace}{5mm} + \setdocumentargument{bodyfont} {8pt} +} + +\doifdocumentargument {verycompact} { + \setdocumentargument{topspace} {5mm} + \setdocumentargument{backspace}{5mm} + \setdocumentargument{bodyfont} {7pt} +} + +\setupbodyfont + [dejavu,11pt,\getdocumentargument{bodyfont}] % dejavu is more complete + +\setuplayout + [header=0cm, + footer=1.5cm, + topspace=\getdocumentargumentdefault{topspace}{1.5cm}, + backspace=\getdocumentargumentdefault{backspace}{1.5cm}, + width=middle, + height=middle] + +\setuppapersize + [\getdocumentargument{paperformat_paper}] + [\getdocumentargument{paperformat_print}] + +\doifdocumentargument {openzwave} {\enablemode[openzwave]} + +\startmode[openzwave] + + \starttext + + \setuplist + [chapter] + [style=bold, + width=4em] + + \setuplist + [section] + [width=4em] + + \setuphead + [section] + [style=bold] + + \setupheadertexts + + \setupheadertexts + [chapter][pagenumber] + + \setupheader + [style=bold] + + \starttitle[title=Zwave devices] + + \placelist[chapter,section] + + \stoptitle + + \startluacode + local arguments = document.arguments + local files = document.files + local pattern = arguments.pattern + local noffiles = #files + + if type(pattern) == "string" then + + local pattern = file.addsuffix(pattern,"xml") + + moduledata.zwave.show_settings(pattern) + + elseif noffiles > 0 then + + -- if arguments.sort then + -- table.sort(files) + -- end + + for i=1,#files do + local filename = file.addsuffix(files[i],"xml") + moduledata.zwave.show_settings(filename) + end + + else + + context("no files given") + + end + \stopluacode + + \stoptext + +\stopmode + diff --git a/tex/context/base/mkiv/publ-aut.lua b/tex/context/base/mkiv/publ-aut.lua index b434872f3..6ad8b1296 100644 --- a/tex/context/base/mkiv/publ-aut.lua +++ b/tex/context/base/mkiv/publ-aut.lua @@ -80,13 +80,13 @@ local andsplitter = Ct { "start", local commasplitter = Ct { "start", start = Cs(V("outer")) + (p_empty + Cs((V("inner") + (1-p_comma))^1) + p_comma)^1, - outer = (P("{")/"") * ((V("inner") + P(1-P("}")))^1) * (P("}")/""), + outer = (P("{")/"") * ((V("inner") + P(1-P("}")))^1) * ((P("}") * P(-1))/""), inner = P("{") * ((V("inner") + P(1-P("}")))^1) * P("}"), } local spacesplitter = Ct { "start", start = Cs(V("outer")) + (Cs((V("inner") + (1-p_space))^1) + p_space)^1, - outer = (P("{")/"") * ((V("inner") + P(1-P("}")))^1) * (P("}")/""), + outer = (P("{")/"") * ((V("inner") + P(1-P("}")))^1) * ((P("}") * P(-1))/""), inner = P("{") * ((V("inner") + P(1-P("}")))^1) * P("}"), } diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf index 5f58a77d6..4e44163d8 100644 Binary files a/tex/context/base/mkiv/status-files.pdf and b/tex/context/base/mkiv/status-files.pdf differ diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf index c09d22644..adc58e56e 100644 Binary files a/tex/context/base/mkiv/status-lua.pdf and b/tex/context/base/mkiv/status-lua.pdf differ diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf index eaf2b6fa1..34fc2a0fb 100644 Binary files a/tex/context/interface/mkiv/i-context.pdf and b/tex/context/interface/mkiv/i-context.pdf differ diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf index 8ea3d9335..b5463a4e8 100644 Binary files a/tex/context/interface/mkiv/i-readme.pdf and b/tex/context/interface/mkiv/i-readme.pdf differ diff --git a/tex/context/modules/common/s-pre-50.tex b/tex/context/modules/common/s-pre-50.tex index ff3e48631..8b55cf67a 100644 --- a/tex/context/modules/common/s-pre-50.tex +++ b/tex/context/modules/common/s-pre-50.tex @@ -90,9 +90,9 @@ \StartSteps \title[whow]{How Much?} \FlushStep - \item More \FlushStep - \item And More \FlushStep - \item And Even More \FlushStep + \startitem More \stopitem \FlushStep + \startitem And More \stopitem \FlushStep + \startitem And Even More \stopitem \FlushStep \StartStep And So On \StopStep diff --git a/tex/context/modules/common/s-pre-63.tex b/tex/context/modules/common/s-pre-63.tex deleted file mode 100644 index 974c67a5f..000000000 --- a/tex/context/modules/common/s-pre-63.tex +++ /dev/null @@ -1,77 +0,0 @@ -%D \module -%D [ file=s-pre-63, -%D version=2006.05.11, -%D title=\CONTEXT\ Style File, -%D subtitle=Presentation Environment 63, -%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. - -this module is under reconstruction - -\endinput - -\usemodule[pre-61,streams] - -\definemeasure[textgap] [\dimexpr24pt\relax] - -\definemeasure[leftwidth] [\dimexpr.25\textwidth-.5\measure{textgap}\relax] -\definemeasure[rightwidth][\dimexpr.75\textwidth-.5\measure{textgap}\relax] - -\definestreamlayer[left] [width=\measure{leftwidth}] -\definestreamlayer[right][width=\measure{rightwidth}] - -\setupbodyfont[12pt] - -\definefont[LeftFont][Normal sa 3] - -\setupheader[style=\tfc,before=\vss,after=\vss] - -\startsetups streamlayer:left:settings - \hsize\measure{leftwidth} - \LeftFont - \setupinterlinespace -\stopsetups - -\startsetups streamlayer:right:settings - \hsize\measure{rightwidth} -\stopsetups - -\definecombination[both][distance=\measure{textgap},location=top] - -\startsetups place:both - \startcombination[both] - {\StartLocalStep\placestreamlayer[left]\StopLocalStep} {} - {\StartLocalStep\placestreamlayer[right]\StopLocalStep} {} - \stopcombination -\stopsetups - -\def\StartPage {\page \StartLocalSteps} -\def\StopPage {\StopLocalSteps \page} - -\def\StartLeft {\startstreamlayer[left]} -\def\StartRight{\startstreamlayer[right]} - -\def\StopLeft {\stopstreamlayer} -\def\StopRight {\stopstreamlayer} - -\def\StartPair {} -\def\StopPair {\setups[place:both]} - -% \doifnotmode {demo} {\endinput} - -\setupbodyfont[8pt] \definefont[BigFont][Normal sa 4] - -\starttext - -\StartPage - \StartPair \StartLeft ZAPF \StopLeft \StartRight \input zapf \StopRight \StopPair - \StartPair \StartLeft DAVIS \StopLeft \StartRight \input davis \StopRight \StopPair - \StartPair \StartLeft WARD \StopLeft \StartRight \input ward \StopRight \StopPair -\StopPage - -\stoptext diff --git a/tex/context/modules/common/s-pre-64.tex b/tex/context/modules/common/s-pre-64.tex deleted file mode 100644 index ef4889bbb..000000000 --- a/tex/context/modules/common/s-pre-64.tex +++ /dev/null @@ -1,208 +0,0 @@ -%D \module -%D [ file=s-pre-64, -%D version=2006.05.11, -%D title=\CONTEXT\ Style File, -%D subtitle=Presentation Environment 64, -%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. - -% To be documented, used in 2007 - -\usemodule[s][pre-60] - -\newcounter\shapesynctag -\newdimen\slantedshapedimen -\newdimen\slantedshapestep -\newdimen\slantedshapeleftskip -\newdimen\slantedshapeoffset -\newdimen\slantedshapeextra - -\positioningtrue - -\def\AdaptShape - {\doglobal\increment\shapesynctag - \getnoflines\textheight - \slantedshapestep\dimexpr\slantedshapeleftskip/\noflines\relax - \leftskip\slantedshapeleftskip - \scratchdimen\dimexpr\MPy{text:\MPp\shapesynctag}+\MPh{text:\MPp\shapesynctag}-\topskip-\MPy\shapesynctag\relax - \advance\scratchdimen\slantedshapeextra - \getnoflines\scratchdimen - \slantedshapedimen \noflines \slantedshapestep - \scratchtoks\emptytoks - \dorecurse{30} - {\appendetoks - \the\dimexpr-\slantedshapedimen+\slantedshapeoffset \relax\space - \the\dimexpr \hsize-2\slantedshapeoffset\relax\space - \to\scratchtoks - \advance\slantedshapedimen \slantedshapestep}% - \parshape 30 \the\scratchtoks - \strut\xypos\shapesynctag} - -\def\AdaptShapeX - {\doglobal\increment\shapesynctag - \getnoflines\textheight - \slantedshapestep\dimexpr\slantedshapeleftskip/\noflines\relax - \leftskip\slantedshapeleftskip - \scratchdimen\dimexpr\MPy{text:\MPp\shapesynctag}+\MPh{text:\MPp\shapesynctag}-\topskip-\MPy\shapesynctag\relax - \advance\scratchdimen\slantedshapeextra - \getnoflines\scratchdimen - \slantedshapedimen \noflines \slantedshapestep - \scratchtoks\emptytoks - \dorecurse{30} - {\appendetoks - \the\dimexpr-\slantedshapedimen+\slantedshapeoffset +5cm \relax\space - \the\dimexpr \hsize-2\slantedshapeoffset\relax\space - \to\scratchtoks - \advance\slantedshapedimen \slantedshapestep}% - \parshape 30 \the\scratchtoks - \strut\xypos\shapesynctag} - -\setuppapersize[S6][S6] - -\setupinteraction - [state=start, - click=no] - -\setupinteractionscreen - [option=max] - -\setuplayout - [backspace=12pt, - topspace=24pt, - height=middle, - width=middle, - header=0pt, - footer=0pt] - -\definecolor[maincolor][b=.5] -\definecolor[somecolor][g=.5] -\definecolor[morecolor][r=.5] - -\setupcolors - [textcolor=maincolor, - state=start] - -\setupbackgrounds - [text]% [text] - [background={base,text,invoke}] - -\definelayer - [text] - [width=\textwidth, - height=\textheight] - -\definelayer - [base] - [width=\textwidth, - height=\textheight] - -\definetype [epet] [style=,color=morecolor] -\setuptype [style=,color=somecolor] - -\slantedshapeleftskip150pt -\slantedshapeoffset12pt -\slantedshapeextra10pt - -\startreusableMPgraphic{page} - StartPage ; - fill Page withcolor \MPcolor{maincolor} ; - path p ; p := Field[Text][Text] enlarged 6pt ; - p := - llcorner p shifted (0,-12pt) -- - lrcorner p shifted (-150pt,0) -- - urcorner p shifted (0,12pt) -- - ulcorner p shifted (150pt,0) -- - cycle ; - fill p - withcolor .9white ; - StopPage ; -\stopreusableMPgraphic - -\defineoverlay[page][\reuseMPgraphic{page}] -\setupbackgrounds[page][background=page] - -\setupalign[flushleft] - -\def\StartItem - {\blank[line] - \begingroup - \EveryPar {\AdaptShape}} % beware: \ABBREV aan begin gaat fout - -\def\StopItem - {\endgraf - \endgroup - \blank[line]} - -\def\StartType - {\blank[halfline] - \begingroup - \EveryPar {\AdaptShape} - \dontleavehmode \quad} - -\def\StopType - {\endgraf - \endgroup - \blank[halfline]} - -\def\Title#1% - {\page - \setlayer - [text] - [preset=lefttop, - rotation=90] - {\color[white]{\scale[height=24pt]{\strut#1}}}} - -\def\SetBanner#1% - {\setuplayer[base][state=repeat] - \setlayer[base][preset=rightbottom]{\color[white]{\scale[height=9pt]{\strut#1}}}} - -\let\TitleFont\relax - -\startmode[atpragma] - \definefontfeature[default][method=node,script=latn,language=dflt,liga=yes,onum=yes,kern=yes] - \definefont[TitleFont][palatinosanscom-bold*default at 48pt] - \definefont[MainTextFont][palatinosanscom-regular*default at 12pt] \setupinterlinespace[line=15pt] - \appendtoks - \MainTextFont % hack, as we define a bodyfont at that point (better have a proper typeface) - \to \everystarttext -\stopmode - -\doifnotmode{demo}{\endinput} - -\starttext - -\usemodule[abr-01] - -\SetBanner{tug 2007 san diego} - -\Title {hans hagen} - -\startstandardmakeup \TitleFont \setupinterlinespace[line=3ex] \vfill - -\StartItem \dontleavehmode \quad {\morecolor zapfino, a} \StopItem -\StartItem \dontleavehmode \quad {\morecolor torture test} \StopItem -\StartItem \dontleavehmode \quad {\morecolor for luatex} \StopItem - -\vfill \stopstandardmakeup - -\Title{loading fonts} - -\StartSteps - -\StartItem the \OPENTYPE\ font reader is borrowed from \FONTFORGE\ \FlushStep \StopItem -\StartItem once it was ready, we could look into such a font \FlushStep \StopItem -\StartItem it tooks while to figure out the format due to rather fuzzy specs \FlushStep \StopItem -\StartItem it took us even more time to find out that the loader was flawed \FlushStep \StopItem -\StartItem one reason was that fonts themselves may have bugs or be incomplete \FlushStep \StopItem -\StartItem then we changed to \FONTFORGE\ version 2 \FlushStep \StopItem -\StartItem this made the missing pieces surface in more complex feature handling \FlushStep \StopItem -\StartItem while implementing features the new table format was cleaned up \FlushStep \StopItem - -\StopSteps - -\stoptext diff --git a/tex/context/modules/common/s-pre-68.tex b/tex/context/modules/common/s-pre-68.tex deleted file mode 100644 index 3c04a87e1..000000000 --- a/tex/context/modules/common/s-pre-68.tex +++ /dev/null @@ -1,150 +0,0 @@ -%D \module -%D [ file=s-pre-68, -%D version=2009.08.28, -%D title=\CONTEXT\ Style File, -%D subtitle=Presentation Environment 68, -%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. - -\usemodule[pre-60,abr-02] - -% style - -\setuppapersize - [S66][S66] - -\setuplayout - [height=middle, - width=middle, - header=0pt, - footer=0pt, - backspace=2cm, - topspace=2cm] - -\setupinteraction - [state=start, - click=no] - -\definecolor[maincolor][r=.4] - -\startreusableMPgraphic{page} - StartPage ; - fill Page enlarged 5mm withcolor \MPcolor{maincolor} ; - StopPage ; -\stopreusableMPgraphic - -\startreusableMPgraphic{next} - fill ultriangle scaled .15PaperWidth withcolor white ; -\stopreusableMPgraphic - -\startreusableMPgraphic{last} - fill boundingbox(ultriangle scaled .15PaperWidth) withcolor white ; -\stopreusableMPgraphic - -\startuniqueMPgraphic{bullit} - fill ultriangle scaled 2ExHeight withcolor white ; -\stopuniqueMPgraphic - -\definelayer - [extra] - [width=\paperwidth, - height=\paperheight] - -\defineoverlay - [page] - [\reuseMPgraphic{page}] - -\setupbackgrounds - [page] - [background={page,extra}] - -\setupcolors - [state=start, - textcolor=white] - -\setuphead - [chapter] - [style=\bfc] - -\definehead[Title][title] - -\definesymbol[MyBullet][\uniqueMPgraphic{bullit}] - -\setupitemgroup[itemize][each][symbol=MyBullet] - -\usetypescript[cambria] -\setupbodyfont[cambria,14.4pt] - -% interface - -\def\StartItems - {\begingroup - \StartSteps - \startitemize - \def\StartItems{\startitemize\def\StopItems{\stopitemize}}} - -\def\StopItems - {\FlushStep - \stopitemize - \NextPageSymbol - \StopSteps - \endgroup} - -\def\Item - {\def\Item{\FlushStep\item} - \item} - -\def\NextPageSymbol - {\setlayer - [extra] - [preset=rightbottom,offset=2mm] - {\ifnum\realpageno=\lastpage - \reuseMPgraphic{last}% - \else\ifnum\realpageno>1 - \reuseMPgraphic{next}% - \fi\fi - \FlushStep}} - -\def\TitlePage#1#2% - {\startstandardmakeup[bottom=,top=] - \scale[width=\textwidth]{\framed[align=flushleft,foregroundstyle=\bf,frame=off]{#1}} - \vfilll - \hfill\scale[width=.5\textwidth]{\framed[align=flushright,foregroundstyle=\bf,frame=off]{#2}} - \stopstandardmakeup} - -\doifnotmode{demo}{\endinput} - -\starttext - -\TitlePage{I'm running\\out of examples}{Hans Hagen\\Someplace, 2031} - -\Title{Alpha} - -\StartItems -\Item one -\Item two -\Item three -\StopItems - -\Title{Beta} - -\StartItems -\Item four -\Item five -\Item six -\StopItems - -\Title{Gamma} - -\StartItems -\Item seven -\Item eight -\Item nine -\StopItems - -\stoptext diff --git a/tex/context/modules/mkii/s-pre-63.mkii b/tex/context/modules/mkii/s-pre-63.mkii new file mode 100644 index 000000000..9ecb2cb1a --- /dev/null +++ b/tex/context/modules/mkii/s-pre-63.mkii @@ -0,0 +1,73 @@ +%D \module +%D [ file=s-pre-63, +%D version=2006.05.11, +%D title=\CONTEXT\ Style File, +%D subtitle=Presentation Environment 63, +%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. + +\usemodule[pre-61,streams] + +\definemeasure[textgap] [\dimexpr24pt\relax] + +\definemeasure[leftwidth] [\dimexpr.25\textwidth-.5\measure{textgap}\relax] +\definemeasure[rightwidth][\dimexpr.75\textwidth-.5\measure{textgap}\relax] + +\definestreamlayer[left] [width=\measure{leftwidth}] +\definestreamlayer[right][width=\measure{rightwidth}] + +\setupbodyfont[12pt] + +\definefont[LeftFont][Normal sa 3] + +\setupheader[style=\tfc,before=\vss,after=\vss] + +\startsetups streamlayer:left:settings + \hsize\measure{leftwidth} + \LeftFont + \setupinterlinespace +\stopsetups + +\startsetups streamlayer:right:settings + \hsize\measure{rightwidth} +\stopsetups + +\definecombination[both][distance=\measure{textgap},location=top] + +\startsetups place:both + \startcombination[both] + {\StartLocalStep\placestreamlayer[left]\StopLocalStep} {} + {\StartLocalStep\placestreamlayer[right]\StopLocalStep} {} + \stopcombination +\stopsetups + +\def\StartPage {\page \StartLocalSteps} +\def\StopPage {\StopLocalSteps \page} + +\def\StartLeft {\startstreamlayer[left]} +\def\StartRight{\startstreamlayer[right]} + +\def\StopLeft {\stopstreamlayer} +\def\StopRight {\stopstreamlayer} + +\def\StartPair {} +\def\StopPair {\setups[place:both]} + +\doifnotmode {demo} {\endinput} + +\setupbodyfont[8pt] \definefont[BigFont][Normal sa 4] + +\starttext + +\StartPage + \StartPair \StartLeft ZAPF \StopLeft \StartRight \input zapf \StopRight \StopPair + \StartPair \StartLeft DAVIS \StopLeft \StartRight \input davis \StopRight \StopPair + \StartPair \StartLeft WARD \StopLeft \StartRight \input ward \StopRight \StopPair +\StopPage + +\stoptext diff --git a/tex/context/modules/mkii/s-pre-64.mkii b/tex/context/modules/mkii/s-pre-64.mkii new file mode 100644 index 000000000..ef4889bbb --- /dev/null +++ b/tex/context/modules/mkii/s-pre-64.mkii @@ -0,0 +1,208 @@ +%D \module +%D [ file=s-pre-64, +%D version=2006.05.11, +%D title=\CONTEXT\ Style File, +%D subtitle=Presentation Environment 64, +%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. + +% To be documented, used in 2007 + +\usemodule[s][pre-60] + +\newcounter\shapesynctag +\newdimen\slantedshapedimen +\newdimen\slantedshapestep +\newdimen\slantedshapeleftskip +\newdimen\slantedshapeoffset +\newdimen\slantedshapeextra + +\positioningtrue + +\def\AdaptShape + {\doglobal\increment\shapesynctag + \getnoflines\textheight + \slantedshapestep\dimexpr\slantedshapeleftskip/\noflines\relax + \leftskip\slantedshapeleftskip + \scratchdimen\dimexpr\MPy{text:\MPp\shapesynctag}+\MPh{text:\MPp\shapesynctag}-\topskip-\MPy\shapesynctag\relax + \advance\scratchdimen\slantedshapeextra + \getnoflines\scratchdimen + \slantedshapedimen \noflines \slantedshapestep + \scratchtoks\emptytoks + \dorecurse{30} + {\appendetoks + \the\dimexpr-\slantedshapedimen+\slantedshapeoffset \relax\space + \the\dimexpr \hsize-2\slantedshapeoffset\relax\space + \to\scratchtoks + \advance\slantedshapedimen \slantedshapestep}% + \parshape 30 \the\scratchtoks + \strut\xypos\shapesynctag} + +\def\AdaptShapeX + {\doglobal\increment\shapesynctag + \getnoflines\textheight + \slantedshapestep\dimexpr\slantedshapeleftskip/\noflines\relax + \leftskip\slantedshapeleftskip + \scratchdimen\dimexpr\MPy{text:\MPp\shapesynctag}+\MPh{text:\MPp\shapesynctag}-\topskip-\MPy\shapesynctag\relax + \advance\scratchdimen\slantedshapeextra + \getnoflines\scratchdimen + \slantedshapedimen \noflines \slantedshapestep + \scratchtoks\emptytoks + \dorecurse{30} + {\appendetoks + \the\dimexpr-\slantedshapedimen+\slantedshapeoffset +5cm \relax\space + \the\dimexpr \hsize-2\slantedshapeoffset\relax\space + \to\scratchtoks + \advance\slantedshapedimen \slantedshapestep}% + \parshape 30 \the\scratchtoks + \strut\xypos\shapesynctag} + +\setuppapersize[S6][S6] + +\setupinteraction + [state=start, + click=no] + +\setupinteractionscreen + [option=max] + +\setuplayout + [backspace=12pt, + topspace=24pt, + height=middle, + width=middle, + header=0pt, + footer=0pt] + +\definecolor[maincolor][b=.5] +\definecolor[somecolor][g=.5] +\definecolor[morecolor][r=.5] + +\setupcolors + [textcolor=maincolor, + state=start] + +\setupbackgrounds + [text]% [text] + [background={base,text,invoke}] + +\definelayer + [text] + [width=\textwidth, + height=\textheight] + +\definelayer + [base] + [width=\textwidth, + height=\textheight] + +\definetype [epet] [style=,color=morecolor] +\setuptype [style=,color=somecolor] + +\slantedshapeleftskip150pt +\slantedshapeoffset12pt +\slantedshapeextra10pt + +\startreusableMPgraphic{page} + StartPage ; + fill Page withcolor \MPcolor{maincolor} ; + path p ; p := Field[Text][Text] enlarged 6pt ; + p := + llcorner p shifted (0,-12pt) -- + lrcorner p shifted (-150pt,0) -- + urcorner p shifted (0,12pt) -- + ulcorner p shifted (150pt,0) -- + cycle ; + fill p + withcolor .9white ; + StopPage ; +\stopreusableMPgraphic + +\defineoverlay[page][\reuseMPgraphic{page}] +\setupbackgrounds[page][background=page] + +\setupalign[flushleft] + +\def\StartItem + {\blank[line] + \begingroup + \EveryPar {\AdaptShape}} % beware: \ABBREV aan begin gaat fout + +\def\StopItem + {\endgraf + \endgroup + \blank[line]} + +\def\StartType + {\blank[halfline] + \begingroup + \EveryPar {\AdaptShape} + \dontleavehmode \quad} + +\def\StopType + {\endgraf + \endgroup + \blank[halfline]} + +\def\Title#1% + {\page + \setlayer + [text] + [preset=lefttop, + rotation=90] + {\color[white]{\scale[height=24pt]{\strut#1}}}} + +\def\SetBanner#1% + {\setuplayer[base][state=repeat] + \setlayer[base][preset=rightbottom]{\color[white]{\scale[height=9pt]{\strut#1}}}} + +\let\TitleFont\relax + +\startmode[atpragma] + \definefontfeature[default][method=node,script=latn,language=dflt,liga=yes,onum=yes,kern=yes] + \definefont[TitleFont][palatinosanscom-bold*default at 48pt] + \definefont[MainTextFont][palatinosanscom-regular*default at 12pt] \setupinterlinespace[line=15pt] + \appendtoks + \MainTextFont % hack, as we define a bodyfont at that point (better have a proper typeface) + \to \everystarttext +\stopmode + +\doifnotmode{demo}{\endinput} + +\starttext + +\usemodule[abr-01] + +\SetBanner{tug 2007 san diego} + +\Title {hans hagen} + +\startstandardmakeup \TitleFont \setupinterlinespace[line=3ex] \vfill + +\StartItem \dontleavehmode \quad {\morecolor zapfino, a} \StopItem +\StartItem \dontleavehmode \quad {\morecolor torture test} \StopItem +\StartItem \dontleavehmode \quad {\morecolor for luatex} \StopItem + +\vfill \stopstandardmakeup + +\Title{loading fonts} + +\StartSteps + +\StartItem the \OPENTYPE\ font reader is borrowed from \FONTFORGE\ \FlushStep \StopItem +\StartItem once it was ready, we could look into such a font \FlushStep \StopItem +\StartItem it tooks while to figure out the format due to rather fuzzy specs \FlushStep \StopItem +\StartItem it took us even more time to find out that the loader was flawed \FlushStep \StopItem +\StartItem one reason was that fonts themselves may have bugs or be incomplete \FlushStep \StopItem +\StartItem then we changed to \FONTFORGE\ version 2 \FlushStep \StopItem +\StartItem this made the missing pieces surface in more complex feature handling \FlushStep \StopItem +\StartItem while implementing features the new table format was cleaned up \FlushStep \StopItem + +\StopSteps + +\stoptext diff --git a/tex/context/modules/mkii/s-pre-68.mkii b/tex/context/modules/mkii/s-pre-68.mkii new file mode 100644 index 000000000..c22640efd --- /dev/null +++ b/tex/context/modules/mkii/s-pre-68.mkii @@ -0,0 +1,152 @@ +%D \module +%D [ file=s-pre-68, +%D version=2009.08.28, +%D title=\CONTEXT\ Style File, +%D subtitle=Presentation Environment 68, +%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. + +\usemodule[pre-60,abr-02] + +% style + +\setuppapersize + [S66][S66] + +\setuplayout + [height=middle, + width=middle, + header=0pt, + footer=0pt, + backspace=2cm, + topspace=2cm] + +\setupinteraction + [state=start, + click=no] + +\definecolor[maincolor][r=.4] + +\startreusableMPgraphic{page} + StartPage ; + fill Page enlarged 5mm withcolor \MPcolor{maincolor} ; + StopPage ; +\stopreusableMPgraphic + +\startreusableMPgraphic{next} + fill ultriangle scaled .15PaperWidth withcolor white ; +\stopreusableMPgraphic + +\startreusableMPgraphic{last} + fill boundingbox(ultriangle scaled .15PaperWidth) withcolor white ; +\stopreusableMPgraphic + +\startuniqueMPgraphic{bullit} + fill ultriangle scaled 2ExHeight withcolor white ; +\stopuniqueMPgraphic + +\definelayer + [extra] + [width=\paperwidth, + height=\paperheight] + +\defineoverlay + [page] + [\reuseMPgraphic{page}] + +\setupbackgrounds + [page] + [background={page,extra}] + +\setupcolors + [state=start, + textcolor=white] + +\setuphead + [chapter] + [style=\bfc] + +\definehead[Title][title] + +\definesymbol[MyBullet][\uniqueMPgraphic{bullit}] + +\setupitemgroup[itemize][each][symbol=MyBullet] + +\startmode[asintended] + \usetypescript[cambria] + \setupbodyfont[cambria,14.4pt] +\stopmode + +% interface + +\def\StartItems + {\begingroup + \StartSteps + \startitemize + \def\StartItems{\startitemize\def\StopItems{\stopitemize}}} + +\def\StopItems + {\FlushStep + \stopitemize + \NextPageSymbol + \StopSteps + \endgroup} + +\def\Item + {\def\Item{\FlushStep\item} + \item} + +\def\NextPageSymbol + {\setlayer + [extra] + [preset=rightbottom,offset=2mm] + {\ifnum\realpageno=\lastpage + \reuseMPgraphic{last}% + \else\ifnum\realpageno>1 + \reuseMPgraphic{next}% + \fi\fi + \FlushStep}} + +\def\TitlePage#1#2% + {\startstandardmakeup[bottom=,top=] + \scale[width=\textwidth]{\framed[align=flushleft,foregroundstyle=\bf,frame=off]{#1}} + \vfilll + \hfill\scale[width=.5\textwidth]{\framed[align=flushright,foregroundstyle=\bf,frame=off]{#2}} + \stopstandardmakeup} + +\doifnotmode{demo}{\endinput} + +\starttext + +\TitlePage{I'm running\\out of examples}{Hans Hagen\\Someplace, 2031} + +\Title{Alpha} + +\StartItems +\Item one +\Item two +\Item three +\StopItems + +\Title{Beta} + +\StartItems +\Item four +\Item five +\Item six +\StopItems + +\Title{Gamma} + +\StartItems +\Item seven +\Item eight +\Item nine +\StopItems + +\stoptext diff --git a/tex/context/modules/mkiv/s-characters-properties.mkiv b/tex/context/modules/mkiv/s-characters-properties.mkiv index 0beea4868..3c486c39c 100644 --- a/tex/context/modules/mkiv/s-characters-properties.mkiv +++ b/tex/context/modules/mkiv/s-characters-properties.mkiv @@ -1,5 +1,5 @@ %D \module -%D [ file=s-characters-propertis, +%D [ file=s-characters-properties, %D version=2016.07.24, % moved here %D title=\CONTEXT\ Style File, %D subtitle=Character properties, diff --git a/tex/context/modules/mkiv/s-domotica-settings.lua b/tex/context/modules/mkiv/s-domotica-settings.lua new file mode 100644 index 000000000..e7e8c309b --- /dev/null +++ b/tex/context/modules/mkiv/s-domotica-settings.lua @@ -0,0 +1,98 @@ +if not modules then modules = { } end modules ['s-domotica-settings'] = { + version = 1.001, + comment = "companion to s-domotica-settings.mkiv", + author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", + copyright = "PRAGMA ADE / ConTeXt Development Team", + license = "see context related readme files" +} + +moduledata.domotica = moduledata.domotica or { } +moduledata.domotica.settings = moduledata.domotica.settings or { } + +-- bah, no proper wrapper around value|help + +moduledata.zwave = moduledata.zwave or { } + +local NC = context.NC +local BC = context.BC +local NR = context.NR + +function moduledata.zwave.show_settings(pattern) + + local function show(setting) + + context.starttabulate { "|r|r|r|r|l|p|" } + BC() context("index") + -- BC() context("genre") + -- BC() context("instance") + BC() context("value") + BC() context("min") + BC() context("max") + BC() context("type") + BC() context("label") + BC() NR() + for value in xml.collected(setting,"/Value") do + local at = value.at + NC() context(at.index) + -- NC() context(at.genre) + -- NC() context(at.instance) + NC() context(at.value) + NC() context(at.min) + NC() context(at.max) + NC() context(at.type) + NC() context.escaped(at.label) + NC() NR() + end + context.stoptabulate() + + end + + if string.find(pattern,"%*") then + + local list = dir.glob(pattern) + local last = nil + + for i=1,#list do + + local filename = list[i] + local root = xml.load(filename) + local settings = xml.all(root,"/Product/CommandClass[@id='112']") + + if settings then + + local brand = file.nameonly(file.pathpart(filename)) + local device = file.nameonly(filename) + + if last ~= brand then + context.startchapter { title = brand } + end + + context.startsection { title = device } + for i=1,#settings do + show(settings[i]) + end + context.stopsection() + + if last ~= brand then + last = brand + context.stopchapter() + end + + end + + end + + else + + local root = xml.load(pattern) + local settings = xml.all(root,"/Product/CommandClass[@id='112']") + + if settings then + for i=1,#settings do + show(settings[i]) + end + end + + end + +end diff --git a/tex/context/modules/mkiv/s-domotica-settings.mkiv b/tex/context/modules/mkiv/s-domotica-settings.mkiv new file mode 100644 index 000000000..e8c483e32 --- /dev/null +++ b/tex/context/modules/mkiv/s-domotica-settings.mkiv @@ -0,0 +1,26 @@ +%D \module +%D [ file=s-domotica-setting, +%D version=2016.10.20, +%D title=\CONTEXT\ Style File, +%D subtitle=Domotica Helpers, +%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 module is part of some experiments that I do with gadgets that +%D communicate with zwave, zigbee and other (wireless) protocols used in +%D smart home applications. + +% see mtx-context-domotica.tex for usage example(s) + +\startmodule[domotica-] + +\registerctxluafile{s-domotica-settings}{} + +% \installmodulecommandluasingle \showopenzwavesettings {.....} + +\stopmodule diff --git a/tex/context/modules/mkiv/s-present-banner.mkiv b/tex/context/modules/mkiv/s-present-banner.mkiv index 3f9f360ab..d93c033f2 100644 --- a/tex/context/modules/mkiv/s-present-banner.mkiv +++ b/tex/context/modules/mkiv/s-present-banner.mkiv @@ -1,4 +1,4 @@ -D \module + %D [ file=s-present-banner, %D version=2016.04.30, % around %D title=\CONTEXT\ Style File, diff --git a/tex/context/modules/mkiv/s-present-simple.mkiv b/tex/context/modules/mkiv/s-present-simple.mkiv new file mode 100644 index 000000000..4fadf1f9f --- /dev/null +++ b/tex/context/modules/mkiv/s-present-simple.mkiv @@ -0,0 +1,151 @@ +%D \module +%D [ file=s-present-simple, % was: s-pre-68, +%D version=2009.08.28, +%D title=\CONTEXT\ Style File, +%D subtitle=Presentation Environment Simple, +%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. + +\usemodule[present-stepwise] + +\startmodule[present-simple] + +% style + +\setuppapersize + [S66][S66] + +\setuplayout + [height=middle, + width=middle, + header=0pt, + footer=0pt, + backspace=2cm, + topspace=2cm] + +\setupinteraction + [state=start, + click=no] + +\definecolor[maincolor][r=.4] + +\startreusableMPgraphic{page} + StartPage ; + fill Page enlarged 5mm withcolor "maincolor" ; + StopPage ; +\stopreusableMPgraphic + +\startreusableMPgraphic{next} + fill ultriangle scaled .15PaperWidth withcolor white ; +\stopreusableMPgraphic + +\startreusableMPgraphic{last} + fill boundingbox(ultriangle scaled .15PaperWidth) withcolor white ; +\stopreusableMPgraphic + +\startuniqueMPgraphic{bullit} + fill ultriangle scaled 2ExHeight withcolor white ; +\stopuniqueMPgraphic + +\definelayer + [extra] + [width=\paperwidth, + height=\paperheight] + +\defineoverlay + [page] + [\reuseMPgraphic{page}] + +\setupbackgrounds + [page] + [background={page,extra}] + +\setupcolors + [state=start, + textcolor=white] + +\setuphead + [chapter] + [style=\bfc] + +\definehead + [Title] + [title] + +\definesymbol + [MyBullet] + [\uniqueMPgraphic{bullit}] + +\setupitemgroup + [itemize] + [each] + [symbol=MyBullet] + +\doifelsemode {asintended,atpragma} { + \setupbodyfont[cambria,14.4pt] +} { + \setupbodyfont[pagella,14.4pt] +} + +% interface + +\unexpanded\def\StartItems + {\begingroup + \StartSteps + \startitemize + \unexpanded\def\StartItems{\startitemize\unexpanded\def\StopItems{\stopitemize}}} + +\unexpanded\def\StopItems + {\FlushStep + \stopitemize + \NextPageSymbol + \StopSteps + \endgroup} + +\unexpanded\def\Item + {\unexpanded\def\Item{\FlushStep\item} + \item} + +\unexpanded\def\NextPageSymbol + {\setlayer + [extra] + [preset=rightbottom,offset=2mm] + {\ifnum\realpageno=\lastpage\relax + \reuseMPgraphic{last}% + \else\ifnum\realpageno>\plusone + \reuseMPgraphic{next}% + \fi\fi + \FlushStep}} + +\unexpanded\def\TitlePage#1#2% + {\startstandardmakeup[bottom=,top=] + \scale[width=\textwidth]{\framed[align=flushleft,foregroundstyle=\bf,frame=off]{#1}} + \vfilll + \hfill\scale[width=.5\textwidth]{\framed[align=flushright,foregroundstyle=\bf,frame=off]{#2}} + \stopstandardmakeup} + +\unexpanded\def\StartTopic#1% + {\Title{#1}} + +\unexpanded\def\StopTopic + {\page} + +\startsetups document:start + \TitlePage + {\documentvariable{title}} + {\documentvariable{author}\\ + \documentvariable{location}} +\stopsetups + +\stopmodule + +\continueifinputfile{s-present-simple.mkiv} + +\usemodule[present-common] + +\inputpresentationfile{examples/present-simple-001.tex} diff --git a/tex/context/modules/mkiv/s-present-slanted.mkiv b/tex/context/modules/mkiv/s-present-slanted.mkiv new file mode 100644 index 000000000..a68e0cd8e --- /dev/null +++ b/tex/context/modules/mkiv/s-present-slanted.mkiv @@ -0,0 +1,206 @@ +%D \module +%D [ file=s-present-slanted, % was: s-pre-64, +%D version=2006.05.11, +%D title=\CONTEXT\ Style File, +%D subtitle=Presentation Environment Slanted, +%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 is kept as reference (but can be usedof course). It was used at the +%D TUG conference in San Diego in 2007 (the very early days if \LUATEX\ and \MKIV). +%D +%D This was one of he four presentations, each with a different style. The other +%D styles were quite ok but I just lack time (ane motivation) to generalize them, + +\usemodule[s][pre-60] + +\newcounter\shapesynctag +\newdimen \slantedshapedimen +\newdimen \slantedshapestep +\newdimen \slantedshapeleftskip +\newdimen \slantedshapeoffset +\newdimen \slantedshapeextra +\newdimen \slantedshapedelta + +\positioningtrue + +\unexpanded\def\AdaptShape + {\doglobal\increment\shapesynctag + \getnoflines\textheight + \slantedshapestep\dimexpr\slantedshapeleftskip/\noflines\relax + \leftskip\slantedshapeleftskip + \scratchdimen\dimexpr + \MPy{text:\MPp\shapesynctag} + +\MPh{text:\MPp\shapesynctag} + -\topskip + -\MPy\shapesynctag + +\slantedshapeextra + \relax + \getnoflines\scratchdimen + \slantedshapedimen \noflines \slantedshapestep + \scratchtoks\emptytoks + \dorecurse{30} + {\appendetoks + \the\dimexpr + -\slantedshapedimen + +\slantedshapeoffset + +\slantedshapedelta + \relax + \space + \the\dimexpr + \hsize + -2\slantedshapeoffset + \relax + \space + \to\scratchtoks + \advance\slantedshapedimen \slantedshapestep}% + \parshape 30 \the\scratchtoks + \strut\xypos\shapesynctag} + +\setuppapersize[S6][S6] + +\setupinteraction + [state=start, + click=no] + +\setupinteractionscreen + [option=max] + +\setuplayout + [backspace=12pt, + topspace=24pt, + height=middle, + width=middle, + header=0pt, + footer=0pt] + +\definecolor[maincolor][b=.5] +\definecolor[somecolor][g=.5] +\definecolor[morecolor][r=.5] + +\setupcolors + [textcolor=maincolor] + +\setupbodyfont + [pagella] + +\setupbackgrounds + [text]% [text] + [background={base,text,invoke}] + +\definelayer + [text] + [width=\textwidth, + height=\textheight] + +\definelayer + [base] + [width=\textwidth, + height=\textheight] + +\definetype [epet] [style=,color=morecolor] +\setuptype [style=,color=somecolor] +\slantedshapeleftskip150pt +\slantedshapeoffset 12pt +\slantedshapeextra 10pt + +\startreusableMPgraphic{page} + StartPage ; + fill Page withcolor \MPcolor{maincolor} ; + path p ; p := Field[Text][Text] enlarged 6pt ; + p := + llcorner p shifted (0,-12pt) -- + lrcorner p shifted (-150pt,0) -- + urcorner p shifted (0,12pt) -- + ulcorner p shifted (150pt,0) -- + cycle ; + fill p + withcolor .9white ; + StopPage ; +\stopreusableMPgraphic + +\defineoverlay + [page] + [\reuseMPgraphic{page}] + +\setupbackgrounds + [page] + [background=page] + +\setupalign + [flushleft] + +\unexpanded\def\StartItem + {\blank[line] + \begingroup + \EveryPar {\AdaptShape}} % beware: \ABBREV aan begin gaat fout + +\unexpanded\def\StopItem + {\endgraf + \endgroup + \blank[line]} + +\unexpanded\def\StartType + {\blank[halfline] + \begingroup + \EveryPar {\AdaptShape} + \dontleavehmode \quad} + +\unexpanded\def\StopType + {\endgraf + \endgroup + \blank[halfline]} + +\unexpanded\def\StartTopic#1% + {\page + \setlayer + [text] + [preset=lefttop, + rotation=90] + {\color[white]{\scale[height=24pt]{\strut#1}}}} + +\unexpanded\def\StopTopic + {\page} + +\startsetups document:start + \ifdefined\TitleFont \else + \definedfont[TitleFont][Bold*default sa 4] + \fi + \ifdefined\MainTextFont + \MainTextFont + \fi + \Banner{\documentvariable{location}} + \StartTopic{\documentvariable{author}} + \startstandardmakeup + \TitleFont + \setupinterlinespace[line=3ex] + \vfill + \def\docommand##1{\StartItem\dontleavehmode\quad{\morecolor##1}\StopItem} + \processcommacommand[\documentvariable{title}]\docommand + \vfill + \stopstandardmakeup + \StopTopic +\stopsetups + +\startsetups document:stop +\stopsetups + +\unexpanded\def\Banner#1% + {\setuplayer + [base] + [state=repeat] + \setlayer + [base] + [preset=rightbottom] + {\color[white]{\scale[height=9pt]{\strut#1}}}} + +\continueifinputfile{s-present-slanted.mkiv} + +\usemodule[present-common] + +\inputpresentationfile{tug/2007/tug-2007-fonts.tex} diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index e72fa8027..0fb2eff32 100644 --- a/tex/generic/context/luatex/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : c:/data/develop/context/sources/luatex-fonts-merged.lua -- parent file : c:/data/develop/context/sources/luatex-fonts.lua --- merge date : 11/01/16 10:08:25 +-- merge date : 11/04/16 11:06:23 do -- begin closure to overcome local limits and interference -- cgit v1.2.3