diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-03-26 13:38:18 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-03-26 13:38:18 +0100 |
commit | 788487819ccf38a8478cc2afd88e0c0b088d0ec1 (patch) | |
tree | 215addbe3b9e293c2958227e7fc8923880b2e71f /tex/context/base/mkiv/colo-run.mkiv | |
parent | adfe72d5a0c9d7bdc1bd7bc8faabb4d05e21d70a (diff) | |
download | context-788487819ccf38a8478cc2afd88e0c0b088d0ec1.tar.gz |
2016-03-26 13:07:00
Diffstat (limited to 'tex/context/base/mkiv/colo-run.mkiv')
-rw-r--r-- | tex/context/base/mkiv/colo-run.mkiv | 81 |
1 files changed, 42 insertions, 39 deletions
diff --git a/tex/context/base/mkiv/colo-run.mkiv b/tex/context/base/mkiv/colo-run.mkiv index 1b8b87c75..37a9de190 100644 --- a/tex/context/base/mkiv/colo-run.mkiv +++ b/tex/context/base/mkiv/colo-run.mkiv @@ -45,32 +45,33 @@ {\dodoubleargument\colo_show_palet} \gdef\colo_show_palet[#1][#2]% - {\ifcsname\??colorpalet#1\endcsname - \doifelseinset\v!vertical{#2} \colo_palets_show_vertical \colo_palets_show_horizontal [#1][#2]% - \fi} - -\gdef\colo_palets_show_vertical[#1][#2]% - {\vbox - {\forgetall - \setlocalhsize - \hsize\localhsize - \offinterlineskip - \setuppalet[#1] - \tabskip\zeropoint - \def\colo_palets_show_palet##1% - {\doifelseinset\v!number{#2}{##1\hskip.5\emwidth}{}% - \aligntab - \color [##1]{\vrule\s!width3\emwidth\s!height\strutht\s!depth\strutdp}% - \graycolor[##1]{\vrule\s!width3\emwidth\s!height\strutht\s!depth\strutdp}% - \aligntab - \doifinset\v!value{#2}{\hskip.5\emwidth\colorvalue{##1}}% - \crcr} - \halign - {\hss\alignmark\alignmark\aligntab\hss\alignmark\alignmark\hss\aligntab\alignmark\alignmark\cr - \aligntab\doifinset\v!name{#2}{\strut#1}\aligntab\cr - \colo_palets_process[#1]\colo_palets_show_palet\crcr}}} - -\gdef\colo_palets_show_horizontal[#1][#2]% todo: bTABLE etc + {\doifelsecolorpalet{#1} + {\doifelseinset\v!vertical{#2} \colo_palets_show_vertical \colo_palets_show_horizontal {#1}{#2}}% + {}} + +\gdef\colo_palets_show_vertical#1#2% + {\begingroup + \forgetall + \setlocalhsize + \hsize\localhsize + \offinterlineskip + \setuppalet[#1] + \tabskip\zeropoint + \def\colo_palets_show_palet##1% + {\doifelseinset\v!number{#2}{##1\hskip.5\emwidth}{}% + \aligntab + \color [##1]{\vrule\s!width3\emwidth\s!height\strutht\s!depth\strutdp}% + \graycolor[##1]{\vrule\s!width3\emwidth\s!height\strutht\s!depth\strutdp}% + \aligntab + \doifinset\v!value{#2}{\hskip.5\emwidth\colorvalue{##1}}% + \crcr} + \halign + {\hss\alignmark\alignmark\aligntab\hss\alignmark\alignmark\hss\aligntab\alignmark\alignmark\cr + \aligntab\doifinset\v!name{#2}{\strut#1}\aligntab\cr + \colo_palets_process[#1]\colo_palets_show_palet\crcr}% + \endgroup} + +\gdef\colo_palets_show_horizontal#1#2% todo: bTABLE etc {\vbox {\forgetall \setlocalhsize @@ -116,29 +117,31 @@ \crcr}}} \gdef\colo_palets_process[#1]% - {\expanded{\globalprocesscommalist[\getvalue{\??colorpalet#1}]}} + {\getpaletlist[#1]% + \normalexpanded{\globalprocesscommalist[\paletlist]}} \unexpanded\gdef\comparepalet {\dosingleargument\colo_palets_compare} \gdef\colo_palets_compare[#1]% - {\ifcsname\??colorpalet#1\endcsname - \hbox - {\colo_palets_compare_indeed\color[#1]% - \quad - \colo_palets_compare_indeed\graycolor[#1]}% - \fi} - -\gdef\colo_palets_compare_indeed#1[#2]% + {\doifelsecolorpalet{#1}% + {\hbox + {\colo_palets_compare_indeed\color{#1}% + \quad + \colo_palets_compare_indeed\graycolor{#1}}}% + {}} + +\gdef\colo_palets_compare_indeed#1#2% {\vbox {\forgetall \setlocalhsize \hsize\localhsize \offinterlineskip \setuppalet[#2] - \getcommacommandsize[\getvalue{\??colorpalet#2}] + \getpaletsize[#2]% + \getpaletlist[#2]% \scratchwidth2\emwidth\relax - \hsize\commalistsize\scratchwidth + \hsize\paletsize\scratchwidth \def\colo_palets_compare##1% {\hbox {\setbox0\hbox @@ -149,9 +152,9 @@ {\def\colo_palets_compare####1% {\hbox to \scratchwidth {\hss#1[####1]{\vrule\s!width.5\scratchwidth\s!height2.25\exheight\s!depth-.75\exheight}\hss}}% - \processcommacommand[\getvalue{\??colorpalet#2}]\colo_palets_compare}} + \processcommacommand[\paletlist]\colo_palets_compare}} \endgraf} - \processcommacommand[\getvalue{\??colorpalet#2}]\colo_palets_compare}} + \processcommacommand[\paletlist]\colo_palets_compare}} %D Groups |