* letter module: different first page for multiple letters in one file
@ 2009-10-09 23:48 Michael Green
2009-10-10 6:06 ` Wolfgang Schuster
2009-10-10 11:49 ` Wolfgang Schuster
0 siblings, 2 replies; 4+ messages in thread
From: Michael Green @ 2009-10-09 23:48 UTC (permalink / raw)
To: ntg-context
I have one file containing several letters that I process using
Wolfgang's letter module.
I have a special background for the first page of a letter. I define
and set three layers: PCLogo, PCDept, and PCAddress. Here is a
representative example:
\definelayer
[PCLogo]
[width=\paperwidth,
height=\paperheight,
preset=lefttop,
y=20pt,
state=start]
Then I make these layers backgrounds like so:
\setupletterstyle[lettermain][background={PCLogo,PCDept,PCAddress}]
The result I *get* is that the first letter in the file gets the
background on its first page as normal. But the subsequent letters do
not. Their first pages are plain.
The result I *want* is for each letter to have the background on its
first page, like the first letter in the file gets.
How can I achieve that?
Thank you!
Michael
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: letter module: different first page for multiple letters in one file
2009-10-09 23:48 letter module: different first page for multiple letters in one file Michael Green
@ 2009-10-10 6:06 ` Wolfgang Schuster
2009-10-10 11:49 ` Wolfgang Schuster
1 sibling, 0 replies; 4+ messages in thread
From: Wolfgang Schuster @ 2009-10-10 6:06 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 10.10.2009 um 01:48 schrieb Michael Green:
> I have one file containing several letters that I process using
> Wolfgang's letter module.
>
> I have a special background for the first page of a letter. I define
> and set three layers: PCLogo, PCDept, and PCAddress. Here is a
> representative example:
> \definelayer
> [PCLogo]
> [width=\paperwidth,
> height=\paperheight,
> preset=lefttop,
> y=20pt,
> state=start]
>
> Then I make these layers backgrounds like so:
>
> \setupletterstyle[lettermain][background={PCLogo,PCDept,PCAddress}]
>
> The result I *get* is that the first letter in the file gets the
> background on its first page as normal. But the subsequent letters
> do not. Their first pages are plain.
>
> The result I *want* is for each letter to have the background on its
> first page, like the first letter in the file gets.
>
> How can I achieve that?
Are your graphics for stationary or logos and headers etc.
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: letter module: different first page for multiple letters in one file
2009-10-09 23:48 letter module: different first page for multiple letters in one file Michael Green
2009-10-10 6:06 ` Wolfgang Schuster
@ 2009-10-10 11:49 ` Wolfgang Schuster
1 sibling, 0 replies; 4+ messages in thread
From: Wolfgang Schuster @ 2009-10-10 11:49 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 10.10.2009 um 01:48 schrieb Michael Green:
> I have one file containing several letters that I process using
> Wolfgang's letter module.
>
> I have a special background for the first page of a letter. I define
> and set three layers: PCLogo, PCDept, and PCAddress. Here is a
> representative example:
> \definelayer
> [PCLogo]
> [width=\paperwidth,
> height=\paperheight,
> preset=lefttop,
> y=20pt,
> state=start]
>
> Then I make these layers backgrounds like so:
>
> \setupletterstyle[lettermain][background={PCLogo,PCDept,PCAddress}]
>
> The result I *get* is that the first letter in the file gets the
> background on its first page as normal. But the subsequent letters
> do not. Their first pages are plain.
>
> The result I *want* is for each letter to have the background on its
> first page, like the first letter in the file gets.
It's the normal behavior of layers to forget their content after
the first usage but there are mechanism to store it and reuse
the saved settings multiple times.
\usemodule[letter]
\definelayer[PC][width=\paperwidth,height=\paperheight]
\startsetups PC
\setlayer[PC][y=20pt]{...}
\setlayer[PC][x=..,y=..]{...}
\stopsetups
\setupletterstyle[lettermain][setups=PC,background=PC]
... % more settings
\starttext
\startletter
...
\stopletter
... % more letters
\stoptext
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: letter module: different first page for multiple letters in one file
[not found] <mailman.1.1255168807.440.ntg-context@ntg.nl>
@ 2009-10-10 16:29 ` Michael Green
0 siblings, 0 replies; 4+ messages in thread
From: Michael Green @ 2009-10-10 16:29 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1.1: Type: text/plain, Size: 2027 bytes --]
On Oct 10, 2009, at 3:00 AM, Wolfgang Schuster wrote:
> Am 10.10.2009 um 01:48 schrieb Michael Green:
>
>> I have one file containing several letters that I process using
>> Wolfgang's letter module.
>>
>> I have a special background for the first page of a letter. I define
>> and set three layers: PCLogo, PCDept, and PCAddress. Here is a
>> representative example:
>> \definelayer
>> [PCLogo]
>> [width=\paperwidth,
>> height=\paperheight,
>> preset=lefttop,
>> y=20pt,
>> state=start]
>>
>> Then I make these layers backgrounds like so:
>>
>> \setupletterstyle[lettermain][background={PCLogo,PCDept,PCAddress}]
>>
>> The result I *get* is that the first letter in the file gets the
>> background on its first page as normal. But the subsequent letters
>> do not. Their first pages are plain.
>>
>> The result I *want* is for each letter to have the background on its
>> first page, like the first letter in the file gets.
>>
>> How can I achieve that?
>
> Are your graphics for stationary or logos and headers etc.
>
> Wolfgang
>
>
I'm trying to emulate my college's stationery. The layers I made
include one graphic and two boxes of text.
We use the graphic and two text boxes on the first page of a letter.
The other pages use plain sheets of paper.
You also showed me how to get the effect I want in a separate
message. This solution worked perfectly. Thank you very much!
The solution:
> \usemodule[letter]
>
> \definelayer[PC][width=\paperwidth,height=\paperheight]
>
> \startsetups PC
>
> \setlayer[PC][y=20pt]{...}
>
> \setlayer[PC][x=..,y=..]{...}
>
> \stopsetups
>
> \setupletterstyle[lettermain][setups=PC,background=PC]
>
> ... % more settings
>
> \starttext
>
> \startletter
> ...
> \stopletter
>
> ... % more letters
>
> \stoptext
As I understand it, \setupletterstyle[lettermain][setups=PC,…] means
that those setups are repeated with every letter. Hence, the desired
effect.
Thanks again!
Michael
[-- Attachment #1.2: Type: text/html, Size: 11630 bytes --]
[-- Attachment #2: Type: text/plain, Size: 486 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 : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-10-10 16:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-09 23:48 letter module: different first page for multiple letters in one file Michael Green
2009-10-10 6:06 ` Wolfgang Schuster
2009-10-10 11:49 ` Wolfgang Schuster
[not found] <mailman.1.1255168807.440.ntg-context@ntg.nl>
2009-10-10 16:29 ` Michael Green
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).