ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Peter Rolf <indiego@gmx.net>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Background image
Date: Mon, 06 Aug 2007 13:02:06 +0200	[thread overview]
Message-ID: <46B6FFAE.9070408@gmx.net> (raw)
In-Reply-To: <1186331269.12049.6.camel@carnifex>

[-- Attachment #1: Type: text/plain, Size: 1391 bytes --]

Hi Pascal,

I spend more than one hour on this, to find a clean solution. So please
add this to the wiki.
And if you can, send my a copy of the nice background image (never mind
if not). I felt in love with this, while testing your example.

Anyhow, the cut markings are still lying under the picture (Hans?),
the rest should work. The automatical scaling of the image uses a tricky
method from this mailing list

http://archive.contextgarden.net/message/20070719.232314.12cb4f5f.en.html


Best wishes, Peter

BTW: do you set a bleed|crop-box?


Pascal de Bruijn schrieb:
> Hi,
> 
> I'm trying to layout a book for Lulu.com. I'm working with a 9"x6" paper
> size, which is going to be printed on 9.25"x6.25" stock paper to enable
> full bleed printing.
>
> I have managed to get a background image using a background layer.
> However, I don't seem to be able to get it to the right size.
> 
> Sample files:
> http://area42.pcode.nl/context/
> 
> In the PDF you can see, that I'm stuck with a white edge. I need the
> background picture to fill my entire page with no white left. I also
> need to crop marks to remain on top of the background image.
> 
> The supplied background image has the same height/width ratio as the
> stock page. However I would like TeX to stretch the ratio if necessary. 
> 
> I'd appreciate any suggestion on how to achieve this.
> 
> Regards,
> Pascal de Bruijn


[-- Attachment #2: lulu.tex --]
[-- Type: text/plain, Size: 3275 bytes --]

\definepapersize[Lulu-Print][width=6.00in,height=9.00in]
\definepapersize[Lulu-Stock][width=6.25in,height=9.25in]

%  [ paper ] [ printpaper ]
\setuppapersize[Lulu-Print][Lulu-Stock]
\setuplayout[location=middle,marking=on]
\setuppagenumbering[alternative=doublesided]
 
\setupbackgrounds[leftpage] [background={Watermark-Left,layer-with-marking}]% background doesn't work
\setupbackgrounds[rightpage][background={Watermark-Right,layer-with-marking}]

\definelayer[Watermark-Left]
[repeat=yes,width=\printpaperwidth,height=\printpaperheight,
 hoffset=-.5\dimexpr\printpaperwidth-\paperwidth,
 voffset=-.5\dimexpr\printpaperheight-\paperheight]
\definelayer[Watermark-Right]
[repeat=yes,width=\printpaperwidth,height=\printpaperheight,
 hoffset=-.5\dimexpr\printpaperwidth-\paperwidth,
 voffset=-.5\dimexpr\printpaperheight-\paperheight]


\setlayer[Watermark-Left][preset=topleft]
{\externalfigure[lowres][maxwidth=\printpaperwidth,maxheight=\printpaperheight,width=10in]}% width > maxwidth; value doesn't matter
\setlayer[Watermark-Right][preset=topleft]
{\externalfigure[lowres][maxwidth=\printpaperwidth,maxheight=\printpaperheight,width=10in]}

\starttext
\showframe

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Fus\-ce commodo. Curabitur quis metus. Cras 
lacus ipsum, lacinia eu, eleifend in, pellentesque quis, tellus. Sed eget sem a ipsum nonummy 
aliquam. Curabitur ut nibh a lectus sagittis bibendum. Praesent egestas sapien eu risus. Suspendisse 
a quam. Nunc volutpat posuere orci. Duis ultrices cursus tellus. Phasellus ante sapien, pharetra ac, 
malesuada condimentum, viverra sit amet, ligula. Donec nisl libero, placerat nec, euismod eget, 
euismod lobortis, eros. Nam posuere interdum neque. Maecenas a lacus. Etiam semper viverra libero. 
Proin ornare accumsan erat. Ut fringilla. Morbi pretium risus nec urna. Nunc nec ligula vel risus 
sodales lobortis. Fusce consectetuer, risus elementum tincidunt vulputate, arcu turpis porta sem, 
vitae feugiat arcu est non elit.

Nulla facilisi. Duis interdum quam ac purus. Morbi commodo lacus lacinia tortor. Suspendisse 
potenti. Nullam dapibus risus at dolor. Donec ac felis eu urna varius venenatis. Quisque ac sapien 
id quam tempor auctor. Donec vel ipsum. Phasellus lorem lacus, iaculis tristique, pellentesque 
vitae, cursus sed, leo. Morbi massa metus, facilisis at, placerat a, varius in, justo. Vestibulum 
vehicula consectetuer sapien. In sodales, orci ac convallis sollicitudin, pede ligula luctus erat, 
ut elementum tellus libero vel urna. Sed scelerisque diam a leo vehicula nonummy.

Donec velit dui, volutpat ornare, auctor vel, ultricies eu, nulla. Aliquam quis nisi a nulla 
tristique semper. Phasellus varius mi at sapien. Integer ornare, mi id consequat nonummy, sem purus 
pellentesque nibh, eu lobortis neque elit a purus. Nullam nisi. Pellentesque cursus lectus lobortis 
sem. Sed felis. Ut justo libero, malesuada non, congue sit amet, hendrerit eget, velit. Curabitur 
iaculis, diam non tincidunt cursus, tortor odio varius mauris, sed pharetra augue urna ac erat. 
Maecenas eu sapien. Suspendisse vel magna nec metus tempor consectetuer. Sed mollis tincidunt 
lorem. Sed tempus adipiscing tellus. Sed elit odio, venenatis ac, dignissim at, vehicula eget, ante.

\stoptext


[-- Attachment #3: Type: text/plain, Size: 487 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  parent reply	other threads:[~2007-08-06 11:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-05 16:27 Pascal de Bruijn
2007-08-06  9:49 ` Hans Hagen
2007-08-06 11:02 ` Peter Rolf [this message]
2007-08-06 16:23   ` Pascal de Bruijn
2007-08-06 17:47     ` Peter Rolf
2007-08-06 18:27       ` Pascal de Bruijn
2007-08-06 20:11         ` Peter Rolf

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=46B6FFAE.9070408@gmx.net \
    --to=indiego@gmx.net \
    --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).