summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-interface.tex
blob: a714b3b975e83f2a73f4c3872d94a284c88e9ac8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
\startcomponent correspondence-letter-interface

%\environment correspondence-environment

\usemodule[letter]

\ifx\startexamplecontent\undefined

  \def\startexamplecontent     {\gobbleuntil\stopexamplecontent}
  \def\examplecontent          {\dodoubleempty\doexamplecontent}
  \def\doexamplecontent[#1][#2]{\framed[width=6cm,height=8cm]{}}

\fi

\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