ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Module t-letter: Headers, Footers And Back Address
@ 2010-09-03  0:13 benedikt k
  2010-09-03  8:04 ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: benedikt k @ 2010-09-03  0:13 UTC (permalink / raw)
  To: ntg-context

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

Hello everyone,

an issue arised while writing a letter with the third party module
t-letter (http://modules.contextgarden.net/letter).

I've read the official documentation (Correspondence with ConTeXt) but
I found no solution to:

a) Setup a header/footer for the first page and configure a different
one for the following pages.

Page 46 of the documentation describes the setup of the specific
(letter) layers. With the "state" parameter it's possible to enable (=
"start"), disable (= "stop") the header or start it on the second page
and the following (= "next"), but if I configure the header for the
first
page with

\setupletterstyle[head]
[
 state=start,
 alternative=left,
 fromrule=top,
]

and then for the following pages

\setupletterstyle[head]
[
 state=next,
 ...
]

only the second setup is typeset. From this it follows that the first
setup is just overwritten.

The header on the first page  should only contain a name and than a
thin line (a "\hairline" similar to the built-in variable "fromrule").

The header on the following pages should contain variable things and
than also a thin line.

Unfortunately I found no possibility to get this done.

b) I would like to define a back address which should be typeset above
the addressee.

Page 44 of the documentation illustrates amongst other layers the back
address layer, but there is no way to activate and configure this
layer. I've tried it with \setupletter[backaddress][...] and
\setuplayer[backaddress][...].

Maybe someone have a tip.

Thank you and have a nice week.



Benedikt


ps: A small (commented) letter template is attached below (as tex file).

[-- Attachment #2: letter.tex --]
[-- Type: application/x-tex, Size: 2792 bytes --]

[-- Attachment #3: 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

* Re: Module t-letter: Headers, Footers And Back Address
  2010-09-03  0:13 Module t-letter: Headers, Footers And Back Address benedikt k
@ 2010-09-03  8:04 ` Wolfgang Schuster
  2010-09-05 10:52   ` benedikt k
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Schuster @ 2010-09-03  8:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: benedikt k


Am 03.09.2010 um 02:13 schrieb benedikt k:

> Hello everyone,
> 
> an issue arised while writing a letter with the third party module
> t-letter (http://modules.contextgarden.net/letter).
> 
> I've read the official documentation (Correspondence with ConTeXt) but
> I found no solution to:
> 
> a) Setup a header/footer for the first page and configure a different
> one for the following pages.
> 
> Page 46 of the documentation describes the setup of the specific
> (letter) layers. With the "state" parameter it's possible to enable (=
> "start"), disable (= "stop") the header or start it on the second page
> and the following (= "next"), but if I configure the header for the
> first
> page with
> 
> \setupletterstyle[head]
> [
> state=start,
> alternative=left,
> fromrule=top,
> ]
> 
> and then for the following pages
> 
> \setupletterstyle[head]
> [
> state=next,
> ...
> ]
> 
> only the second setup is typeset. From this it follows that the first
> setup is just overwritten.


This is the usual behavior of all setup commands in context, later settings
overwrite earlier ones. To set different header you can use 'head' for the
first page and 'nexthead' for the following pages.

> The header on the first page  should only contain a name and than a
> thin line (a "\hairline" similar to the built-in variable "fromrule").
> 
> The header on the following pages should contain variable things and
> than also a thin line.
> 
> Unfortunately I found no possibility to get this done.

\defineletterelement[head][benedikt]
  {\lettervalue{fromname}
   \hairline}

\defineletterelement[nexthead][benedikt]
   {...
    \hairline}

\setupletterstyle[head,nexthead][alternative=benedikt]

> b) I would like to define a back address which should be typeset above
> the addressee.
> 
> Page 44 of the documentation illustrates amongst other layers the back
> address layer, but there is no way to activate and configure this
> layer. I've tried it with \setupletter[backaddress][...] and
> \setuplayer[backaddress][...].

Enable it with \setupletterstyle[backaddress=yes], it's disabled by default.

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: Module t-letter: Headers, Footers And Back Address
  2010-09-03  8:04 ` Wolfgang Schuster
@ 2010-09-05 10:52   ` benedikt k
  2010-09-09 12:43     ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: benedikt k @ 2010-09-05 10:52 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users

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

Hello Wolfgang,

thank you very much for answering my questions.

It was not my intention to disturb you again when posting my issues to
the mailing list for ConTeXt users.

All things work for me now. :)

>> only the second setup is typeset. From this it follows that the first
>> setup is just overwritten.
>
>
> This is the usual behavior of all setup commands in context, later settings
> overwrite earlier ones. To set different header you can use 'head' for the
> first page and 'nexthead' for the following pages.

This behaviour makes sense to me. I reckoned with this behaviour but
found no solution to adjust it to my needs. Thank you for your help.

> \defineletterelement[head][benedikt]
>  {\lettervalue{fromname}
>   \hairline}
>
> \defineletterelement[nexthead][benedikt]
>   {...
>    \hairline}
>
> \defineletterelement[head][benedikt]

I've found this procedure also in the correspeondence documentation
now (http://dl.contextgarden.net/modules/t-letter/doc/context/third/letter/correspondence.pdf).

It's described in chapter nine ("Reference Line") on page 93. I
omitted this chapter when i firstly read the documentation.

With

  \defineletterelement[layername][alternativename]

a predefined letter layer can be configured/defined and then it can be
enabled with the command

  \setupletterstyle[layername][alternative=alternativename].

You've already predefined all important letter layers (for instance a
header for the first page and another one for the following pages).
It's great.

I've succeeded to adapt the default letter module design to my needs.
The modified design was inspired by the LaTeX class g-brief2 from
Michael Lenzen (http://www.ctan.org/tex-archive/macros/latex/contrib/g-brief/).

Maybe it's interesting for somenone, so I post it here:

Preview first page:
http://img295.imageshack.us/img295/1937/p2f12836835744890.png

Preview second page:
http://img259.imageshack.us/img259/9648/p2f12836835744891.png

The tex source is attached below.

Thanks a lot Wolfgang!



Benedikt




2010/9/3 Wolfgang Schuster <schuster.wolfgang@googlemail.com>:
>
> Am 03.09.2010 um 02:13 schrieb benedikt k:
>
>> Hello everyone,
>>
>> an issue arised while writing a letter with the third party module
>> t-letter (http://modules.contextgarden.net/letter).
>>
>> I've read the official documentation (Correspondence with ConTeXt) but
>> I found no solution to:
>>
>> a) Setup a header/footer for the first page and configure a different
>> one for the following pages.
>>
>> Page 46 of the documentation describes the setup of the specific
>> (letter) layers. With the "state" parameter it's possible to enable (=
>> "start"), disable (= "stop") the header or start it on the second page
>> and the following (= "next"), but if I configure the header for the
>> first
>> page with
>>
>> \setupletterstyle[head]
>> [
>> state=start,
>> alternative=left,
>> fromrule=top,
>> ]
>>
>> and then for the following pages
>>
>> \setupletterstyle[head]
>> [
>> state=next,
>> ...
>> ]
>>
>> only the second setup is typeset. From this it follows that the first
>> setup is just overwritten.
>
>
> This is the usual behavior of all setup commands in context, later settings
> overwrite earlier ones. To set different header you can use 'head' for the
> first page and 'nexthead' for the following pages.
>
>> The header on the first page  should only contain a name and than a
>> thin line (a "\hairline" similar to the built-in variable "fromrule").
>>
>> The header on the following pages should contain variable things and
>> than also a thin line.
>>
>> Unfortunately I found no possibility to get this done.
>
> \defineletterelement[head][benedikt]
>  {\lettervalue{fromname}
>   \hairline}
>
> \defineletterelement[nexthead][benedikt]
>   {...
>    \hairline}
>
> \setupletterstyle[head,nexthead][alternative=benedikt]
>
>> b) I would like to define a back address which should be typeset above
>> the addressee.
>>
>> Page 44 of the documentation illustrates amongst other layers the back
>> address layer, but there is no way to activate and configure this
>> layer. I've tried it with \setupletter[backaddress][...] and
>> \setuplayer[backaddress][...].
>
> Enable it with \setupletterstyle[backaddress=yes], it's disabled by default.
>
> Wolfgang
>
>

[-- Attachment #2: letter.tex --]
[-- Type: application/x-tex, Size: 4503 bytes --]

[-- Attachment #3: 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

* Re: Module t-letter: Headers, Footers And Back Address
  2010-09-05 10:52   ` benedikt k
@ 2010-09-09 12:43     ` Wolfgang Schuster
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Schuster @ 2010-09-09 12:43 UTC (permalink / raw)
  To: benedikt k; +Cc: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 550 bytes --]


Am 05.09.2010 um 12:52 schrieb benedikt k:

> I've succeeded to adapt the default letter module design to my needs.
> The modified design was inspired by the LaTeX class g-brief2 from
> Michael Lenzen (http://www.ctan.org/tex-archive/macros/latex/contrib/g-brief/).

I made a style file [1] out your code with a few modifications, as it depends
on other files (label.nle and t-correspondence.mkix) you have to wait for the
next release of the module.

[1] http://bitbucket.org/wolfs/correspondence/src/tip/files/gbrief.nls

Wolfgang


[-- Attachment #1.2: Type: text/html, Size: 1040 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:[~2010-09-09 12:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-03  0:13 Module t-letter: Headers, Footers And Back Address benedikt k
2010-09-03  8:04 ` Wolfgang Schuster
2010-09-05 10:52   ` benedikt k
2010-09-09 12:43     ` Wolfgang Schuster

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).