Hi, Simple backgrounds are not working with the latest beta. The following has no background color. \setupbackground [background=color, backgroundcolor=red] \starttext \startbackground ABC \stopbackground \stoptext Aditya
Am 26.05.2012 um 04:57 schrieb Aditya Mahajan:
Hi,
Simple backgrounds are not working with the latest beta. The following has no background color.
\setupbackground [background=color, backgroundcolor=red] \starttext \startbackground ABC \stopbackground \stoptext
Name clash in pack-rul.mkiv. \startbackgorund uses \currentbackground for the instance of the environment and \framed uses also \currentbackground when it does process the list of backgrounds, changing the macro name in pack-rul.mkiv to \m_framed_background helps. \unprotect %\let\currentbackground\empty \let\m_framed_background\empty \def\pack_framed_process_background % {\ifcsname\??overlaybuiltin\currentbackground\endcsname {\ifcsname\??overlaybuiltin\m_framed_background\endcsname \pack_framed_process_background_indeed_internal % \else\ifcsname\??overlay\currentbackground\endcsname \else\ifcsname\??overlay\m_framed_background\endcsname \pack_framed_process_background_indeed_external \fi\fi} \def\pack_framed_process_background_indeed_internal % : in name {\bgroup \setbox\b_framed_extra\hbox{%\bgroup \ifzeropt\framedbackgroundoffset % \csname\??overlaybuiltin\currentbackground\endcsname \csname\??overlaybuiltin\m_framed_background\endcsname \else \kern-\framedbackgroundoffset % \hbox{\csname\??overlaybuiltin\currentbackground\endcsname}% \hbox{\csname\??overlaybuiltin\m_framed_background\endcsname}% \fi }%\egroup \wd\b_framed_extra\zeropoint \ht\b_framed_extra\framedbackgroundheight \dp\b_framed_extra\framedbackgrounddepth \box\b_framed_extra \egroup} \def\pack_framed_process_background_indeed_external {\pack_framed_overlay_initialize \bgroup \setbox\b_framed_extra\hbox{%\bgroup \ifzeropt\framedbackgroundoffset % \csname\??overlay\currentbackground\endcsname \csname\??overlay\m_framed_background\endcsname \else \kern-\framedbackgroundoffset % \hbox{\csname\??overlay\currentbackground\endcsname}% \hbox{\csname\??overlay\m_framed_background\endcsname}% \fi }%\egroup \wd\b_framed_extra\zeropoint \ht\b_framed_extra\framedbackgroundheight \dp\b_framed_extra\framedbackgrounddepth \box\b_framed_extra \egroup} \def\pack_framed_process_backgrounds#1,#2% #2 gobbles spaces (we could avoid one catch if we have nextbackground) % {\edef\currentbackground{#1}% {\edef\m_framed_background{#1}% % \ifx\currentbackground\s!unknown\else \ifx\m_framed_background\s!unknown\else \pack_framed_process_background \expandafter\pack_framed_process_backgrounds \fi#2} \protect \setupbackground [background=color, backgroundcolor=yellow] \starttext \startbackground ABC \stopbackground \stoptext Wolfgang
On 26-5-2012 10:56, Wolfgang Schuster wrote:
Am 26.05.2012 um 04:57 schrieb Aditya Mahajan:
Hi,
Simple backgrounds are not working with the latest beta. The following has no background color.
\setupbackground [background=color, backgroundcolor=red] \starttext \startbackground ABC \stopbackground \stoptext
Name clash in pack-rul.mkiv.
\startbackgorund uses \currentbackground for the instance of the environment and \framed uses also \currentbackground when it does process the list of backgrounds, changing the macro name in pack-rul.mkiv to \m_framed_background helps.
\unprotect
%\let\currentbackground\empty \let\m_framed_background\empty
Ha, you beat me in maling ... i just changed that in the same way ... but i was wondering why a public name was used .. can it be that \currentbackground is used in modules or styles (e.g. implementing alternative built in backgrounds as I remember that Aditya has some plugs)? If so then at some point we might need a public name but let's wait till it shows up. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Sat, 26 May 2012, Hans Hagen wrote:
Ha, you beat me in maling ... i just changed that in the same way ...
Thanks to both of you.
but i was wondering why a public name was used .. can it be that \currentbackground is used in modules or styles (e.g. implementing alternative built in backgrounds as I remember that Aditya has some plugs)? If so then at some point we might need a public name but let's wait till it shows up.
I remeber using \setupbackgrounds[page][background={bck1, \currentbackground, bck2}] in some of my local styles. It is easy for me to adapt that. \currentbackground is not used in any of my public modules. Aditya
On 26-5-2012 16:07, Aditya Mahajan wrote:
On Sat, 26 May 2012, Hans Hagen wrote:
Ha, you beat me in maling ... i just changed that in the same way ...
Thanks to both of you.
but i was wondering why a public name was used .. can it be that \currentbackground is used in modules or styles (e.g. implementing alternative built in backgrounds as I remember that Aditya has some plugs)? If so then at some point we might need a public name but let's wait till it shows up.
I remeber using
\setupbackgrounds[page][background={bck1, \currentbackground, bck2}]
in some of my local styles. It is easy for me to adapt that.
\currentbackground is not used in any of my public modules.
maybe we can have \currentframedbackground then (if needed) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (3)
-
Aditya Mahajan
-
Hans Hagen
-
Wolfgang Schuster