summaryrefslogtreecommitdiffstats
path: root/doc/groff.html.node/Document-Parts.html
blob: 7b83511f7e673e9622dbfeb239830b66ba6dc910 (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
<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.0.3, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- This manual documents GNU troff version 1.23.0.

Copyright � 1994-2023 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License". -->
<title>Document Parts (The GNU Troff Manual)</title>

<meta name="description" content="Document Parts (The GNU Troff Manual)">
<meta name="keywords" content="Document Parts (The GNU Troff Manual)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta name="viewport" content="width=device-width,initial-scale=1">

<link href="index.html" rel="start" title="Top">
<link href="Request-Index.html" rel="index" title="Request Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Language-Concepts.html" rel="up" title="Language Concepts">
<link href="Argument-Units.html" rel="prev" title="Argument Units">
<style type="text/css">
<!--
div.example {margin-left: 3.2em}
-->
</style>


</head>

<body lang="en">
<div class="subsubsection-level-extent" id="Document-Parts">
<div class="nav-panel">
<p>
Previous: <a href="Argument-Units.html" accesskey="p" rel="prev">Argument Units</a>, Up: <a href="Language-Concepts.html" accesskey="u" rel="up">Language Concepts</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Request-Index.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<h4 class="subsubsection" id="Document-Parts-1">6.1.1.3 Document Parts</h4>

<p>A correct intermediate output document consists of two parts, the
<em class="dfn">prologue</em> and the <em class="dfn">body</em>.
</p>
<p>The task of the prologue is to set the general device parameters using
three exactly specified commands.  <code class="code">gtroff</code>&rsquo;s prologue is
guaranteed to consist of the following three lines (in that order):
</p>
<div class="example">
<div class="group"><pre class="example-preformatted">x T <var class="var">device</var>
x res <var class="var">n</var> <var class="var">h</var> <var class="var">v</var>
x init
</pre></div></div>

<p>with the arguments set as outlined in <a class="ref" href="Device-Control-Commands.html">Device Control Commands</a>.
The parser for the intermediate output format is able to interpret
additional whitespace and comments as well even in the prologue.
</p>
<p>The body is the main section for processing the document data.
Syntactically, it is a sequence of any commands different from the ones
used in the prologue.  Processing is terminated as soon as the first
&lsquo;<samp class="samp">x&nbsp;stop</samp>&rsquo;<!-- /@w --> command is encountered; the last line of any
<code class="code">gtroff</code> intermediate output always contains such a command.
</p>
<p>Semantically, the body is page oriented.  A new page is started by a
&lsquo;<samp class="samp">p</samp>&rsquo; command.  Positioning, writing, and drawing commands are always
done within the current page, so they cannot occur before the first
&lsquo;<samp class="samp">p</samp>&rsquo; command.  Absolute positioning (by the &lsquo;<samp class="samp">H</samp>&rsquo; and &lsquo;<samp class="samp">V</samp>&rsquo;
commands) is done relative to the current page; all other positioning is
done relative to the current location within this page.
</p>

</div>



</body>
</html>