ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Letter module
Date: Sun, 29 Jun 2014 10:00:03 +0200	[thread overview]
Message-ID: <5E8ECE47-C9D5-499C-B929-560171B202D7@gmail.com> (raw)
In-Reply-To: <20140626135520.GB1848@sartre.localdomain>


Am 26.06.2014 um 15:55 schrieb Mo Abrahams <moabrahams+context@dashavoo.com>:

> Hello again,
> 
> I managed to get the backaddress looking how I wanted by reading again
> through the main ConTeXt manual. I've also got my letterhead loading as
> the page background to some degree like so:
> 
> \defineletterelement[layer][lettermain][Stationery]{\externalfigure[letterhead][width=210mm,height=297mm]}
> 
> \setupletterlayer
>  [lettermain]
>  [x=0mm,
>   y=0mm,
>   alternative=Stationery]
> 
> but there seems to be a tiny border around it rather than being flush to
> the edges of the page. I've tried other methods using layers and
> \setupbackgrounds but they seem to have no effect at all.
> 
> Can someone help with that?
> 
> I still haven't worked out how to remove the lavel above the date, and
> to make matters worse it doesn't seem to be affected by changing the
> document language either!

To put a image in the background you can use the “backgroundimage” key for the \setupletteroptions
command, the image will then be placed in the back of each page.


\usemodule[letter]

\setupexternalfigures[location=default]  

\setupletteroptions[backgroundimage=mill]

\startletter
\dorecurse{6}{\input knuth\par}
\stopletter


You can also use the “lettermain” and “letternext” layers when you want more control about the placement
of the backgrounds. What’s missing in your setup above is to remove the offset for background which can
be done with \setupletterframe[…][offset=overlay], to control on which page the image is shown you can
use the “state” key for \setupletterlayer.


\usemodule[letter]

\setupexternalfigures[location=default]  

\startsetups[letter:layer:lettermain]
  \externalfigure[mill][width=210mm,height=297mm]
\stopsetups

\setupletterlayer
 [lettermain]
 [x=0mm,
  y=0mm,
 %state=repeat,
  alternative=setups]

\setupletterframe
 [lettermain]
 [offset=overlay]

\startletter
\dorecurse{6}{\input knuth\par}
\stopletter


Wolfgang
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  reply	other threads:[~2014-06-29  8:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-25 15:30 Mo Abrahams
2014-06-26 13:55 ` Mo Abrahams
2014-06-29  8:00   ` Wolfgang Schuster [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-09-21 19:00 letter module Wolfgang Schuster
2008-08-13 13:34 Roger Mason
2008-08-13 13:51 ` Wolfgang Schuster
2008-08-14 10:02   ` Roger Mason
2008-08-14 13:32     ` Wolfgang Schuster
2008-08-14 20:02       ` Roger Mason

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=5E8ECE47-C9D5-499C-B929-560171B202D7@gmail.com \
    --to=schuster.wolfgang@gmail.com \
    --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).