我正在尝试创建一种适合双窗口信封的简单信件格式。我能够成功定位位置层(蓝色),但位置层(应为红色,距离纸张左侧 1 厘米)的所有参数均不会对布局产生任何影响。
\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
答案1
事实并非如此address
(addressee
无论你从哪里得到这个信息)。
\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