ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
To: ntg-context@ntg.nl
Subject: Re: Repeat backgrounds on slides
Date: Fri, 14 Feb 2020 19:53:43 +0100	[thread overview]
Message-ID: <20200214195343.d5d3f92421f5a4f01dfa8ba1@gmail.com> (raw)
In-Reply-To: <62b23d37-e724-566c-be94-b1a0a7ddad7f@mailbox.org>

On Fri, 14 Feb 2020 09:10:22 +0100
"Jan U. Hasecke" <juh+ntg-context@mailbox.org> wrote:

> Am 13.02.20 um 20:39 schrieb Wolfgang Schuster:
> 
> > 
> > This is normal behaviour for layers but you can repeat it on every page with
> > 
> >     \definelayer [bg:...] [state=repeat]
> 
> Thanks. There was a dark idea of this in the back of my brain.
> 
> > 
> > In your case a simple overlay is the simpler solution to get repeated images on every page, i.e.
> > 
> >   \defineoverlay [bg:hs2020-mond] [{\externalfigure[background.jpg][height=\paperheight]}]
> > 
> > or
> > 
> >   \defineoverlay [bg:hs2020-mond] [\overlayfigure{background.jpg}]
> 
> Is this defining and setting in one command?

You can also pass a variable as argument in the second argument,
e.g. in the following example I set the background image with
the start of each new slide.

\setupexternalfigures[location=default]

\defineoverlay
  [SlideBackground]
  [\doifsomething
     {\structureuservariable{background}}
     {\externalfigure[\structureuservariable{background}][factor=max]}]

\setuppapersize[S6]
\setupbackgrounds[page][background=SlideBackground]

%\setuppapersize[S6][S6,oversized]
%\setupbackgrounds[paper][background=SlideBackground]
%\setuplayout[location=middle]

\definehead[Slide][chapter]

\starttext

\startSlide[title=Cow][background=cow]
\dorecurse{3}{\dontleavehmode\page}
\stopSlide

\startSlide[title=Hacker][background=hacker]
\dorecurse{3}{\dontleavehmode\page}
\stopSlide

\stoptext

> Can I set the offset in this way, too?

It depends on your requirements, to get equal bleed on all
four sides you can just increase the width/height of the image
with the offset 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:[~2020-02-14 18:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-13  8:19 juh
2020-02-13 19:39 ` Wolfgang Schuster
2020-02-14  8:10   ` Jan U. Hasecke
2020-02-14 18:53     ` Wolfgang Schuster [this message]
2020-02-15 13:56       ` Jan U. Hasecke

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=20200214195343.d5d3f92421f5a4f01dfa8ba1@gmail.com \
    --to=wolfgang.schuster.lists@gmail.com \
    --cc=ntg-context@ntg.nl \
    /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).