Re: [NTG-context] Repeat backgrounds on slides

2020-02-15 Thread Jan U. Hasecke
\structureuservariable – this is really cool.

Thanks a lot Wolfgang.
juh

Am 14.02.20 um 19:53 schrieb Wolfgang Schuster:
> \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

___
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
___


Re: [NTG-context] Repeat backgrounds on slides

2020-02-14 Thread Wolfgang Schuster
On Fri, 14 Feb 2020 09:10:22 +0100
"Jan U. Hasecke"  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
___


Re: [NTG-context] Repeat backgrounds on slides

2020-02-14 Thread Jan U. Hasecke
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? Can I set the offset in
this way, too?

juh

___
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
___


Re: [NTG-context] Repeat backgrounds on slides

2020-02-13 Thread Wolfgang Schuster
On Thu, 13 Feb 2020 09:19:10 +0100
juh  wrote:

> Hi all,
> 
> I am a little bit confused as I never had this problem, although I often use
> backgrounds and layers.
> 
> \definelayer[bg:hs2020-mond]
> [x=0, y=0, width=\paperwidth, height=\paperheight]
> 
> \setlayer[bg:hs2020-mond]
> [x=0mm, y=0mm]
> {\externalfigure[background.jpg][height=\paperwidth]}
> 
> Ususally I call the background after a head command like \starttitle or when I
> create slides like this 
> 
> \startslide[title={foobar}]
> \setupbackgrounds[page][background=bg:hs2020-mond]
> ...
> \stopslide
> 
> The problem is that I cannot call the background on another slide.
> It seems as if the layer is gone after the first usage.


This is normal behaviour for layers but you can repeat it on every page with

\definelayer [bg:...] [state=repeat]


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}]


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
___