ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] background= key not working in \startbackground and \starttextbackground
@ 2024-06-06 12:48 Aditya Mahajan
  2024-06-06 14:14 ` [NTG-context] " Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Aditya Mahajan @ 2024-06-06 12:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 1063 bytes --]

Hi,

I am testing some of my old styles on latest context and find that the background key of \startbackground and \starttextbackground doesn't work (\framed is working as expected). Here is a MWE:

\startuseMPgraphic{background:test}
    fill OverlayBox withcolor 0.75[red,white];
    draw OverlayBox withcolor red withpen pencircle scaled 2bp;
\stopuseMPgraphic

\defineoverlay[background:test][\useMPgraphic{background:test}]

\definetextbackground
    [testA]
    [	  
        location=paragraph,
        background=background:test,
	frame=off,
    ]

\definebackground
    [testB]
    [	  
        location=paragraph,
        background=background:test,
	frame=off,
    ]

\defineframedtext
    [testC]
    [	  
        background=background:test,
	frame=off,
	width=broad,
    ]

\starttext
\starttestA
  \input tufte
\stoptestA

\starttestB
  \input tufte
\stoptestB

\starttestC
  \input tufte
\stoptestC
\stoptext

testA gives nothing, testB gives a gray(!) background, and testC works as expected.

The output is attached. I am using 2024.05.31.

Aditya

[-- Attachment #2: Type: application/pdf, Size: 10658 bytes --]

[-- Attachment #3: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [NTG-context] Re: background= key not working in \startbackground and \starttextbackground
  2024-06-06 12:48 [NTG-context] background= key not working in \startbackground and \starttextbackground Aditya Mahajan
@ 2024-06-06 14:14 ` Wolfgang Schuster
  2024-06-06 19:44   ` Aditya Mahajan
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2024-06-06 14:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Aditya Mahajan

Aditya Mahajan schrieb am 06.06.2024 um 14:48:
> Hi,
>
> I am testing some of my old styles on latest context and find that the background key of \startbackground and \starttextbackground doesn't work (\framed is working as expected). Here is a MWE:

1. \starttextbackground isn't based on \framed and has a mp-key to 
assign a metapost graphic.

2. \startbackground needs to be fixed but it's simple, replace 
\defcsname with \edefcsname in pack-bck.mklx:

\appendtoks
\frozen\protected\instance\defcsname\e!start\currentbackground\endcsname{\pack_backgrounds_start 
[\currentbackground]}%
     \frozen\protected\instance\defcsname\e!stop 
\currentbackground\endcsname{\pack_backgrounds_stop }%
     \frozen\protected\instance\defcsname 
\currentbackground\endcsname{\pack_backgrounds_direct[\currentbackground]}%
\to \everydefinebackground

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [NTG-context] Re: background= key not working in \startbackground and \starttextbackground
  2024-06-06 14:14 ` [NTG-context] " Wolfgang Schuster
@ 2024-06-06 19:44   ` Aditya Mahajan
  0 siblings, 0 replies; 3+ messages in thread
From: Aditya Mahajan @ 2024-06-06 19:44 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 1024 bytes --]

On Thu, 6 Jun 2024, Wolfgang Schuster wrote:

> Aditya Mahajan schrieb am 06.06.2024 um 14:48:
> > Hi,
> >
> > I am testing some of my old styles on latest context and find that the
> > background key of \startbackground and \starttextbackground doesn't work
> > (\framed is working as expected). Here is a MWE:
> 
> 1. \starttextbackground isn't based on \framed and has a mp-key to assign a
> metapost graphic.

Thanks. I had forgotten that.

> 2. \startbackground needs to be fixed but it's simple, replace \defcsname
> with \edefcsname in pack-bck.mklx:
> 
> \appendtoks
> \frozen\protected\instance\defcsname\e!start\currentbackground\endcsname{\pack_backgrounds_start
> [\currentbackground]}%
>     \frozen\protected\instance\defcsname\e!stop
> \currentbackground\endcsname{\pack_backgrounds_stop }%
>     \frozen\protected\instance\defcsname
> \currentbackground\endcsname{\pack_backgrounds_direct[\currentbackground]}%
> \to \everydefinebackground

Thanks. I'll patch it locally. 

Aditya

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-06-06 19:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-06 12:48 [NTG-context] background= key not working in \startbackground and \starttextbackground Aditya Mahajan
2024-06-06 14:14 ` [NTG-context] " Wolfgang Schuster
2024-06-06 19:44   ` Aditya Mahajan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).