.bp
.ds F1 - % -
.ds Fd
.ds F3  ~
.ds Fl  Unit~III
.ds Fr  Module~III
.ds H1  ~
.ds Hl MP119
.ds Hr Introduction to UNIX
.PH "~~~~~~~~~~~~~Module~III~~~Additional formatting techniques" 5 2 2 3
.PH "Objectives" 5 2 2 3
.sp
After completion of this module, you will be able to:
.L1 5 2 1
Generate headers and footers.
.L1
Prevent extra spaces between words.
.L1
Generate classifications at the top and bottom of each page.
.L1
Underline portions of a line.
.L1
Automatically indent for paragraphs.
.L1
Automatically generate paragraph headings.
.L1
Cause automatic numbering of paragraphs.
.L1
Generate outlines up to three levels.
.L1
Prevent word hyphenation.
.L1
Annotate files.
.L1
Generate a table of contents.
.E1
.bp
.PH "Introduction" 5 2 2 3
.PP 5
You probably found the preceeding module somewhat rough going,
particularly the sections on generating macros, using line traps
and the like. Well, relax. You'll find that most of the gory
details of the material in this module has been taken care of for you.
.PP
This module discusses additional formatting techniques
which are achieved by using a set of general purpose macros,
referred as "NM" macros.
.PP
These macros are used in conjunction with the nroff commands
to provide an extensive variety of styles for memoranda, letters,
lists, and other documents.
.PP
The "NM" macros are easy to use and they'll save you considerable effort.
.PP
In order to use the macro package you must put the following special line
at the begining of your file:
.sp
.ti 10
\&.so /usr/lib/tmac.nm
.sp
Yes it's the same line we encountered earlier. Try to remember that
without this line in your file the macros carry no special meaning.
.PH "Headers"
.PP
The "NM" macros provide a simple method of generating headers.
The first five lines of each page are made available for this purpose.
Let's format five header lines:
.sp
.in 20
\&.ds H1 SNOOPY'S JOURNAL
.br
\&.ds H2 by
.br
\&.ds H3 Charlie Brown
.br
\&.ds H4 and
.br
\&.ds H5 Linus
.in -20
.PP
The system will automatically center the above five headers
on each output page.  Have you noticed that this notation is very
similar to the notation used to define a character string?
Well, there are a couple of differences. The header doesn't require
a reference to its name before being displayed; and, its name is
preassigned, not arbitrarily choosen.
.PP
Any header line may be suppressed by simply omitting it.
You may also cause a blank line to be displayed where a header would
have been by typing:
.sp
.ti 25
.tr #~
\&.ds H2 #
.tr ~
.sp
That's an odd looking character, isn't it?  It's called a tilde
and it is used to generate one and only one space. Therefore, it
also can be used to ensure that extra spaces aren't added between
words. For instance, it could be used to make sure only one space
is added between "Charlie" and "Brown", as follows:
.sp
Example:~~~~~~~~~~~~~Charlie#Brown
.sp
Remember our earlier discussion of ".tr # "?
.PP
Provision is also made for providing left and right adjustment within
the five header lines. The commands used for this purpose are as follows:
.sp
.in 15
\&.ds Hl heading-left (H1)
.br
\&.ds Hm heading-left (H2)
.br
\&.ds Hn heading-left (H3)
.br
\&.ds Ho heading-left (H4)
.br
\&.ds Hp heading-left (H5)
.br
\&.ds Hr heading-right(H1)
.br
\&.ds Hs heading-right(H2)
.br
\&.ds Ht heading-right(H3)
.br
\&.ds Hu heading-right(H4)
.br
\&.ds Hv heading-right(H5)
.in -15
.PP
When using left and right adjusted headers keep in mind the fact that
the line on which they appear must be previously defined.
This is done by specifing header text or a space (#)  after a commmad
of the sort \&.ds H1 (for instance \&.ds H1 #). Header text used in this
situation will be centered on the output line.
If you fail to define the line before referencing a left or right adjusted
header the entire line (including your adjusted header) will be suppressed.
.PH "Footers"
.PP
The system will also display three lines, called footers, at the bottom
of each output page. The first footer line, F1, is automatically set to produce
the current page number and date. To get:
.sp
.ti 20
-1-~~~~~~~~~~~~~~~November 2, 1979
.sp
at the bottom of each page, do nothing. This display is automatically
produced by the following macros:
.sp
.in 15
\&.ds F1  - % -
.br
\&.ds Fd  \\*(DY
.in -15
.sp
where \\*(DY represents a pre-defined string giving today's date.
(You can change it if you want.)
To supress the entire F1 line, both page number and date, type:
.sp
.ti 25
\&.ds F1
.sp
To supress the date only, type:
.sp
.ti 25
\&.ds Fd
.sp
The second footer line, F2, contains one field (text centered)
that is specified by the user. The third footer line accomodates left
and right adjusted footers. These are produced by referencing Fl and Fr
after the third footer line has been defined.
As with the header lines, this line is defined by
specifing footer text (which is centered) or a space (#).
.tr ##
.PH "Classification"
.PP
Classifications may be formatted to appear automatically
at the top and at the bottom of each page by using the 'CL' macro.
Here is an example of how the CL macro would appear.
.sp
.ti 20
\&.ds CL Super Hush Hush
.sp
This will produce "Super Hush Hush" before the first header and after
the last footer.
.sp
.in 6
.ti -6
Note: Headers, footers, and classifications may be reset ^throughout
the file. A later header, footer, or classification suppresses
the information in an earlier one.
.in -6
.sp
Do you think you've mastered what we've just covered?
Let's check your understanding with the following exercise.
.sp
.ne 18
.PH "EXERCISES"
.L1 5 2 1
Set headers in one of your files such that the current date appears
left-adjusted and the current page number appears right-adjusted on
one line, your name appears on a separate line, and your organization
and phone number appears on a third line.
.L1
Set footers such that the page number does not appear and a retention
date, Jan. 1980, appears on the left of the page.
.L1
Combine #1 and #2. Also place "UNCLASSIFIED" at the top and bottom
of each page.
.E1
.PH "Underlining~~(.I)"
.PP
In your study of nroff, you learned how to underline a single
line or several lines; however, the need may arise where only a
word or several words require underlining.  The "NM" macro (.I)
affords you this option.  To underline a single word, you would specify:
.sp
.ti 25
\&.I a-word
.sp
.ne 10
Or to underline several words, you would specify:
.sp
.nf
		   .I "A few words"
			  or
		   .I A~few~words
.sp
The results yielded will be:
.sp
.in 23
.I a-word
.br
.I "A few words"
.br
.I A ~few~words
.in 0
.sp
.PP
The system ignores all text following the occurrence of a space;
therefore, double quote marks or the tilde must be used when more
than a single word is to be underlined.
.PP
Complete lines may be also underlined without specifying the number
of lines to be underlined by using the following notation:
.sp
.nf
		.I
		<lines of text>
		.R

Example:
		.I
		I am a line of text.
		The system is going to
		underline me because I'm
		preceeded by the macro "I".
		.R
.fi
.sp
Where all lines of text placed between .I and .R will be underlined,
such as:
.sp
.in 16
.I
I am a line of text.
.br
The system is going to
.br
underline me because I'm
.br
preceeded by the macro "I".
.R
.in -16
.sp
The ".I" means italic type; the ".R" means Roman type. If you
had used troff and the phototypesetter you would have had
italics instead of underlining.
A word/words embedded within a line of text is underlined in the
following manner:
.sp
.nf
		<beginning of line>
		.I "text to be underlined"
		<end of line>
.sp
Example:         Now is the time for
		.I "all good men"
		to come to the aid of their party.
.fi
.sp
would appear as:
.sp
.in 16
Now is the time for
.I "all good men"
to come to the aid of their party.
.in 0
.sp
Note: The "Fill output line" mode must be turned on.
.PH "Paragraph~Formation~(.PP)"
.PP
Paragraphs may be formed simply by typing
.sp
.ti 15
\&.PP [indent] [line spacing]
.sp
In this case, "indent" denotes the number of spaces to indent the
first line of the paragraph. Also, "line spacing" represents the
number of lines (minus one) to skip before beginning the paragraph.
Below is an example of the "paragraph formation" command.
.sp
.in 25
\&.PP 5 3
.br
<text>
.in -25
.sp
This causes the first line of the paragraph to be automatically
indented by 5 spaces, and 2 blank lines to be left before the
paragraph. To form block style pargraphs; that is, double spacing
between paragraphs and no indention, specify:
.sp
.ti 25
\&.PP 0 2
.sp
.in 6
.ti -6
Note:~Once the parameters have been set in the first "PP" command,
subsequent commands need only specify parameter values when
the values are to be changed.
.in -6
.sp
.PH "Paragraph~Headings (.PH)"
.PP
The "NM" macros also provide a macro which allows you to place a
heading over a paragraph.  The form of the macro is
.sp
.ti 20
\&.PH [heading]
.sp
where "heading" is the value to appear as the heading for the
paragraph.  One blank line will be placed before and after
the heading.
.sp
.nf
	   Example:~~~~<text>
		       .PH "NM MACROS"
		       <text>
.fi
.sp
.ne 8
would yield
.sp
		       <text>
.sp
		       NM MACROS
.sp
		       <text>
.fi
.sp
Notice: Automatic spacing and the first line of text do not occur
on the same line as the heading.
.PP
Okay, let's expand the .PH macro to determine what other neat options
are available to you. Here is a sample of that expansion.
.sp
.in 10
\&.PH [heading] [indent] [ls to heading]
.br
[ls heading to text]
.in -10
The ls to heading and the ls to text are the number of lines
plus one.
.PP
For starters, the above options can be used to specify whether or not
the heading is to be indented, and to specify the number of blank
lines to be left before and after the heading. Here is an example.
.sp
.ti 18
\&.PH NM~MACROS 5 4
.sp
This would cause the heading to be indented by 5 spaces, 3 blank lines
to be placed before the heading and one blank line after it.  What
determined that one blank line would follow the  heading?
Answer in the space provided.
.sp 3
.PP
Is your answer, "the default (or predefined) value of the 4th option?"
That's it exactly.  Any or all of the options may be omitted. However,
the system will supply a value for the omitted options before
executing the macro.  The default values are:
.sp
.ti 20
\&.PH "" 0 2 2
.sp
.in 6
.ti -6
Notes:(1) The "2's" denote the number of lines, minus
one, to skip before and after the heading, respectively.
.br
.ti -6
~~~~~~(2) If an omitted option is followed by another option,
then you must specify the default value or 0.
Suppose you want to change the value of the third
option and not the second. Then you would specify
.in -6
.sp
.ti 23
\&.PH heading 0 5
.sp
.PP
Let's further explore the .PH macro to include still another option,
as follows:
.sp
.ti 20
[ls to text] [font]
.sp
The "font" allows you to underline the paragraph heading.  This may
be achieved by specifying either a "2" or a "3" as the font.  The
default value is 0.
.PP
The last PH macro option (and perhaps the most frequently used) allows
automatically number paragraphs.  The option is
.sp
.ti 20
[assigned format]
.sp
where "Assigned format" indicates that the paragraph is to be
numbered according to the specified format.
.PP
Following are several format options which can be specified to give
different types of numbering:
.sp
.I "Specify~~~~~~~~~~~~~~~~~~~~~To~Get"
.sp
.nf
   1                         1,2,3,4,...
   i                         i,ii,iii,iv,...
   I                         I,II,III,IV,...
   a                         a,b,c,d,...
   A                         A,B,C,D,...
.fi
.sp
Note:  This option and the previously discussed options need
to be specified only on the first PH line,
subsequent paragraphs need only to be preceded by
"PH."
.sp
.nf
	    Example:  .PH "" 0 2 2 0 I
		      <text>
		      .PH
		      <text>
		      .PH
		      <text>
.fi
.ne 15
.sp
With this combination of commands
the result would be:
.sp
.nf
		      I
.sp
		      <text>
.sp
		      II
.sp
		      <text>
.sp
		      III
.sp
		      <text>
.fi
.sp
.PP
Observe that the number was placed on a separate line above the
paragraph.  How do you suggest the .PH macro be modified to achieve
numbering on the same line? Answer in the space provided.
.sp 4
What's your answer? Is it change the third option to 0? That's exactly
what you would do. Also, if all you're interested in is numbering
paragraphs, the macro may be formed as follows:
.sp
.ti 18
\&.PH "" 0 0 0 0 I
.sp
.PP
Now let's take a look at the .PH macro in its entirety.
.sp
.ti 15
\&.PH "NM MACROS" 0 5 3 2 i
.sp
What will be the results of the above command? Answer in the space
below.
.sp
.PP
The above command establishes "NM MACROS" as a paragraph
heading.  The heading is underlined and numbered with the Roman
numeral i. It will not be indented, four blank lines will
preceed it, and two blank lines will follow.
.PP
If your analysis is contrary to the above, please review this
section.
.ne 15
.PH "Outline Style Paragraph Headings"
.PP
There is an alternative to the type of paragraph headings discussed in
the preceeding section. This is a system of outline style headings of
the following form:
.sp
.ti 15
1. I Must Be Crazy
.br
.ti 15
2. To Be Taking This Course
.sp
These headings are obtained by typing in the following commands:
.sp
.tr #~
.ti 15
\&.P1 I#Must#Be#Crazy
.br
.ti 15
\&.P1 To#Be#Taking#This#Course
.ne 10
.sp
Successive uses of the \&.P1 macro will cause an incremental increase in
the numbers assigned to the paragraph headings. Notice that tildes
must be used to delimit blank spaces in the headings.
.PP
You might be thinking that there must be more to outline style headings
than this. If you are, you're absolutely right. Additional heading levels
can be obtained by using the other commands in the series .P1,P2.....P6.
Things will get a little more complicated at this point, so hang in there.
Following a \&.P1 command with a \&.P2 command ,for example:
.sp
.in 15
\&.P1 I#Must#Be#Crazy
.br
\&.P2 Wildly#Crazy
.br
\&.P2 Truly#Insane
.br
\&.P1 To#Be#Taking#This#Course
.in -15
.sp
will produce this sort of heading structure:
.so
.in 15
1.  I Must Be Crazy
.br
1.1.  Wildly Crazy
.br
1.2.  Truly Insane
.br
2.  To Be Taking This Course
.in -15
.sp
Can you guess what the addition of a \&.P3 will do to our heading structure?
Well, let's say we put "\&.P3 Right#Off#The#Wall" after the last \&.P2
entry in the above example. What do you think the resulting heading structure
will look like? Place your answer in the space provided.
.tr ##
.sp 3
You're absolutely right if your answer matches the following one:
.sp
.in 15
1.  I Must Be Crazy
.br
1.1.   Wildly Crazy
.br
1.2    Truly Insane
.br
1.2.1.   Right Off the Wall
.br
2.   To Be Taking This Course
.in -15
.PP
Outline style headings certainly seem to be a useful tool, don't they?
Well, you have'nt seen anything yet. Wait until you see how they're used
with the table of contents macro.
.PH "Table of Contents"
.PP
The table of contents macro (.TC) is used in conjunction with outline
style headings (.P1,.P2......P6). The numbers and headers of all
paragraphs using the outline style macro are "remembered" so that a
table of contents can be "recalled" at the conclusion of the document.
Retrieving the table of contents could'nt be more simple, you simply
type:
.sp
.ti 25
\&.TC
.sp
at the end of the file. A table of contents will be printed starting on
a new page.
The table of contents is already set up, with the heading "Table of
Contents," and pages numbered begining with i.
.sp
.in 6
.ti -6
Note: Any heading associated with the \&.PH macro will not be included
in the table of contents.
.PH "Forming Outlines"
.PP
Sooner or later, you will be given some text to place into an
outline form.  Quite a task isn't it, with all the numbering
and indenting, etc?
.PP
Well, hang in there, you've been rescued again.  Macros are
available which automatically number and indent text to form
outlines up to 3 levels.
.PP
Suppose you want to enumerate a list of items such as:
.sp
.nf
		      1. fruits
.sp
		      2. meats
.sp
		      3. vegetables
.sp
.ne 12
Then in your file, you would type:

		      .L1
.br
		      fruits
.br
		      .L1
.br
		      meats
.br
		      .L1
.br
		      vegetables
.br
		      .E1
.fi
.sp
".L1"  places the text that follows on level 1.  "E1" denotes the
end of the level 1 list.  The counter is reset, thereby causing the
next occurrence of the  ".L1" macro to begin the numbering again
at 1.
.sp
.in 6
.ti -6
Note: The text isn't limited to a single word. It may be a phrase,
a group of sentences.
.in -6
.ne 15
.PP
Now let's expand the outline to include items on the second level.
To form the following outline
.sp
.nf
		1.  fruits
.br
			a.  apples
.br
			b.  oranges
.br
			c.  plums
.br
		2.  meats
.br
		3.  vegetables
.sp
.ne 20
the text in your file would appear as
.sp
		       .L1
.br
		       fruits
.br
		       .L2
.br
		       apples
.br
		       .L2
.br
		       oranges
.br
		       .L2
.br
		       plums
.br
		       .E2
.br
		       .L1
.br
		       meats
.br
		       .L1
.br
		       vegetables
.br
		       .E1
.fi
.sp
Observe that the macro ".L2" places the text that follows on the
second level, and that the macro ".E2" ends the level 2 list.
".E2" also resets the counter for the second level.
.PP
What do you think are the macros used in establishing the third
level in an outline?
Answer in the space provided.
.sp 3
You are right if you answered ".L3" and ".E3."
.sp
.ne 20
.PP
Are you ready to try one? Okay, write what you would type in
your file to obtain the following:
.in 10
.L1
fruits
.L2
apples
.L3
delicious
.L3
golden
.E3
.L2
oranges
.L2
plums
.E2
.L1
meats
.L1
vegetables
.L2
peas
.L2
potatoes
.E2
.E1
.in -10
.ne 8
Notice the strange little symbol on the third level. It's called a
bullet.  This is the symbol used to number items placed on this
level.
.br
.ne 30
.PP
Now compare your solution with the solution that follows, then try
it on the terminal.
.sp
.nf
			 .L1
			 fruits
			 .L2
			 apples
			 .L3
			 delicious
			 .L3
			 golden
			 .E3
			 .L2
			 oranges
			 .L2
			 plums
			 .E2
			 .L1
			 meats
			 .L1
			 vegetables
			 .L2
			 peas
			 .L2
			 potatoes
			 .E2
			 .E1
.fi
.sp
.ne 15
.PH "More on Outlines"
.PP
The macros in the previous section aren't quite so rigid as they
appear to be. Actually you have a great deal of control in forming
your outlines.  Let's take a look at the options which may be
specified in the macros used in forming outlines.
.sp
.in 15
\&.L1 [indent] [line spacing] [assigned
.br
format] [left string] [right string]
.in -15
.sp
The value in the "indent" option indicates the number of spaces to
place before the numbered item.  The "line spacing" value denotes
the number of blank lines to place before the item.  The "assigned
format" has the same meaning previously discussed. It determines
the type of numbering to be used. The next two options are used to place
characters before and after the number.  You can do such things as
command
.ne 5
.sp
.in 20
\&.L1  5 2 A {  }~~
.br
fruits
.in -20
.sp
would yield
.sp
.in 20
.L1  5 2 A  {  }~~
fruits
.E1
.in -20
.sp
.in 10
.ti -10
Notes:(1) Use of the "tilde" insures exact spacing
between the number and the text item.
.ti -10
~~~~~~(2) The default options are:
.ti +10
\&.L1 8 1 1  "" .~~
.sp
.ti -10
~~~~~~(3) The options for the "L2" macro are the same
as for the "L1" macro, except that the assigned format is
"A".
.in -10
.PP
There are actually six of these macros: .L1,.L2,.L3,.L4,
.be
\&.L5, and .L6 and corresponding ending macros (i.e. .E1,.E2,
.br
\&.E3,.E4,.E5 and .E6). The defaults values for these macros are as follows:
.sp
.L1 8 1 1  "" .~~
.L2
.L3
.L4
.L5
.L6
.E1
.E2
.E3
.E4
.E5
.E6
.sp
.in 10
.ti -10
Notes:(1) These six macros may be used in other contexts.
That is, they may  be used to number any line
of text, not just items in an outline. You
do not have to specify one just because the
other has been specified. For example, L2 may
be specified without specifying L1 and vice versa.
.br
.ti -10
~~~~~~(2) L1 and L2 may be coded such that the default
numbering is over-ridden in either or both.
.br
.ti -10
~~~~~~(3) All specified options remain in effect unless
respecified.
.in -10
.sp
.nf
Example:                 .L1 5 2 i [ ]~~
.br
			 <text>
.br
			 .L1
.br
			 <text>
.br
would yield:
.br
			 [i] <text>
.br
			 [ii] <text>
.fi
.bp
.PH "Bullet~Marked~Items"
.PP
Lines of text may be bullet marked by using
.sp
.ti 22
\&.BU [indent]
.sp
where "indent" is the number of blanks placed in front of the
bullet.  The default is 8.
.in 0
.PP
If you type, for example:
.sp
.in 20
\&NM MACROS are used for:
.br
\&.BU
.br
\&Creating headers and footers
.br
\&.BU
.br
\&forming paragraph headings
.br
\&.BU
.br
\&Underlining
.br
\&.in 0
.in -20
.br
.sp 2
you will get:
.sp
NM MACROS are used for:
.BU
Creating headers and footers
.BU
Forming paragraph headings
.BU
Underlining
.in 0
.PP
CAUTION: Following execution of the bullet macro, the system
continues to indent any subsequent text.  One of the
following (.PH,.PP,.in) can be issued to rectify this situation.
Note that .L3 has the same effect as .BU and is preferred.
.PH "Word Hyphenation"
.PP  5 2
This unique feature allows you to control word hyphenation
when displaying your files. That is, you can dictate whether or not
a word is to be hyphenated.  To prevent word hyphenation simply place
a caret or the circumflex adjacent to the first letter of the word.
'ne 5
Suppose you had specified a line length of 50 and you type the word
"communication" beginning in column 45:
.br
.ne 25
.sp
.nf
~~~~~~~~~~columns
~~~~~~~~~11111111112222222222333333333344444444445
12345678901234567890123456789012345678901234567890
					any communication

The system will display:

~~~~~~~~~~columns
~~~~~~~~~11111111112222222222333333333344444444445
12345678901234567890123456789012345678901234567890
					  any com-
munication
.fi
.sp
as opposed to:
.br
.ll 50
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~any ^communication
.sp
if you had typed:

.tl '~~~~~~~~~~~~~~^communication'''
in column 45.
.ll 65
.PH "Annotate Files"
.PP
Comment lines are used to describe the contents or purpose of
a file, and may be incorporated  within a file without affecting the
output.  Consequently, a file may be documented and created
simultaneously.  Not only do comment lines enhance documentation,
but they facilitate determining the contents of a file, and should
be used quite liberally throughout the file.
.sp
.nf
	      ' These are comment lines.  Lines
	      ' which begin in column 1 with either
	      . a single quote, a period, or
	      . a backlash and quote mark.
	     \e" Don't leave a space after the comment
	     \e" symbol or the comment will appear in output.
.fi
.sp
.in 6
.ti -6
Note: Comments are ignored by Nroff, and will not appear
as a part of the output.
.in -6
.bp
.PH "Exercise"
.PP
Create the following file which is an outline catagorizing
the different types of computer languages.  Use at least one comment
line.
.sp
.L1 "" "" I ( )~~
machine language
.L2 "" 1 A ( )~~
coded in numerics
.L2
languages
.E2
.L3 20
Burroughs 6700
.L3
Univac 494
.L3
CDC 7600
.E3
.L1
Assembly language
.L2
Coded in mnemonics
.L2
languages
.E2
.L3
PDP-11
.L3
IBM 370
.L3
Univac 1108
.E3
.L1
Compiler languages
.L2
Coded in English-like statements
.L2
languages
.E2
.L3
Fortran
.L3
cobol
.L3
PL/I
.E3
.E1
.sp 2
.in 4
.ti -4
****Congratulations, you've completed another module.  Please review
the module before taking the module III test.
.in -4
.bp
.PH "~~~~~~~~~~~~~~~~Module III Test"
.sp
.L1 5 2 1
Headers can be generated on each output page by using the ___________
Macros.
.L1
Footers can be generated on each output page by using the _____________
Macros.
.L1
Headers and footers are automatically
.L2
left-adjusted.
.L2
right-adjusted.
.L2
centered.
.E2
.L1
The "CL" macro causes the specified classification to be displayed
.L2
at the top of the page.
.L2
at the bottom of each page.
.L2
both (A) and (B).
.E2
.L1
Write the necessary commands to generate the following headers:
.br
.in 5
.lt 45
.tl ''SECRET''
.tl '7/28/78''E53MEMO'
.in -5
.lt 65
.L1
Write the command to begin a paragraph having the first line indented
by 5 spaces.
.L1
Write the command to number paragraphs in a file with capital Roman
numerals.
.L1
Write the command to format the word "heading" as an underlined
paragraph heading.
.L1
Analyze the following:
.sp
.in +10
(a)  .L1 "" 0 a [ ]
.br
(b)  .L2
.br
(c)  .E3
.br
(d)  .BU
.in -10
.L1
.ne 20
What will the following produce?
.in +10
.br
\&.PH "~aaaaaaa" 0 1 0 0
.br
\&.L1 "" 1 A
.br
\&bbbbbbb
.br
\&.L2 "" 1 1
.br
\&ccccccc
.br
\&.L3
.br
\&ddddddd
.br
\&.L2
.br
\&ccccccc
.br
\&.L1
.br
\&bbbbbbb
.br
.in -10
.ne 10
.L1
Rewrite the following text such that the first 2 groups and the
last 2 groups are underlined.
.sp
.in +5
aaaa aaaaa bbb bbbbbb
.br
cc cccc ddd dddddd
.in -5
.E1
.sp  2
.in 4
.ti -4
.L1
What commands would you have to type in to get the following:
.sp
1.   This UNIX Manual
.br
1.1.   Sure Does Make Pleasant Reading
.E1
.sp
****Compare your answers to the following answers.  If you answered
four or more incorrectly, please review this module before proceeding
to the Unit III proficiency test.
.in -4
.bp
.PH "Answers to module III test"
.sp
.L1  5 2 1
Headers can be generated on each output page by using the
.I "Header (H1,H2,H3,Hr,Hl)~"
macros.
.L1
Footers can be generated on each output page by using the
.I "Footer (F1,F2,F3,Fr,Fl)~"
macros.
.L1
.I "C~"
headers and footers are automatically centered.
.L1
.I "C~"
The "CL" macro causes the specified classification to be
displayed at the top and at the bottom of each page.
.L1
.in +10
\&.ds H1 ~
.br
\&.ds Hl 7/28/78
.br
\&.ds Hr E53MEMO
.br
\&.ds CL SECRET
.in -10
.sp
will generate the following headers:
.sp
.br
.in 5
.lt 45
.tl ''SECRET''
.tl '7/28/78''E53MEMO'
.in -5
.lt 65
.sp
.L1
.I "\&.PP 5"
will begin a paragraph indenting the first line
by 5 spaces.
.L1
\fI\&.PH~""~0~0~0~I\fR will number paragraphs in a file with
capital roman numerals.
.L1
.I "\&.PH~"heading"~0~0~0~2~"
will format the word "heading" as an underlined paragraph heading.
.L1
.L2
.I "\&.L1~""~O~a~[ ]"
will place the text that follows on
the first level, and the numbering will be lower case
alphabets enclosed within brackets.  The default value of 8 is used
for the indent parameter, and no blank lines will precede the text.
.sp
.L2
.I "\&.L2"
will place the text that follows on the second
level. All default options will be used, thereby causing the numbering
to be lower-case alphabets followed by a period and two spaces, indent
value is 8, and one blank line is placed before the text.
.sp
.bp
.L2
.I "\&.E3"
is used to determine the third level list of an
outline.
.sp
.L2
.I "\&.BU"
is used to bullet mark and to indent lines of text
by 10 spaces.
.E2
.L1 5 2 1
.sp
.PH "aaaaaaa" 0 1 0 0
.L1 "" 1 A
bbbbbbb
.L2 "" 1 1
ccccccc
.L3  8
ddddddd
.L2
ccccccc
.L1
bbbbbbb
.E3
.E2
.E1
.sp
(11)
.sp
~~~~~~.I "aaaa aaaaaa"
.br
~~~~~~bbb bbbbbb
.br
~~~~~~cc cccc
.br
~~~~~~.I "ddd dddddd"
.sp
.tr {~
(12)
.sp
The necessary commands:
.sp
.I ".P1 This{UNIX{Manual"
and
.I ".P2 Sure{Does{Make{Pleasant{Reading"
.tr {{
