ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* letter module, vertical offset of reference line
@ 2010-10-31  8:36 Florian Wobbe
  2010-10-31  9:11 ` Wolfgang Schuster
  0 siblings, 1 reply; 6+ messages in thread
From: Florian Wobbe @ 2010-10-31  8:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

I need to adjust the vertical position of the reference line (as well as subject, opening etc.) because the info-block is longer than the addressee-block to the left.

With alternative=customized I can use
  \setupletterstyle [firstpage] [topspace=...]

However with alternative a and e setting topspace has no effect.

Also
  \setupletterstyle [reference] [voffset=...]
changes the offset for alternative=customized, only.

Best,
Florian

___________________________________________________________________________________
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] 6+ messages in thread

* Re: letter module, vertical offset of reference line
  2010-10-31  8:36 letter module, vertical offset of reference line Florian Wobbe
@ 2010-10-31  9:11 ` Wolfgang Schuster
  2010-10-31 10:16   ` Florian Wobbe
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Schuster @ 2010-10-31  9:11 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 31.10.2010 um 09:36 schrieb Florian Wobbe:

> Hi,
> 
> I need to adjust the vertical position of the reference line (as well as subject, opening etc.) because the info-block is longer than the addressee-block to the left.
> 
> With alternative=customized I can use
>  \setupletterstyle [firstpage] [topspace=...]
> 
> However with alternative a and e setting topspace has no effect.
> 
> Also
>  \setupletterstyle [reference] [voffset=...]
> changes the offset for alternative=customized, only.

With the predefined styles for the reference line i ignore the topspace value and use a calculated value. This value depends on the bottom of the address block and the height of the reference line plus a space be fore and after the reference line.

Can you make a example where this calculation goes wrong!

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] 6+ messages in thread

* Re: letter module, vertical offset of reference line
  2010-10-31  9:11 ` Wolfgang Schuster
@ 2010-10-31 10:16   ` Florian Wobbe
  2010-11-08 19:53     ` Wolfgang Schuster
  0 siblings, 1 reply; 6+ messages in thread
From: Florian Wobbe @ 2010-10-31 10:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

On Oct 31, 2010, at 10:11 , Wolfgang Schuster wrote:

> 
> Am 31.10.2010 um 09:36 schrieb Florian Wobbe:
> 
>> Hi,
>> 
>> I need to adjust the vertical position of the reference line (as well as subject, opening etc.) because the info-block is longer than the addressee-block to the left.
>> 
>> With alternative=customized I can use
>> \setupletterstyle [firstpage] [topspace=...]
>> 
>> However with alternative a and e setting topspace has no effect.
>> 
>> Also
>> \setupletterstyle [reference] [voffset=...]
>> changes the offset for alternative=customized, only.
> 
> With the predefined styles for the reference line i ignore the topspace value and use a calculated value. This value depends on the bottom of the address block and the height of the reference line plus a space be fore and after the reference line.
> 
> Can you make a example where this calculation goes wrong!

Thanks! Of cause, a commented minimal example is attached.

I have two problems and a wish:

1) The reference line and the following subject line are placed too high.

2) The footer has not enough space before and after.

3) It would be nice to have a bottomframe for the backaddress field that is not longer than then the text itself.

All the best,
Florian



[-- Attachment #2: minidinb.pdf --]
[-- Type: application/pdf, Size: 25233 bytes --]

[-- Attachment #3: minidinb.tex --]
[-- Type: application/octet-stream, Size: 1726 bytes --]

\usemodule[letter]

\useletterstyle[dinb]

%
% header/footer alternative
%

\setupletterstyle
  [head,foot]
  [alternative=myletter]

%
% header: long infoblock
%

\setupletterstyle [head]
  [align=flushright, style={\switchtobodyfont[small]}]

\defineletterelement [head] [myletter] {
  \framed [frame=off,width=6.4cm, align=flushleft] {%
    {\tfc A very long infoblock}\blank[big]
    \input materie \endgraf}
}

%
% footer
%

\setupletterstyle [foot]
  [style={\switchtobodyfont[small]},
  spacebefore=4cm, % spacebefore has no effect
  spaceafter=4cm]  % spaceafter has no effect

\defineletterelement[foot][myletter] {
  \hrule
  A custom footer\\that is\\longer than\\three lines\\and misses space before and after and has strange linespacing.
}

%
% format back address
%

\setupletterstyle
  [backaddress]
  [bottomframe=on,
    separator={~\textbullet~}]

\setupletterstyle
  [option]
  [backaddress=yes]

%
% reference line
%

\setupletterstyle
  [reference]
  [alternative=e,
    list={yourref,yourmail,myref,date}, % why the trailing comma? without reference line is missing.
  ]

\setupletter
  [yourref,yourmail,myref,date]
  [width=.25\textwidth,
    titlestyle=\tfxx]

\setupletter
  [yourref=Yie/hie4,
    yourmail=2010-08-15,
    myref=Io/ch3ac,
    date=\currentdate]

%
% from/to address
%

\setupletter [fromname={Dr.\ No},
  fromaddress={Address\\City\\Country}]

\setupletter [toname={To whom it may concern},
  toaddress={Somecompany\\Somethingelse\\Somestreet\\Somecity\\Somecountry}]

%\setupletterstyle[dispatch=no]

%
% letter text
%

\starttext

\startletter
  [subject=Subject,
   opening={To whom it may concern,},
   closing={Regards,}]
\dorecurse{4}{\input tufte\par}
\stopletter

\stoptext


[-- Attachment #4: 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] 6+ messages in thread

* Re: letter module, vertical offset of reference line
  2010-10-31 10:16   ` Florian Wobbe
@ 2010-11-08 19:53     ` Wolfgang Schuster
  2010-11-09 10:09       ` Florian Wobbe
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Schuster @ 2010-11-08 19:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 31.10.2010 um 11:16 schrieb Florian Wobbe:

>> Can you make a example where this calculation goes wrong!
> 
> Thanks! Of cause, a commented minimal example is attached.
> 
> I have two problems and a wish:
> 
> 1) The reference line and the following subject line are placed too high.

I uploaded a new version where you disable the automatic placement of the reference line and the start of the letter text with

  \setupletterstyle[position=no] % default: position=yes

To remove the overlap of the information block and the reference you need the following settings in your style:

\setupletterstyle           [position=no]
\setupletterstyle[reference][voffset=11cm]
\setupletterstyle[firstpage][topspace=12cm,bottomspace=4cm]

> 2) The footer has not enough space before and after.

The module has no default values for the footer because the din layouts ignore the foot but this should work:

\setupletterstyle
  [foot]
  [style=small]

\setupletterstyle
  [foot][layer]
  [voffset=1cm]

\setupletterstyle
  [foot][frame]
  [width=\textwidth,
   height=2.5cm,
   topframe=on]

\startsetups letter:foot
  A custom footer\\that is\\longer than\\three lines\\and misses space before and after and has strange linespacing.\par
\stopsetups

> 3) It would be nice to have a bottomframe for the backaddress field that is not longer than then the text itself.

\setupletterstyle
  [reference][frame]
  [width=fit]

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] 6+ messages in thread

* Re: letter module, vertical offset of reference line
  2010-11-08 19:53     ` Wolfgang Schuster
@ 2010-11-09 10:09       ` Florian Wobbe
  2010-11-09 12:57         ` Wolfgang Schuster
  0 siblings, 1 reply; 6+ messages in thread
From: Florian Wobbe @ 2010-11-09 10:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Nov 8, 2010, at 20:53 , Wolfgang Schuster wrote:

> 
> Am 31.10.2010 um 11:16 schrieb Florian Wobbe:
> 
>>> Can you make a example where this calculation goes wrong!
>> 
>> Thanks! Of cause, a commented minimal example is attached.
>> 
>> I have two problems and a wish:
>> 
>> 1) The reference line and the following subject line are placed too high.
> 
> I uploaded a new version where you disable the automatic placement of the reference line and the start of the letter text with
> 
>  \setupletterstyle[position=no] % default: position=yes
> 
> [...]

Great, this works perfectly - thank you!

>> 3) It would be nice to have a bottomframe for the backaddress field that is not longer than then the text itself.
> 
> \setupletterstyle
>  [reference][frame]
>  [width=fit]

I meant the backaddress frame, though. This works analogously:

\setupletterstyle
  [backaddress][frame]
  [width=fit]

I have only on question left:

\setupletterstyle
  [reference]
  [alternative=e,
    list={yourref,yourmail}, % Why is the trailing comma needed?
                             % Without it, the reference line
                             % vanishes completely.
  ]

Best wishes,
Florian

___________________________________________________________________________________
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] 6+ messages in thread

* Re: letter module, vertical offset of reference line
  2010-11-09 10:09       ` Florian Wobbe
@ 2010-11-09 12:57         ` Wolfgang Schuster
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Schuster @ 2010-11-09 12:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 09.11.2010 um 11:09 schrieb Florian Wobbe:

>>> 3) It would be nice to have a bottomframe for the backaddress field that is not longer than then the text itself.
>> 
>> \setupletterstyle
>> [reference][frame]
>> [width=fit]
> 
> I meant the backaddress frame, though. This works analogously:

Just a typo, i wanted the backaddress too.

> \setupletterstyle
>  [backaddress][frame]
>  [width=fit]
> 
> I have only on question left:
> 
> \setupletterstyle
>  [reference]
>  [alternative=e,
>    list={yourref,yourmail}, % Why is the trailing comma needed?
>                             % Without it, the reference line
>                             % vanishes completely.
>  ]

A side effect from context how it reads key-val-settings,
the two setting

   \setupfoo[key=value]

and

   \setupfoo[key=value ]

are different. In the first setup the argument for the key
is „value“ while in the second it is „value “ with a space
at the end, because of this you need the comma after
the right brace.

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] 6+ messages in thread

end of thread, other threads:[~2010-11-09 12:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-31  8:36 letter module, vertical offset of reference line Florian Wobbe
2010-10-31  9:11 ` Wolfgang Schuster
2010-10-31 10:16   ` Florian Wobbe
2010-11-08 19:53     ` Wolfgang Schuster
2010-11-09 10:09       ` Florian Wobbe
2010-11-09 12:57         ` 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).