* \setupsectionblock and \setupbackgrounds page-break problem
@ 2016-02-28 13:49 Robin.Kirkham
2016-02-28 21:11 ` Wolfgang Schuster
0 siblings, 1 reply; 3+ messages in thread
From: Robin.Kirkham @ 2016-02-28 13:49 UTC (permalink / raw)
To: ntg-context
Folks,
I want \startfrontmatter to trigger a background image, but I can only get this to appear if I use page=yes (see example below).
However, I don’t want any page break between the front-matter and body-matter. If I use page=no (as in the line commented out) this page break disappears — but so does the background image!
How can I get the background behind the page where the front-matter text appears, but with no page break before the body-matter?
Robin
\setupexternalfigures[location=default]
\definelayer[frontbackground]
\setlayer[frontbackground]{%
\externalfigure[mill.png]
[width=\paperwidth,height=\paperheight]
}
\unexpanded\def\frontpartbefore{
\setupbackgrounds[page]
[background=frontbackground]
}
\setupsectionblock[frontpart][page=yes,before=\frontpartbefore]
%\setupsectionblock[frontpart][page=no,before=\frontpartbefore]
\setupsectionblock[bodypart][page=no]
\starttext
\startfrontmatter
Should be on a first page
\stopfrontmatter
\startbodymatter
Should follow frontmatter with no page break
\stopbodymatter
\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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: \setupsectionblock and \setupbackgrounds page-break problem
2016-02-28 13:49 \setupsectionblock and \setupbackgrounds page-break problem Robin.Kirkham
@ 2016-02-28 21:11 ` Wolfgang Schuster
0 siblings, 0 replies; 3+ messages in thread
From: Wolfgang Schuster @ 2016-02-28 21:11 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1208 bytes --]
> Robin.Kirkham@csiro.au <mailto:Robin.Kirkham@csiro.au>
> 28. Februar 2016 um 14:49
> Folks,
>
> I want \startfrontmatter to trigger a background image, but I can only
> get this to appear if I use page=yes (see example below).
>
> However, I don’t want any page break between the front-matter and
> body-matter. If I use page=no (as in the line commented out) this page
> break disappears — but so does the background image!
>
> How can I get the background behind the page where the front-matter
> text appears, but with no page break before the body-matter?
Set the page background outside of the sectionblock.
\setupexternalfigures[location=default]
\definelayer[frontbackground]
\setupbackgrounds[page][background=frontbackground]
\startsectionblockenvironment[frontpart]
\setlayer[frontbackground]{\externalfigure[mill][width=\paperwidth,height=\paperheight]}
\stopsectionblockenvironment
\setupsectionblock[frontpart][page=no]
\setupsectionblock[bodypart][page=no]
\starttext
\startfrontmatter
Should be on a first page
\stopfrontmatter
\startbodymatter
Should follow frontmatter with no page break
\stopbodymatter
\stoptext
Wolfgang
[-- Attachment #1.2: Type: text/html, Size: 2304 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: \setupsectionblock and \setupbackgrounds page-break problem
[not found] <mailman.683.1456693876.2231.ntg-context@ntg.nl>
@ 2016-02-29 8:33 ` Robin.Kirkham
0 siblings, 0 replies; 3+ messages in thread
From: Robin.Kirkham @ 2016-02-29 8:33 UTC (permalink / raw)
To: ntg-context
> From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
> Subject: Re: [NTG-context] \setupsectionblock and \setupbackgrounds page-break problem
> Date: 29 February 2016 8:11:01 AEDT
>
>> Robin.Kirkham@csiro.au 28. Februar 2016 um 14:49
>> Folks,
>>
>> I want \startfrontmatter to trigger a background image, but I can only get this to appear if I use page=yes (see example below).
>>
>> However, I don’t want any page break between the front-matter and body-matter. If I use page=no (as in the line commented out) this page break disappears — but so does the background image!
>>
>> How can I get the background behind the page where the front-matter text appears, but with no page break before the body-matter?
>
> Set the page background outside of the sectionblock.
… and use \setlayer. Thanks Wolfgang, I think I’m piecing together how layers, backgrounds and the pagebreak mechanism fit together.
Regards, Robin
___________________________________________________________________________________
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-02-29 8:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-28 13:49 \setupsectionblock and \setupbackgrounds page-break problem Robin.Kirkham
2016-02-28 21:11 ` Wolfgang Schuster
[not found] <mailman.683.1456693876.2231.ntg-context@ntg.nl>
2016-02-29 8:33 ` Robin.Kirkham
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).