10

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

1 Answer 1

4

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
1
  • 1
    Almost all context setups accept a before option.
    – Aditya
    Jan 3, 2013 at 7:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .