diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/node-bck.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/base/node-bck.mkiv | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/context/base/node-bck.mkiv b/Master/texmf-dist/tex/context/base/node-bck.mkiv index 858bd40b76f..25739c56042 100644 --- a/Master/texmf-dist/tex/context/base/node-bck.mkiv +++ b/Master/texmf-dist/tex/context/base/node-bck.mkiv @@ -13,8 +13,9 @@ \writestatus{loading}{ConTeXt Node Support / Backgrounds} -%D This is first attempt to replacing backgrounds in a few -%D tables mechanisms. +%D This is first attempt to replacing backgrounds in a few tables +%D mechanisms. When used more frequently, we can store the color +%D spec in the attribute. \unprotect @@ -24,6 +25,10 @@ {\ctxlua{nodes.tasks.enableaction("shipouts","nodes.handlers.backgrounds")}% \glet\node_backgrounds_boxes_initialize\donothing} +\def\node_backgrounds_align_initialize % will move to lua + {\ctxlua{nodes.tasks.enableaction("shipouts","nodes.handlers.alignbackgrounds")}% + \glet\node_backgrounds_align_initialize\donothing} + % \backgroundvbox[green] {\input tufte } \par % \backgroundvbox[blue] {\input ward } \par % \backgroundvbox[red] {\input knuth } \par @@ -38,7 +43,7 @@ \def\thecolorattr#1% {attr \colormodelattribute \attribute\colormodelattribute - attr \colorattribute \csname\??colorattribute #1\endcsname + attr \colorattribute \csname\??colorattribute#1\endcsname attr \transparencyattribute \thetransparencyattribute{#1} } % can be optimized \def\backgroundcolorattr#1% @@ -49,10 +54,16 @@ \fi\fi} \def\thebackgroundcolorattr#1% - {attr \backgroundattribute \plusone - attr \colormodelattribute \attribute\colormodelattribute - attr \colorattribute \csname\??colorattribute#1\endcsname - attr \transparencyattribute \thetransparencyattribute{#1} } % can be optimized + {attr \backgroundattribute \plusone + attr \colormodelattribute \attribute\colormodelattribute + attr \colorattribute \csname\??colorattribute#1\endcsname + attr \transparencyattribute \thetransparencyattribute{#1} } % can be optimized + +\def\thealignbackgroundcolorattr#1% + {attr \alignbackgroundattribute \plusone + attr \colormodelattribute \attribute\colormodelattribute + attr \colorattribute \csname\??colorattribute#1\endcsname + attr \transparencyattribute \thetransparencyattribute{#1} } % can be optimized \unexpanded\def\backgroundhbox{\node_backgrounds_boxes_add\hbox} \unexpanded\def\backgroundvbox{\node_backgrounds_boxes_add\vbox} @@ -84,7 +95,6 @@ % \thebackgroundcolorattr{#2}% % \fi\fi} - % \def\backgroundvbox[#1]{\vbox \backgroundcolorattr{#1}} % \def\backgroundvtop[#1]{\vtop \backgroundcolorattr{#1}} % \def\backgroundhbox[#1]{\hbox \backgroundcolorattr{#1}} |