ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster via ntg-context <ntg-context@ntg.nl>
To: juh <juh+ntg-context@mailbox.org>,
	mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
Subject: Re: layer disappears when showframe is set
Date: Thu, 26 Aug 2021 17:52:11 +0200	[thread overview]
Message-ID: <2f53e9aa-907f-4fef-aef3-9662c7cca57b@gmail.com> (raw)
In-Reply-To: <YSeNN/E4AkrM2JpM@sokrates>

juh via ntg-context schrieb am 26.08.2021 um 14:46:
> Hi,
>
> this sample shows that the image in a layer in header disappears if showframe is
> set.
>
> \setupexternalfigures[location=default]
> \definelayer[Cow]
> [x=0, y=0]
>
> \setlayer[Cow]
> [x=10em, y=0mm]
> {\externalfigure[cow][height=\lineheight]}
> \setupbackgrounds[header][background=Cow]
>
> \showframe
>
> \starttext
> \input knuth
> \stoptext

The \showframe command is just a wrapper for \setupbackgrounds to enable 
the frames on certain parts of the page.

One of the settings which are passed to \setupbacgrounds when you use 
\showframe is "background=" which resets all previous values of the 
background-key.

To keep the layer setting you have to move \showframe above your own 
\setupbackgrounds command because the reset of the background-key 
happens then before you pass your own value.

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2021-08-26 15:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-26 12:46 juh via ntg-context
2021-08-26 15:52 ` Wolfgang Schuster via ntg-context [this message]
2021-08-27  6:17   ` juh via ntg-context

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2f53e9aa-907f-4fef-aef3-9662c7cca57b@gmail.com \
    --to=ntg-context@ntg.nl \
    --cc=juh+ntg-context@mailbox.org \
    --cc=wolfgang.schuster.lists@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).