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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
|
^L
Network Working Group J. Postel
Request for Comments: 678 (SRI-ARC)
NIC: 31524 19 December 1974
Standard File Formats
Introduction
In an attempt to provide online documents to the network community we
have had many problems with the physical format of the final
documents. Much of this difficulty lies in the fact that we do not
have control or even knowledge of all the processing steps or devices
that act on the document file. A large part of the difficulty in the
past has been due to some assumptions we made about the rest of the
world being approximately like our own environment. We now see that
the problems are due to differing assumptions and treatment of files
to be printed as documents. We therefore propose to define certain
standard formats for files and describe the expected final form for
printed copies of such files.
These standard formats are not additional File Transfer Protocol data
types/modes/structures, but rather usage descriptions between the
originator and ultimate receiver of the file. It may be useful or
even necessary at some hosts to construct programs that convert files
between common local formats and the standard formats specified here.
The intent is that the author of a document may prepare his/her text
and store it in an online file, then advertise that file by name and
format (as specified here), such that interested individuals may copy
and print the file with full understanding of the characteristics of
the format controls and the logical page size.
Standardization Elements
The elements or aspects of a file to be standardized are the
character or code set used, the format control procedures, the area
of the page to be used for text, and the method to describe
overstruck or underlined characters.
The area of the page to be used for text can be confusing to discuss,
in an attempt to be clear we define a physical page and a logical
page. Please note that the main emphasis of this note is to describe
the standard formats in terms of the logical page, and that it is up
to each site to map the logical page onto the physical page of each
of their devices.
- 1 -^L
Standard File Formats
Standardization Elements
Physical Page
The physical page is the medium that carries the text, the
height and width of its area are measured in inches.
The typical physical page is a piece of paper eleven inches
high and eight and one half inches wide.
Typical print density is 10 characters per inch
horizontally and 6 characters per inch vertically. This
results in the typical physical page having a maximum
capacity of 66 lines and 85 characters per line. It is
often the case that printing devices limit the area of
the physical page by enforcing margins.
Logical Page
The logical page is the area that can contain text, the height
of this area is measured in lines and the width is measured in
characters.
A typical logical page is 60 lines high and 72 characters
wide.
Code Set
The character encoding will be the network standard Network
Virtual Terminal (NVT) code as used in Telnet and File Transfer
protocols, that is ASCII in an eight bit byte with the high order
bit zero.
Format Control
The format will be controlled by the ASCII format effectors:
Form Feed <FF>
Moves the printer to the top of the next logical page
keeping the same horizontal position.
Carriage Return <CR>
Moves the printer to the left edge of the logical page
remaining on current line.
- 2 -^L
Standard File Formats
Standardization Elements
Line Feed <LF>
Moves the printer to the next print line, keeping the same
horizontal position.
Horizontal Tab <HT>
Moves the printer to the next horizontal tab stop.
The conventional stops for horizontal tabs are every
eight characters, that is character positions 9, 17, 25,
... within the logical page.
Note that it is difficult to enforce these conventions and
it is therefore recommended that horizontal tabs not be used
in document files.
Vertical Tab <VT>
Moves the printer to the next vertical tab stop.
The conventional stops for vertical tabs are every eight
lines starting at the first printing line on each logical
page, that is lines 1, 9, 17, ... within the logical
page.
Note that it is difficult to enforce these conventions and
it is therefore recommended that vertical tabs not be used
in document files.
Back Space <BS>
Moves the printer one character position toward the left
edge of the logical page.
Not all these effectors will be used in all format standards, any
effectors which are not used in a format standard are ignored.
Page Length
The logical page length will be specified in terms of a number of
lines of text.
- 3 -^L
Standard File Formats
Standardization Elements
Page Width
The logical page width will be specified as a number of
characters.
Overstriking
Overstriking (note that underlining is a subset of overstriking)
may be specified to be done in one or both of the following ways,
or not at all:
By Line
The composite line is made up of text segments each
terminated by the sequence <CR><NUL> except that the final
segment is terminated by the sequence <CR><LF>.
By Character
Each character to be overstruck is to be immediately
followed by a <BS> and the overstrike character.
End of Line
The end of line convention is the Telnet end of line convention
which is the sequence <CR><LF>. It is recommended that use of <CR>
and <LF> be avoided in other than the end of line context.
- 4 -^L
Standard File Formats
Standard Formats
Standard Formats
Format 1 [Basic Document]
This format is designed to be used for documents to be printed on
line printers, which normally have 66 lines to a physical page,
but often have forced top and bottom margins of 3 lines each.
Active Format Effectors
<FF>, <CR>, <LF>.
Page Length
60 lines.
Page Width
72 Characters.
Overstriking
By Line.
Format 2 [Terminal]
This format is designed to be used with hard copy terminals, which
in the normal case have 66 lines to a physical page. It is
expected that there are no top or bottom margins enforced by the
terminal or its local system, thus any margins around the physical
page break must come from the file.
Active Format Effectors
<FF>, <CR>, <LF>, <HT>, <VT>, <BS>.
Page Length
66 lines.
Page Width
72 Characters.
Overstriking
By Character.
- 5 -^L
Standard File Formats
Standard Formats
Format 3 [Line Printer]
This format is designed to be used with full width (11 by 14 inch
paper) line printer output.
Active Format Effectors
<FF>, <CR>, <LF>.
Page Length
60 lines.
Page Width
132 Characters.
Overstriking
None.
Format 4 [Card Image]
This format is designed to be used for simulated card input. The
page width is 80 characters, each card image is followed by
<CR><LF>, thus each card is represented by between 2 and 82
characters in the file. Note that the trailing spaces of a card
image need not be present in the file, and that the early
occurence of the <CR><LF> sequence indicates that the remainder of
the card image is to contain space characters.
Active Format Effectors
<CR>, <LF>.
Page Length
Infinite.
Page Width
80 Characters.
Overstriking
None.
- 6 -^L
Standard File Formats
Standard Formats
Format 5 [Center Document]
This format is intended for use with documents to be printed on
line printers which normally have 66 lines to the physical page
but enforce top and bottom margins of 3 lines each. The text is
expected to be centered on the paper. If the horizontal printing
density is 10 characters per inch and the paper is 8 and 1/2
inches wide then there will be a one inch margin on each side.
Active Format Effectors
<FF>, <CR>, <LF>.
Page Length
60 Lines.
Page Width
65 Characters.
Overstriking
By Line.
Format 6 [Bound Document]
This format is intended for use with documents to be printed on
line printers which normally have 66 lines to the physical page
but enforce top and bottom margins of 3 lines each. If the
horizontal printing density is 10 characters per inch and the
paper is 8 and 1/2 inches wide then the text should be positioned
such that there is a 1 and 1/2 inch left margin and a one inch
right margin.
Active Format Effectors
<FF>, <CR>, <LF>.
Page Length
60 Lines.
Page Width
60 Characters.
Overstriking
By Line.
- 7 -^L
Standard File Formats
Implementation Suggestions
Implementation Suggestions
Overflow
Overflow can result from two causes, first if the physical page is
smaller than the logical page, and second if the actual text in
the file violates the standard under which it is being processed.
In either case the following suggestions are made to implementors
of programs which process files in these formats.
Length
If more lines are processed than fit within the minimum of the
physical page and the logical page length since the last <FF>,
then the <FF> action should be forced.
Width
If more character positions are processed than fit on the
minimum of the physical page width and the logical page width
since the last <CR>, then characters are discarded up to the
next <CR>.
or
If more character positions are processed than fit on the
minimum of the physical page width and the logical page width
since the last <CR>, then the <CR> and <LF> actions should be
forced.
References
A. McKenzie "TELNET Protocol Specification," Aug-73, NIC 18639.
"USA Standard Code for Information Interchange," United States of
America Standards Institute, 1968, NIC 11246.
- 8 -^L
|