From a8dbeb5ac221abb3e657065cd5c4050c13c0b7f3 Mon Sep 17 00:00:00 2001 From: Context Git Mirror Bot Date: Wed, 15 Oct 2014 11:15:03 +0200 Subject: 2014-10-15 10:41:00 --- tex/context/base/cont-new.mkiv | 2 +- tex/context/base/context-version.pdf | Bin 4381 -> 4388 bytes tex/context/base/context.mkiv | 2 +- tex/context/base/page-bck.mkiv | 44 ++++++++++++++++++++- tex/context/base/publ-ini.lua | 1 - tex/context/base/status-files.pdf | Bin 24732 -> 24720 bytes tex/context/base/status-lua.pdf | Bin 333866 -> 333864 bytes tex/generic/context/luatex/luatex-fonts-merged.lua | 2 +- 8 files changed, 46 insertions(+), 5 deletions(-) diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index 25d551ed7..18eedbd8e 100644 --- a/tex/context/base/cont-new.mkiv +++ b/tex/context/base/cont-new.mkiv @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2014.10.14 18:52} +\newcontextversion{2014.10.15 10:39} %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/context-version.pdf b/tex/context/base/context-version.pdf index 270ae1550..bddcada0f 100644 Binary files a/tex/context/base/context-version.pdf and b/tex/context/base/context-version.pdf differ diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index fdfbf4292..2afea218d 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -28,7 +28,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2014.10.14 18:52} +\edef\contextversion{2014.10.15 10:39} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/page-bck.mkiv b/tex/context/base/page-bck.mkiv index 0246e8eb6..bfdbd56c1 100644 --- a/tex/context/base/page-bck.mkiv +++ b/tex/context/base/page-bck.mkiv @@ -55,7 +55,7 @@ %D This is the only spot where we hav ea low level dependency on the way %D parent chains are defined but we want the speed. -\def\page_backgrounds_check_background +\unexpanded\def\page_backgrounds_check_background {\ifcsname\??framed\currentotrbackground:\c!background\endcsname \edef\page_background_temp{\csname\??framed\currentotrbackground:\c!background\endcsname}% \ifx\page_background_temp\empty @@ -607,6 +607,48 @@ \setfalse\c_page_backgrounds_some +%D Sometimes you have a document wide (page) background but need to overload it +%D locally. In such case (at least in my experience) the only values that get set +%D are the background and backgroundcolor (if set at all). A full inheritance chain +%D would complicate things because then we need to use named backgrounds which in +%D turn will make this mechanism slower. I considered independent local backgrounds +%D but that also complicates the code (not that much) but isolation means that we +%D need to set more parameters each time. The following simple approach proabbly +%D suits most usage. +%D +%D \starttyping +%D \starttext +%D \setupbackgrounds[page][background=color,backgroundcolor=red] +%D \input tufte \page +%D \setupbackgrounds[page][background=,backgroundcolor=] +%D \input tufte \page +%D \setupbackgrounds[page][background=color,backgroundcolor=red] +%D \input tufte \page +%D \pushbackground[page] +%D \setupbackgrounds[page][background=color,backgroundcolor=green] +%D \input tufte \page +%D \popbackground +%D \input tufte \page +%D \stoptext +%D \stoptyping + +\unexpanded\def\pushbackground[#1]% + {\pushmacro\popbackground + \edef\currentotrbackground{\??layoutbackgrounds#1}% + \unexpanded\edef\popbackground + {\setupframed + [\currentotrbackground] + [\c!background=\namedframedparameter{\currentotrbackground}\c!background, + \c!backgroundcolor=\namedframedparameter{\currentotrbackground}\c!backgroundcolor]% + \page_backgrounds_check_background + \popmacro\popbackground}% + \setupframed + [\currentotrbackground] + [\c!background=,\c!backgroundcolor=]% + \page_backgrounds_check_background} + +\let\popbackground\relax + \protect \endinput % %D The next series is used in local (for instance floating) backgrounds. diff --git a/tex/context/base/publ-ini.lua b/tex/context/base/publ-ini.lua index 2caa9e6c7..489145e08 100644 --- a/tex/context/base/publ-ini.lua +++ b/tex/context/base/publ-ini.lua @@ -1386,7 +1386,6 @@ function lists.prepareentries(dataset) li[3] = number else -- weird, this shouldn't happen - li[3] = 0 end end end diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf index 7d02f4285..5552432c8 100644 Binary files a/tex/context/base/status-files.pdf and b/tex/context/base/status-files.pdf differ diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf index 166fc8ba6..22fb4cf82 100644 Binary files a/tex/context/base/status-lua.pdf and b/tex/context/base/status-lua.pdf differ diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 76c20c2f6..50c3c04f0 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 : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 10/14/14 18:52:40 +-- merge date : 10/15/14 10:39:18 do -- begin closure to overcome local limits and interference -- cgit v1.2.3