Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am working on a letter using the t-letter module and have found that only my name and address show in the head layer. Any ideas as to how I can show additional contact information as well?

Here is the content:

\usemodule[letter][style=fullblock]

\setupletter
  [fromname={Name},
   fromaddress={Address},
   fromphone={Phone},
   fromfax={Fax}
   fromurl={URL}]

\setupletter
  [toname={Mike Wilson},
   toaddress={Linden street 12\\78569 TeX City}]

\setupletter
  [opening={Dear Reader,},
   closing={Greetings from the Author},
   subject={Step by step guide to write a letter},
   signature={Arthur Thor}]

\startletter
\input knuth\par
\stopletter

I've looked through the t-letter module source and it looks like it has the ability to display that information, but I'm not sure how to get it to.

Thanks in advance.

Edit: After fiddling with the workings of the t-letter module source I figured out that the following will produce the desired output, but the formatting is lost (the head is displaced in a single line with no spaces between the fields):

\setupletterlayer[head][alternative=left,fromrule=no]

Google searches commenced and I found that it should be \setupletterstyle, but when I use that the old head returns. Any thoughts?

share|improve this question
add comment

1 Answer

The following code seems to do the job, although I am not sure it is the "proper" way to do it.

\usemodule[letter]

\setupletter
  [fromname={Name},
   fromaddress={Address},
   fromphone={Phone},
   fromfax={Fax},
   fromurl={URL}]

\defineletterelement[layer][head][exp]{%
  \correspondenceparameter{fromname} \crlf
  \correspondenceparameter{fromaddress} \crlf
  \correspondenceparameter{fromphone} \crlf
  \correspondenceparameter{fromfax} \crlf
  \correspondenceparameter{fromurl} \crlf}

\setupletterlayer[head][%
  color=blue,
  alternative=exp]

\setupletter[%
  toname={Mike Wilson},
  toaddress={Linden street 12\\78569 TeX City}]

\setupletter[%
  opening={Dear Reader,},
  closing={Greetings from the Author},
  subject={Step by step guide to write a letter},
  signature={Arthur Thor}]

\startletter
\input knuth\par
\stopletter

One can then define the 'layer' named 'address' (ie information for addressee of the letter) in a similar way, using \defineletterelement.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.