Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Need to place a PDF file as a watermark behind the title page and part break pages. These have been laid out using \standardmakeup. Have created the layer and can place it on a normal text page but cannot work out how to force it to work on the \standardmakeup. I have been using MkIV from TeXLive 2012.

Here is a minimal example of what I have tried so far

\startenvironment[Test]

% -- Title page setups
\definelayer[jikishin][position=no,repeat=no,width=\paperwidth,height=\paperheight]
\setlayerframed[jikishin][x=0cm,y=3cm]{\externalfigure[images/Jikishin.pdf][size=artbox]}   

\definemakeup[title][doublesided=no,page=right,headerstade=empty,footerstate=empty]


\setuppapersize             [A5][A5]

\setuppagenumbering
 [alternative=doublesided]

\stopenvironment



\startfrontmatter  % --- here not sure how to get the layer activated
    \startmakeup[title]
        \title{Jikishin Ju Jitsu}
    \stopmakeup
\stopfrontmatter

\startbodymatter
    \chapter{Body of document}
    \input knuth
\stopbodymatter
share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

The standard way to set a page background in ConTeXt is to use

\setupbackgrounds[page][background=....]

To ensure that the background is restricted only to titlemakeup pages, use the before key of \definemakeup:

\definemakeup[title][...., before={\setupbackgrounds[page][background=...]}, ...]

Here is a complete example (I use cow.pdf as a sample image)

\definelayer
    [jikishin]
    [
      position=no,
      repeat=no,
      width=\paperwidth,
      height=\paperheight,
    ]

\setlayerframed
      [jikishin]
      [x=0cm,y=3cm]
      {\externalfigure[cow]}   

\definemakeup
    [title]
    [
      doublesided=no,
      page=right,
      headerstate=empty,
      footerstate=empty,
      before=\setups{title:setups},
    ]

\startsetups title:setups
    \setupbackgrounds[page][background=jikishin]
\stopsetups


\setuppapersize
    [A5][A5]

\setuppagenumbering
    [alternative=doublesided]


\starttext
\startfrontmatter  % --- here not sure how to get the layer activated
    \starttitlemakeup
        \title{Jikishin Ju Jitsu}
    \stoptitlemakeup
\stopfrontmatter

\startbodymatter
    \chapter{Body of document}
    \input knuth
\stopbodymatter
\stoptext
share|improve this answer
    
Works great! Didn't see the before=\setups option in the documentation or on ConTeXt Garden. Will try to add this there. –  Tim Sheasby Jan 2 '13 at 13:53
1  
Almost all context setups accept a before option. –  Aditya Jan 3 '13 at 7:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.