Writing A Simple Document

This document introduces you to the most important instructions that you need to produce a simple document. Thus, this document only considers the "body" of the document, which is the pure text.

The following topics are covered below:

Text outside the body of the document comprises the page titles at the top and bottom of a page, page headings, footnotes, index entries and entries in the table of contents. These are explained later in this documentation.


General Information

When you write text and do not use Con-form instructions within your text, the formatted version of your text will look exactly as the unformatted version. This is because filling is initially switched off (see .FI - Filling).

The only difference you will notice are three blank lines at the top of each page. This is due to the initial values .HS 1 (see .HS - Header Space) and .HM 2 (see .HM - Header Margin). Furthermore, when you print the formatted document, you will notice a left margin consisting of 10 blank spaces before every printed line. This is due to the initial value .OP GUT=10 (see Gutter). When you do not specify otherwise, the initial Con-form values apply to the layout of your document.

Jagged Edge

.FI - Filling

.FI ON
.FI OFF

Filling is the process by which Con-form fills up each line between the defined margins with the maximum number of words.

The advantages of filling are:

  • you can edit your text without regard to line length - thus you can insert additional words in the middle of a paragraph as a separate line of text;

  • you can specify different values for the left and right margins - your text is automatically arranged between the new margins.

Initially, filling is switched off (.FI OFF). In this case, the defined value for the right margin is not considered and the formatted text looks exactly as the unformatted source text.

If you want to arrange your text between the defined left and right margins so that the right margin is printed with a jagged edge, you must switch filling on. However, since filling interacts with justification (which is initially switched on), you must take care to switch justification off:

.FI ON;.JU OFF

Even for writing a simple document, it is recommended that you specify left and right margins (see Left and Right Margins) and switch filling on. For example:

.LM 0;.RM 60
.FI ON;.JU OFF

Note:
When you switch filling on, but do not specify the left and right margin, the initial values .LM 0 and .RM 72 apply.

Left and Right Justification

.JU - Justification

.JU ON
.JU OFF

When filling and justification are switched on, spaces are added between words so that the text is justified between the left and right margins. In this case, the right margin of the formatted version is no longer printed with a jagged edge.

Lines which are immediately followed by a break (for example, the last line of a paragraph) are not justified.

Initially, justification is switched on (.JU ON). This means, when you specify .FI ON at the beginning of your document, justification is automatically activated. However, if you want to switch justification on, it is recommended that you always specify both instructions in order to avoid confusion, namely:

.FI ON;.JU ON

When you have specified .JU for the body of the text, this is not automatically applied to the footnotes (see .FN - Footnote).

Example

This example illustrates the instructions .FI and .JU which are used for filling and justification. It also contains the instructions .LM and .RM which are used to define the left and right margins (see Left and Right Margins). Furthermore, it introduces the .SL instruction which is used to create blank lines (see .SL - Skip Lines).

Source Text

.LM 0;.RM 60
By default, filling is switched off (.FI OFF) and justification is
switched on (.JU ON). When filling is switched off, words are
not borrowed or carried over from one line to another.
The left and right margins which have been specified are not considered
and the formatted text looks exactly like the unformatted text.
.SL 1
.FI ON
Now filling has been switched on (.FI ON). Since justification is
switched on by default (.JU ON), spaces are added between words to cause
an even right-hand margin, i.e. the text is justified between both margins.
Justification can only take place when filling has been switched on.
.SL 1
.JU OFF
Now justification has been switched off (.JU OFF). This means that
the right-hand margin remains ragged.
However, since filling is still switched on (.FI ON), short lines are
filled up with words from other lines.
The left and right margins are considered.

Formatted Output

By default, filling is switched off (.FI OFF) and justification is
switched on (.JU ON). When filling is switched off, words are
not borrowed or carried over from one line to another.
The left and right margins which have been specified are not considered
and the formatted text looks exactly like the unformatted text.

Now   filling   has  been  switched  on  (.FI   ON).   Since
justification is switched on by default (.JU ON), spaces are
added between words to cause an even right-hand margin, i.e.
the  text  is justified between both margins.  Justification
can only take place when filling has been switched on.

Now justification has been switched off (.JU OFF). This
means that the right-hand margin remains ragged. However,
since filling is still switched on (.FI ON), short lines are
filled up with words from other lines. The left and right
margins are considered.

Starting Text on a New Line

When filling is switched on, all text is arranged so that a line is filled with the maximum amount of words. To make sure that your formatted text starts on a new line, you can specify line breaks. There are several different ways to specify line breaks.

.BR - Break

.BR

You can use the .BR instruction to start text on a new line.

.EC - A Different End-of-Line Character

.EC character

Initially, the end-of-line character is the dollar sign ($). The text after the end-of-line character is placed on the next line.

The end-of-line character must be entered at the end of a line in your source text. When it is not entered at the end of the line, it is interpreted as normal text.

For example, to define the percent sign (%) as the new end-of-line character, you must specify:

.EC %

.OP END - A Different End-of-Line Character

.OP END=character

Instead of the .EC instruction, you can specify .OP END. Thus, you can also specify the following to define the percent sign (%) as the new end-of-line character:

.OP END=%

Blank Spaces

One or more blank spaces at the beginning of a line in your source text cause a break in filling. However, the formatted text also has the blank spaces in the beginning of the line.

A line break does not occur when the following instruction has been specified:

.SB ON

See .CB - Compress Blanks for further information.

Blank Lines

You can insert blank lines in your source text. In the formatted text, the text after the blank lines starts at the beginning of a new line.

Instructions Which Cause a Break in Filling

When you use one of the instructions listed below, the text after the instruction also starts on a new line.

.BF
.BX
.CE
.CH
.EF
.EM
.FI
.IL
.IP
.LM
.NL
.NP
.OF
.PH
.PS
.RA
.SL
.TI
.UL

Example

This example illustrates the .BR instruction and the end-of-line character which is used to start a new line in the formatted document. Initially, the end-of-line character is the dollar sign ($). This example also shows how to define another end-of-line character using the .EC instruction. Furthermore, it shows how to start a new line either by using space characters at the beginning of a line, or by simply leaving blank lines in the source text.

Source Text

.LM 0;.RM 65
.FI ON
To make sure that text starts in a new line, you can specify
an end-of-line-character in your text. By default, this is
the $ character; all text after the $ is placed in the next line. The
$ must be be entered at the end of a line.$
If the $ is not issued at the end of the line, it is interpreted
as normal text.
.SL 1
You can also specify a different end-of-line character using one of the
following instructions: .OP END=char or .EC char.
.SL 1
.EC &
The ampersand has been defined as the new end-of-line character.&
Thus, you can now output the $ when it is used at the end of a line:$
.BR
However, you can also use the .BR instruction to start text in a
new line.

Breaks are also caused by the insertion of blank lines in the text.
 A space character at the beginning of a line also causes a break in
filling. However, the formatted text also has the space character at the
beginning of the line.

Formatted Output

To  make sure that text starts in a new line, you can specify  an
end-of-line-character  in  your text. By default, this is  the  $
character; all text after the $ is placed in the next line. The $
must be be entered at the end of a line.
If  the $ is not issued at the end of the line, it is interpreted
as normal text.

You  can also specify a different end-of-line character using one
of the following instructions: .OP END=char or .EC char.

The ampersand has been defined as the new end-of-line character.
Thus,  you  can now output the $ when it is used at the end of  a
line:$
However,  you can also use the .BR instruction to start text in a
new line.

Breaks  are  also caused by the insertion of blank lines  in  the
text.
 A space character at the beginning of a line also causes a break
in  filling.  However,  the  formatted text also  has  the  space
character at the beginning of the line.

Creating Blank Lines

You can either leave blank lines in your source text or specify them explicitly using one of the following instructions. For information on blank lines which have been defined for the top and bottom of each page, see Blank Lines at the Top of the Page and Blank Lines at the Bottom of the Page.

Basically, the .SL and .IL instructions are similar. However, it is recommended that you use the .IL instruction, when you want to insert blank lines at the top of a page.

Note:
You can also use the .PS instruction which automatically inserts one blank line in the formatted output (see .PS - Paragraph Start).

.SL - Skip Lines

.SL number
.SL

If you want to separate two paragraphs, it is recommended that you use the .SL instruction. The separation of the two paragraphs is achieved either by the blank lines or by a page break. The .SL instruction does not cause blank lines at the top of a page.

For example, to specify 3 blank lines, you must use the following instruction:

.SL 3

If you do not specify a parameter, one line is skipped.

If the parameter specified is greater than the number of lines remaining on the page, the excess lines are ignored. For example, if you specify .SL 10 and only 2 more blank lines can be added to the page, the remaining 8 lines are ignored.

.IL - Insert Lines

.IL number
.IL

If you want to insert blank lines at the top of a page (for example, to reserve blank space for a diagram that will be added later to the printed page) it is recommended that you use the .IL instruction (and not the .SL instruction).

In addition, you must also specify either the instruction .NL or .NP. For example, to specify 10 blank lines at the top of a page, you can use one of the following instruction combinations:

.NL 10;.IL 10
.NP;.IL 10

If the parameter specified with the .IL instruction is greater than the number of lines remaining on the page, the excess lines are inserted at the top of the following page.

If you do not specify a parameter with the .IL instruction, one blank line is inserted.

You can also enter .IL 0 to cause a break in filling. No blank lines are produced in this case. The instruction .IL 0 is therefore equivalent to the .BR instruction.

Example

This example illustrates the different ways of defining blank lines.

Source Text

.LM 0;.RM 60
.FI ON;.JU ON
You can either leave blank lines in your source text, or specify
a Con-form instruction.

The instructions .SL and .IL are similar. However, when you want
to insert blank lines at the top of a page, it is recommended that
you use the .IL instruction.
.SL 1
When you want to separate two paragraphs, it is recommended that
you use the .SL instruction. The two paragraphs are separated by either
blank lines or a page break. In contrast to the .IL instruction, the .SL
instruction does not produce blank lines at the top of a page.

Formatted Output

You  can  either leave blank lines in your source  text,  or
specify a Con-form instruction.

The  instructions .SL and .IL are similar. However, when you
want  to  insert  blank lines at the top of a  page,  it  is
recommended that you use the .IL instruction.

When  you want to separate two paragraphs, it is recommended
that  you  use the .SL instruction. The two  paragraphs  are
separated by either blank lines or a page break. In contrast
to the .IL instruction, the .SL instruction does not produce
blank lines at the top of a page.

Including Comments in the Source Text

A comment is additional information in your source text which is not meant to appear in the formatted document. It is indicated with either the .** or the .CO instruction.

A comment can contain any characters and it must not exceed one line in length. For example, the end-of-line character (initially, this is the dollar sign) is ignored when it is used in a comment.

A comment does not cause a break in filling.

The instructions .** and .CO work slightly different. If the complete line of text is to be ignored, it is recommended that you use the .** instruction.

.** - Ignore All Instructions After the Comment

.** text

In contrast to the .CO instruction, the remainder of the line in which .** has been entered is ignored, i.e. an instruction after the .** instruction is not executed.

The instruction separator character (initially, this is the semicolon) is ignored. Thus, it can be used within the comment. For example:

.** This is a comment; it will not appear in the formatted output

.CO - Execute All Instructions After the Comment

.CO text

The .CO instruction can be used within a line containing several instructions, i.e. other instructions can stand before and after the .CO instruction, separated from it by the instruction separator character. Initially, the instruction separator character is the semicolon.

If you want to use the instruction separator character within a comment, you must repeat it. Otherwise, the text after the instruction separator character appears in the formatted version. For example:

.FI ON;.CO This is a comment;; the next instruction will be executed;.JU ON

Example

This example illustrates the two different instructions that can be used to enter comments in the source text.

Source Text

.LM 0;.RM 60
.FI ON
You can include comments in your source text which will not occur
in the formatted version.
.** This is a comment; all instructions in this line are ignored;.LM 10
.** If you want to enter several comment lines, each comment line
.** must begin with either the .** or .CO instruction.
A comment does not cause a break in filling.
.SL 1
.CO This is another comment;;the following instruction is considered;.LM 10
Now the new left margin is in effect which was been specified after the
comment which began with .CO.

Formatted Output

You  can include comments in your source text which will not
occur  in the formatted version. A comment does not cause  a
break in filling.

          Now  the  new left margin is in  effect  which was
          specified after the comment which began with .CO.