2

I am trying to create a simple letter format that fits my double-window envelopes. I am able to position the location layer (in blue) successfully, but none of the parameters for the location layer (which should be in red and 1cm from the lefthand side of the paper) are having any effect on the layout.

\usemodule[letter]

\setupletter
  [name={Chris},
   address={My Address Line One\\My Address Line Two\\My Address Line Three},
   toname={John Doe},
   toaddress={Address Line 4\\Address Line 5\\Address Line 6}]

%% This layer is positioned correctly
\defineletterelement[layer][location][example]{\correspondenceparameter{address}\par}
\setupletterlayer[location][alternative=example,y=1.2cm,x=1cm,color=blue,style=sans]

%% This one is not
\defineletterelement[layer][addressee][example]%
    {\correspondenceparameter{toname}\\\correspondenceparameter{toaddress}\par}
\setupletterlayer[addressee][alternative=example,y=6cm,x=1cm,color=red,style=sans]

\setupletterlayer[topmark][y=9.1cm]

%% Delete the word "Date"
\setuplettertext[en][date=]

%% Move the date line so that it starts 9 cm from the top of the page
\setupletterlayer[reference][y=9cm]

\startletter
  [opening={Dear \correspondenceparameter{toname},},
   closing={Sincerely,},
   signature={\correspondenceparameter{name}}]

My letter text here. I can worry about the rest later.

\stopletter
3

It is address not addressee (wherever you got this from).

\usemodule[letter]

\setupletter
  [name={Chris},
   address={My Address Line One\\My Address Line Two\\My Address Line Three},
   toname={John Doe},
   toaddress={Address Line 4\\Address Line 5\\Address Line 6}]

%% This layer is positioned correctly
\defineletterelement[layer][location][example]{\correspondenceparameter{address}\par}
\setupletterlayer[location][alternative=example,y=1.2cm,x=1cm,color=blue,style=sans]

%% This one is not
\defineletterelement[layer][address][example]%
    {\correspondenceparameter{toname}\\\correspondenceparameter{toaddress}\par}
\setupletterlayer[address][alternative=example,y=6cm,x=1cm,color=red,style=sans]

\setupletterlayer[topmark][y=9.1cm]

%% Delete the word "Date"
\setuplettertext[en][date=]

%% Move the date line so that it starts 9 cm from the top of the page
\setupletterlayer[reference][y=9cm]

\startletter
  [opening={Dear \correspondenceparameter{toname},},
   closing={Sincerely,},
   signature={\correspondenceparameter{name}}]

My letter text here. I can worry about the rest later.

\stopletter

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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