Hey list, On the cover page of my book I'd like just an image displayed and another image used as the background for every other page in the book. So I put this in my environment, % Cover image... \definelayer [CoverImage] [x=0mm, y=0mm, \paperwidth, \paperheight] \setupbackgrounds[page][background=CoverImage] \setlayer [CoverImage] % name of the layer {\externalfigure [Makeup/Images/Cover.jpg] [align=center, \paperwidth, \paperheight]} % the actual contents of the layer % Regular background image... \definelayer [BackgroundImage] [x=0mm, y=0mm, \paperwidth, \paperheight, repeat=yes] \setlayer [BackgroundImage] % name of the layer {\externalfigure [Makeup/Images/Background.png] [align=center, \paperwidth, \paperheight]} % the actual contents of the layer , the following in the book's first page, \setupbackgrounds[page][background=CoverImage] , and the following on second page, \setupbackgrounds[page][background=BackgroundImage] . But this does not work properly. What ends up happening is the cover image is displayed correctly, but every page after that just has a blank white background. -- Kip Warner -- Software Engineer OpenPGP encrypted/signed mail preferred http://www.thevertigo.com
On 9-7-2012 04:47, Kip Warner wrote:
Hey list,
On the cover page of my book I'd like just an image displayed and another image used as the background for every other page in the book. So I put this in my environment,
% Cover image... \definelayer [CoverImage] [x=0mm, y=0mm, \paperwidth, \paperheight] \setupbackgrounds[page][background=CoverImage]
\setlayer [CoverImage] % name of the layer {\externalfigure [Makeup/Images/Cover.jpg] [align=center, \paperwidth, \paperheight]} % the actual contents of the layer
% Regular background image... \definelayer [BackgroundImage] [x=0mm, y=0mm, \paperwidth, \paperheight, repeat=yes]
\setlayer [BackgroundImage] % name of the layer {\externalfigure [Makeup/Images/Background.png] [align=center, \paperwidth, \paperheight]} % the actual contents of the layer
less code: \defineoverlay [BackgroundImage] [\overlayfigure{Makeup/Images/Background.png}]
, the following in the book's first page,
\setupbackgrounds[page][background=CoverImage]
, and the following on second page,
\setupbackgrounds[page][background=BackgroundImage]
.. But this does not work properly. What ends up happening is the cover image is displayed correctly, but every page after that just has a blank white background.
state=repeat Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Am 09.07.2012 um 04:47 schrieb Kip Warner:
Hey list,
On the cover page of my book I'd like just an image displayed and another image used as the background for every other page in the book. So I put this in my environment,
% Cover image... \definelayer [CoverImage] [x=0mm, y=0mm, \paperwidth, \paperheight] \setupbackgrounds[page][background=CoverImage]
\setlayer [CoverImage] % name of the layer {\externalfigure [Makeup/Images/Cover.jpg] [align=center, \paperwidth, \paperheight]} % the actual contents of the layer
% Regular background image... \definelayer [BackgroundImage] [x=0mm, y=0mm, \paperwidth, \paperheight, repeat=yes]
\setlayer [BackgroundImage] % name of the layer {\externalfigure [Makeup/Images/Background.png] [align=center, \paperwidth, \paperheight]} % the actual contents of the layer
, the following in the book's first page,
\setupbackgrounds[page][background=CoverImage]
, and the following on second page,
\setupbackgrounds[page][background=BackgroundImage]
. But this does not work properly. What ends up happening is the cover image is displayed correctly, but every page after that just has a blank white background.
\setupexternalfigures[directory=Makeup/Images] \defineoverlay [backgroundimage] [{\ifnum\rawcountervalue[userpage]=1\relax \overlayfigure{Cover}% \else \overlayfigure{Background}% \fi}] \setupbackgrounds[page][background=backgroundimage] \starttext \dorecurse{4}{\input knuth\page} \stoptext Wolfgang
On Mon, 2012-07-09 at 10:06 +0200, Wolfgang Schuster wrote:
\setupexternalfigures[directory=Makeup/Images]
\defineoverlay [backgroundimage] [{\ifnum\rawcountervalue[userpage]=1\relax \overlayfigure{Cover}% \else \overlayfigure{Background}% \fi}]
\setupbackgrounds[page][background=backgroundimage]
\starttext \dorecurse{4}{\input knuth\page} \stoptext
Wolfgang
Thanks Wolfgang. That did it. Although I did change userpage to realpage. -- Kip Warner -- Software Engineer OpenPGP encrypted/signed mail preferred http://www.thevertigo.com
participants (3)
-
Hans Hagen
-
Kip Warner
-
Wolfgang Schuster