\startcomponent correspondence-letter-interface

\environment correspondence-environment

\chapter{Interface}


% Default interface

\startexamplecontent[interface:default]

\setupletterstyle[option][backgroundcolor=]

\startletter
\dorecurse{4}{\input knuth\par}
\stopletter

\stopexamplecontent

\start

\startletter
\input knuth
\stopletter

\stop

\section{Default}

\placefigure
  [force,none]
  {}
  {\startcombination
     {\examplecontent[interface:default][1]}{First page}
     {\examplecontent[interface:default][2]}{Second page}
   \stopcombination}

\setup[letter]


% Pragma interface

\startexamplecontent[interface:pragma]

\useletterinterface[pragma]

\setupletterstyle[option][backgroundcolor=]

\setups[letter:test]

\startsetups[letter:content]
\dorecurse{6}{\input tufte\par}
\stopsetups

\setups[letter:place]

\stopexamplecontent

\start

\useletterinterface[pragma]

\setups[letter:test]

\setups[letter:place]

\stop

\section{Pragma}

\placefigure
  [force,none]
  {}
  {\startcombination
     {\examplecontent[interface:pragma][1]}{First page}
     {\examplecontent[interface:pragma][2]}{Second page}
   \stopcombination}

\starttyping
\startbuffer[texletter]
...
\stopbuffer

\setups[letter:place]
\stoptyping



% Knuth interface

\startexamplecontent[interface:knuth]

\useletterinterface[knuth]

\setupletterstyle[option][backgroundcolor=]

\setuppapersize[A4][A4]

\address
Prof.~Brian~K. Reid
Department of Electricial Engineering
Stanford University
Stanford, CA 94305

\body
Dear Prof.~Reid:

I understand that you are having difficulties with
Alka-Seltzer tablets. Since there are 25~pills
per bottle, while the manufacturer's directions
recommend “plop,~plop, fizz,~fizz,” my colleagues
tell me that you have accumulated a substantial
number of bottles in which there is one tablet
left. % (See the 1978 SCRIBE User Manual, page 90.)

\dorecurse{10}
  {At present I am engaged in research on the potential
   applications of isolated analgesics. If you would
   be so kind as to donate your Alka||Seltzer collection
   to our project, I would be more than happy to send
   you preprints of any progress reports that we may
   publish concerning this critical problem.\par}

\closing
Sincerly,
R. J. Drofnats
Professor
\endletter

\stopexamplecontent

\start

\useletterinterface[knuth]

\setuppapersize[A4][A4]

\address
Prof.~Brian~K. Reid
Department of Electricial Engineering
Stanford University
Stanford, CA 94305

\body
Dear Prof.~Reid:

I understand that you are having difficulties with
Alka-Seltzer tablets. Since there are 25~pills
per bottle, while the manufacturer's directions
recommend “plop,~plop, fizz,~fizz,” my colleagues
tell me that you have accumulated a substantial
number of bottles in which there is one tablet
left. % (See the 1978 SCRIBE User Manual, page 90.)

At present I am engaged in research on the potential
applications of isolated analgesics. If you would
be so kind as to donate your Alka||Seltzer collection
to our project, I would be more than happy to send
you preprints of any progress reports that we may
publish concerning this critical problem.

\closing
Sincerly,
R. J. Drofnats
Professor
\endletter

\stop

\section{Knuth}

\placefigure
  [force,none]
  {}
  {\startcombination
     {\examplecontent[interface:knuth][1]}{First page}
     {\examplecontent[interface:knuth][2]}{Second page}
   \stopcombination}

\starttyping
\address
...
\body
...
\closing
...
\endletter
\stoptyping

\stopcomponent
