* repeat layer recto pages
@ 2021-11-09 3:18 jbf via ntg-context
2021-11-09 15:05 ` Pablo Rodriguez via ntg-context
0 siblings, 1 reply; 4+ messages in thread
From: jbf via ntg-context @ 2021-11-09 3:18 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: jbf
I want a particular layer to repeat on recto pages only, but I don't
want this to happen in frontmatter, only in bodymatter.
This is what I have done, just before the first chapter after
\startbodymatter (but unsuccessfully; the layer repeats for every page
at the moment. I must have omitted something).
\startbodymatter
\setupbackgrounds
[rightpage]
[background=butterfly]
\startchapter[title={Chapter title}]
\definelayer[butterfly]
[x=0mm, y=0mm,repeat=yes,width=\paperwidth, height=\paperheight]
\setlayer[butterfly]
[hoffset=.99\textwidth, voffset=1cm]
{\externalfigure[bfly.jpg][width=1.5cm]}
\setupbackgrounds[page][background=butterfly]
etc.
Any thoughts?
Julian
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: repeat layer recto pages
2021-11-09 3:18 repeat layer recto pages jbf via ntg-context
@ 2021-11-09 15:05 ` Pablo Rodriguez via ntg-context
2021-11-09 22:12 ` jbf via ntg-context
0 siblings, 1 reply; 4+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2021-11-09 15:05 UTC (permalink / raw)
To: jbf via ntg-context; +Cc: Pablo Rodriguez
On 11/9/21 4:18 AM, jbf via ntg-context wrote:
> I want a particular layer to repeat on recto pages only, but I don't
> want this to happen in frontmatter, only in bodymatter.
>
> This is what I have done, just before the first chapter after
> \startbodymatter (but unsuccessfully; the layer repeats for every page
> at the moment. I must have omitted something).
Hi Julian,
this is what you want:
\startsectionblockenvironment[bodypart]
\setupbackgrounds
[rightpage]
[background=butterfly]
\stopsectionblockenvironment
> \startbodymatter
>
> \setupbackgrounds
> [rightpage]
> [background=butterfly]
>
> \startchapter[title={Chapter title}]
> \definelayer[butterfly]
> [x=0mm, y=0mm,repeat=yes,width=\paperwidth, height=\paperheight]
> \setlayer[butterfly]
> [hoffset=.99\textwidth, voffset=1cm]
> {\externalfigure[bfly.jpg][width=1.5cm]}
> \setupbackgrounds[page][background=butterfly]
The last line adds backgrounds to every page. And without doublesided,
there are not right and left pages.
And you don’t need the \define and \setlayer after \startchapter.
A complete sample would read:
\setuppagenumbering[alternative=doublesided]
\definelayer[butterfly][state=repeat]
\setlayer[butterfly]
[hoffset=.99\textwidth, voffset=1cm]
{butterfly}
\startsectionblockenvironment[bodypart]
\setupbackgrounds
[rightpage]
[background=butterfly]
\stopsectionblockenvironment
\def\rubbish%
{\dorecurse{2}
{\chapter{Chapter}
\dorecurse{25}{\input knuth}}}
\starttext
\startfrontmatter
\rubbish
\stopfrontmatter
\startbodymatter
\rubbish
\stopbodymatter
\startappendices
\rubbish
\stopappendices
\startbackmatter
\rubbish
\stopbackmatter
\stoptext
I hope it helps,
Pablo
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: repeat layer recto pages
2021-11-09 15:05 ` Pablo Rodriguez via ntg-context
@ 2021-11-09 22:12 ` jbf via ntg-context
2021-11-10 15:27 ` Pablo Rodriguez via ntg-context
0 siblings, 1 reply; 4+ messages in thread
From: jbf via ntg-context @ 2021-11-09 22:12 UTC (permalink / raw)
To: Pablo Rodriguez via ntg-context; +Cc: jbf, mailing list for ConTeXt users
Muchas gracias Pablo, that was most helpful, and of course it works.
The particular part that I was missing (there was already
alternative=doublesided in the preamble) of course was the
\startsectionblockenvironment[bodypart], so thanks for highlighting that.
I was also a bit confused about the difference between state=repeat and
repeat=yes, and I can see that both do work in the snippet you gave me,
so perhaps there is no difference between these?
Julian
On 10/11/21 2:05 am, Pablo Rodriguez via ntg-context wrote:
> On 11/9/21 4:18 AM, jbf via ntg-context wrote:
>> I want a particular layer to repeat on recto pages only, but I don't
>> want this to happen in frontmatter, only in bodymatter.
>>
>> This is what I have done, just before the first chapter after
>> \startbodymatter (but unsuccessfully; the layer repeats for every page
>> at the moment. I must have omitted something).
> Hi Julian,
>
> this is what you want:
>
> \startsectionblockenvironment[bodypart]
> \setupbackgrounds
> [rightpage]
> [background=butterfly]
> \stopsectionblockenvironment
>
>> \startbodymatter
>>
>> \setupbackgrounds
>> [rightpage]
>> [background=butterfly]
>>
>> \startchapter[title={Chapter title}]
>> \definelayer[butterfly]
>> [x=0mm, y=0mm,repeat=yes,width=\paperwidth, height=\paperheight]
>> \setlayer[butterfly]
>> [hoffset=.99\textwidth, voffset=1cm]
>> {\externalfigure[bfly.jpg][width=1.5cm]}
>> \setupbackgrounds[page][background=butterfly]
> The last line adds backgrounds to every page. And without doublesided,
> there are not right and left pages.
>
> And you don’t need the \define and \setlayer after \startchapter.
>
> A complete sample would read:
>
> \setuppagenumbering[alternative=doublesided]
> \definelayer[butterfly][state=repeat]
> \setlayer[butterfly]
> [hoffset=.99\textwidth, voffset=1cm]
> {butterfly}
> \startsectionblockenvironment[bodypart]
> \setupbackgrounds
> [rightpage]
> [background=butterfly]
> \stopsectionblockenvironment
>
> \def\rubbish%
> {\dorecurse{2}
> {\chapter{Chapter}
> \dorecurse{25}{\input knuth}}}
> \starttext
> \startfrontmatter
> \rubbish
> \stopfrontmatter
> \startbodymatter
> \rubbish
> \stopbodymatter
> \startappendices
> \rubbish
> \stopappendices
> \startbackmatter
> \rubbish
> \stopbackmatter
> \stoptext
>
> I hope it helps,
>
> Pablo
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: repeat layer recto pages
2021-11-09 22:12 ` jbf via ntg-context
@ 2021-11-10 15:27 ` Pablo Rodriguez via ntg-context
0 siblings, 0 replies; 4+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2021-11-10 15:27 UTC (permalink / raw)
To: jbf via ntg-context; +Cc: Pablo Rodriguez
On 11/9/21 11:12 PM, jbf via ntg-context wrote:
> Muchas gracias Pablo, that was most helpful, and of course it works.
>
> The particular part that I was missing (there was already
> alternative=doublesided in the preamble) of course was the
> \startsectionblockenvironment[bodypart], so thanks for highlighting that.
>
> I was also a bit confused about the difference between state=repeat and
> repeat=yes, and I can see that both do work in the snippet you gave me,
> so perhaps there is no difference between these?
Hi Julian,
I’m glad to read that it worked for you.
I didn’t realize that there was a "repeat" option in \definelayer.
I use "state", since it contains more values to be chosen from.
I guess "state=repeat" and "repeat=yes" get the same result.
Pablo
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-11-10 15:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-09 3:18 repeat layer recto pages jbf via ntg-context
2021-11-09 15:05 ` Pablo Rodriguez via ntg-context
2021-11-09 22:12 ` jbf via ntg-context
2021-11-10 15:27 ` Pablo Rodriguez via ntg-context
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).