I am using the letter module that came with context. A sample of a basic letter is below; I have put in "dummy" for the logo and the signature, but these are working fine when I include the files.
Also is there a better way to manage color? I \definecolor, \startcolor, \stopcolor, but maybe there is a better way to indicate that certain sections of the letter should be in a color. Thanks.
Thank you very much for your guidance.
\usemodule[letter]
\setuppapersize[letter][letter]
\definecolor[maroon][h=990033]
\setuplanguage [en] [date={dd, month, year}]
\setupletteroptions
[language=english,
bodyfont={rm,12pt},
]
% Define logo for the first page
\defineletterelement[layer][head][example]%
{\framed[background=logohead,height=25mm,frame=off,align=left]%
{\externalfigure[dummy]}}
% We put our logo in the head
\setupletterlayer[head]
[alternative=example,
x=9mm,
y=10mm
]
\defineletterelement[layer][foot][example]%
{\startcolor[maroon] \ss \tfx The University of Massachusetts is an Affirmative Action/Equal Opportunity Institution. \stopcolor}
\setupletterlayer[foot][
align=centerbottom,
alternative=example]
\setupletter[
name={Michael Ash},
dept={Department of Economics},
building={Thompson Hall},
street={200 Hicks Way},
city={Amherst, MA 01003-9277},
phone={+1-413-545-2590},
fax={+1-413-545-2921},
]
\defineletterelement[layer][location][example]%
{\setuptabulate[bodyfont=normal]
\startcolor[maroon]
\starttabulate[|lw(.4\textwidth)|rw(.55\textwidth)|]
\NC \tfa \sc University of Massachusetts \NC \NR
\NC \tfa \sc Amherst \NC \correspondenceparameter{dept} \NR
\NC \NC \NR
\NC\correspondenceparameter{building} \NC tel \correspondenceparameter{phone} \NR
\NC\correspondenceparameter{street} \NC fax \correspondenceparameter{fax}\NC\NR
\NC\correspondenceparameter{city} \NC \correspondenceparameter{email} \NC\NR
\stoptabulate
\stopcolor}
\setupletterlayer[location]
[alternative=example,
x=42mm,
y=4mm
]
\starttext
\startletter[
toname={Professor Addressee},
toaddress={123 West Home Ave.\\Chicago, IL 60614},
opening={Dear Dr. Addressee,},
subject={A test letter},
closing={Best regards,},
signature={\externalfigure[dummy]\\Michael Ash}
]
Thank you very much for the invitation I am truly honored by the
opportunity and delighted to attend. I look forward to meeting
you. Thank you again for the invitation.
\stopletter
\stoptext