ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Cc: ConTeXt <ntg-context@ntg.nl>
Subject: Re: Background on the "page" of the first page
Date: Mon, 08 Jan 2001 00:27:48 +0100	[thread overview]
Message-ID: <3.0.6.32.20010108002748.01aed820@200.1.1.1> (raw)
In-Reply-To: <3A589C5F.EAF4F636@gmx.net>

At 05:42 PM 1/7/01 +0100, Hraban wrote:
>Hans Hagen wrote:
>> >I'd like to have a fency background and a colour on the first (and with
>> >doublesided also on the last page). Somehow I cannot figure out how to
>
>If you want a picture as background, try this:
>
>You need a picture "bild.pdf" that has the same proportions as your page.
>
>\useexternalfigure[hintergrund][bild][width=21.5cm]
>% width about 5 mm wider than the page, that it can be cropped
>\defineoverlay[titelbild][{\externalfigure[hintergrund]}]
>% becomes automatically centered
>
>\setupbackgrounds[page][background=titelbild]
>% instead of page you may say rightpage or leftpage
>
>\setupbackgrounds	[rightpage][background=]
>% switch it off afterwards

There is a better way -) 

First, you can use \overlaywidth and \overlayheight as dimensions, so that
you don't have to have explicit sizes: 

\defineoverlay[titelbild][{\externalfigure[hintergrund][width=\overlaywidth,
height=\overlayheight]}]

a bit shorter is: 

  \defineoverlay[titelbild][\overlayfigure{hintergrund}]

Concerning the .5cm overshoot, 

  \setupbackgrounds[page][background=titelbild,backgroundoffset=2.5mm]

will do the trick. 

-------------------------------------------------------------------------
                                                  Hans Hagen | PRAGMA ADE
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


  reply	other threads:[~2001-01-07 23:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-06 17:05 Tobias Burnus
2001-01-06 21:25 ` Hans Hagen
2001-01-07 16:42   ` Hraban
2001-01-07 23:27     ` Hans Hagen [this message]
2001-01-08 20:01   ` transparent PNG on a coloured background Tobias Burnus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3.0.6.32.20010108002748.01aed820@200.1.1.1 \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).