Previous | Contents | Index |
You can break text into blocks or sections by using the <HEAD> tag.
When you use the <HEAD> tag, you need to give the section a name.
The name is enclosed in parenthesis. The format is:
<HEAD>(section name)
We are going to break the sample documentation into two sections. You can edit the SAMPLE_DOC.SDML file and add the heading tags and names. A paragraph <P> tag was also added under the list to put some space between the two sections.
<comment>(This is the DECdocument sample documentation file) <head>(Dog Groups and Breeds) <p> There are many <emphasis>(groups\bold) of dogs. Each group type will perform a different specialized task. One group is used for herding, one is used for hunting, another is used for searching and so on. Within each group, there are numerous <emphasis>(breeds\italic) of dogs. For example, in the hunting group, there are <sample_text> <list>(numbered) <le> Labrador Retrievers <list>(unnumbered) <le> Black in color <le> Chocolate in color <le> Yellow in color <endlist> <le> Golden Retrievers <le> Pointers <le> etc. <endlist> <endsample_text> <p> <head>(Selecting a Dog) <p> <emphasis>(Before you get a dog), you should consider what type of dog you want and what the dog will be used for. If you just want a family pet, some breeds are better than others. Some breeds tend to bond to only one person while others will bond to all family members. <underline>(Selecting the right breed of dog is very important.) <p> <table> <table_setup>(3\6\12) <table_heads>(Size\Weight\Example) <table_row>(tiny\1-15 lbs\Chihuahua<line>Toy Poodle) <table_row>(small\15-30 lbs\Cocker Spaniel<line>Boston Terrier) <table_row>(medium\30-60 lbs\Irish Setter<line>Collie) <table_row>(large\60-100 lbs\German Shepherd<line>Retrievers) <table_row>(giant\over 100 lbs\Great Dane<line>St. Bernard) <endtable> <line>(indent\4\bigskip) Dogs come in all shapes and sizes. <code_example> D O G | | V @____/\ | ^ | \ |______| / |------------- / \ \ / ------------- / \ / \ _/ _/ _/ _/ <endcode_example> <note> Dogs can be best friends. <endnote> |
You can create a PS, TXT or TERM output file.
There are many groups of dogs. Each group type will perform a different specialized task. One group is used for herding, one is used for hunting, another is used for searching and so on. Within each group, there are numerous breeds of dogs. For example, in the hunting group, there are
Before you get a dog, you should consider what type of dog you want and what the dog will be used for. If you just want a family pet, some breeds are better than others. Some breeds tend to bond to only one person while others will bond to all family members. Selecting the right breed of dog is very important.
Size | Weight | Example |
---|---|---|
tiny | 1-15 lbs |
Chihuahua
Toy Poodle |
small | 15-30 lbs |
Cocker Spaniel
Boston Terrier |
medium | 30-60 lbs |
Irish Setter
Collie |
large | 60-100 lbs |
German Shepherd
Retrievers |
giant | over 100 lbs |
Great Dane
St. Bernard |
Dogs come in all shapes and sizes.
D O G | | V @____/\ | ^ | \ |______| / |------------- / \ \ / ------------- / \ / \ _/ _/ _/ _/ |
Dogs can be best friends. |
3.11.1 Numbered Headings
If you use the <HEAD> tag with a number, you can number your
sections and sub-sections. 1 is the main section and 6 is the lowest
sub-section within the main section. The format is:
<HEADn>(section name)
For example:
<head1>(Main section) <head2>(First Sub-section under the Main section) <head2>(Second Sub-section under the Main section) <head3>(First Sub-section under the Second Sub-section) <head1>(Another Main section) |
1 Main section 1.1 First Sub-section under the Main section 1.2 Second Sub-section under the Main section 1.2.1 First Sub-section under the Second Sub-section 1 Another Main section |
In this example, the first <HEAD> tag is changed to <HEAD1> and the second <HEAD> tag is changed to <HEAD2>.
<comment>(This is the DECdocument sample documentation file) <head1>(Dog Groups and Breeds) <p> There are many <emphasis>(groups\bold) of dogs. Each group type will perform a different specialized task. One group is used for herding, one is used for hunting, another is used for searching and so on. Within each group, there are numerous <emphasis>(breeds\italic) of dogs. For example, in the hunting group, there are <sample_text> <list>(numbered) <le> Labrador Retrievers <list>(unnumbered) <le> Black in color <le> Chocolate in color <le> Yellow in color <endlist> <le> Golden Retrievers <le> Pointers <le> etc. <endlist> <endsample_text> <p> <head2>(Selecting a Dog) <p> <emphasis>(Before you get a dog), you should consider what type of dog you want and what the dog will be used for. If you just want a family pet, some breeds are better than others. Some breeds tend to bond to only one person while others will bond to all family members. <underline>(Selecting the right breed of dog is very important.) <p> <table> <table_setup>(3\6\12) <table_heads>(Size\Weight\Example) <table_row>(tiny\1-15 lbs\Chihuahua<line>Toy Poodle) <table_row>(small\15-30 lbs\Cocker Spaniel<line>Boston Terrier) <table_row>(medium\30-60 lbs\Irish Setter<line>Collie) <table_row>(large\60-100 lbs\German Shepherd<line>Retrievers) <table_row>(giant\over 100 lbs\Great Dane<line>St. Bernard) <endtable> <line>(indent\4\bigskip) Dogs come in all shapes and sizes. <code_example> D O G | | V @____/\ | ^ | \ |______| / |------------- / \ \ / ------------- / \ / \ _/ _/ _/ _/ <endcode_example> <note> Dogs can be best friends. <endnote> |
The output for this example will be shown with the output for the CHAPTER tag which is explained in the next section. |
This manual contains numbered headings and the numbers consist of the chapter number + section number + sub-section number (if there is a sub-section). The chapter number is prefixed to the section number because the chapter tag is used and the chapter number is a higher level than section numbers.
3.12 Start a Chapter with the <CHAPTER> Tag
If you are creating a manual, you can denote the beginning of a chapter
by using the <CHAPTER> tag.
When you use the <CHAPTER> tag, you need to give the chapter a
name. The name is enclosed in parenthesis. The format is:
<CHAPTER>(chapter name)
A chapter always starts on a new page. The page number consists of the chapter number plus the page number. Each chapter starts with chapter number plus page 1. For example: 1-1, 2-1, 9-1, etc.
We will add a chapter tag to the SAMPLE_DOC.SDML file.
<comment>(This is the DECdocument sample documentation file) <chapter>(Sample Chapter - Dogs) <head1>(Dog Groups and Breeds) <p> There are many <emphasis>(groups\bold) of dogs. Each group type will perform a different specialized task. One group is used for herding, one is used for hunting, another is used for searching and so on. Within each group, there are numerous <emphasis>(breeds\italic) of dogs. For example, in the hunting group, there are <sample_text> <list>(numbered) <le> Labrador Retrievers <list>(unnumbered) <le> Black in color <le> Chocolate in color <le> Yellow in color <endlist> <le> Golden Retrievers <le> Pointers <le> etc. <endlist> <endsample_text> <p> <head2>(Selecting a Dog) <p> <emphasis>(Before you get a dog), you should consider what type of dog you want and what the dog will be used for. If you just want a family pet, some breeds are better than others. Some breeds tend to bond to only one person while others will bond to all family members. <underline>(Selecting the right breed of dog is very important.) <p> <table> <table_setup>(3\6\12) <table_heads>(Size\Weight\Example) <table_row>(tiny\1-15 lbs\Chihuahua<line>Toy Poodle) <table_row>(small\15-30 lbs\Cocker Spaniel<line>Boston Terrier) <table_row>(medium\30-60 lbs\Irish Setter<line>Collie) <table_row>(large\60-100 lbs\German Shepherd<line>Retrievers) <table_row>(giant\over 100 lbs\Great Dane<line>St. Bernard) <endtable> <line>(indent\4\bigskip) Dogs come in all shapes and sizes. <code_example> D O G | | V @____/\ | ^ | \ |______| / |------------- / \ \ / ------------- / \ / \ _/ _/ _/ _/ <endcode_example> <note> Dogs can be best friends. <endnote> |
You can create a PS, TXT or TERM output file.
The output for this example IS THE NEXT CHAPTER which is titled "Sample Chapter - Dogs". |
You will see how DECdocument creates chapters and assigns section numbers.
There are many groups of dogs. Each group type will perform a different specialized task. One group is used for herding, one is used for hunting, another is used for searching and so on. Within each group, there are numerous breeds of dogs. For example, in the hunting group, there are
4.1.1 Selecting a Dog
Before you get a dog, you should consider what type of dog you
want and what the dog will be used for. If you just want a family pet,
some breeds are better than others. Some breeds tend to bond to only
one person while others will bond to all family members. Selecting
the right breed of dog is very important.
Size | Weight | Example |
---|---|---|
tiny | 1-15 lbs |
Chihuahua
Toy Poodle |
small | 15-30 lbs |
Cocker Spaniel
Boston Terrier |
medium | 30-60 lbs |
Irish Setter
Collie |
large | 60-100 lbs |
German Shepherd
Retrievers |
giant | over 100 lbs |
Great Dane
St. Bernard |
Dogs come in all shapes and sizes.
D O G | | V @____/\ | ^ | \ |______| / |------------- / \ \ / ------------- / \ / \ _/ _/ _/ _/ |
Dogs can be best friends. |
The previous chapters showed how to use some of the DECdocument tags. This chapter will show you what tags to use to format text in specific situations. For example, you might have some text that you want to keep together on one page and do not want DECdocument to split. You will also work with dates, learn how to break pages and reference text.
In this chapter, there will be examples and output so that you can see how DECdocument processes the text. You can practice by trying out the examples.
5.1 Use the <LITERAL> Tag for Angle Brackets
The <LITERAL> tag is used when you want to use the <> angle
brackets in your text. The tags used by DECdocument are words, letters
or phrases enclosed in angle brackets. If DECdocument does not
recognize a tag, an error message is displayed during processing. So,
if you want to use angle brackets in your document, you must use the
<LITERAL> tag. The <LITERAL> tag has these two formats:
<LITERAL>(text)
and
<LITERAL>
text
<ENDLITERAL>
The <P> tag is used to designate a paragraph and/or for spacing in this and other examples in this chapter. |
<p> You must use the LITERAL tag when you use <literal>(<angle brackets>). |
You must use the LITERAL tag when you use <angle brackets>.
5.2 Use the <BACKSLASH> Tag for Special Purposes
Some of the DECdocument tags use the backslash "\" to separate
arguments. For this reason, there are times when the backslash cannot
be used in its normal form and you must use the <BACKSLASH> tag.
When you use the <BACKSLASH> tag, an actual "\" will be put into the output file.
Here is an example where you must use the <BACKSLASH> tag instead of an actual "\".
<p> Press the <backslash> key when you want to back up. |
Press the \ key when you want to back up.
Depending on the actual text and usage, the "\" backslash can also be placed within a <LITERAL> tag.
5.3 Keep Text Together with the <KEEP> Tag
There are times when you want to keep some text together. For example,
you might have the name, Tom Jones, in your document. You don't want
Tom to be printed on one line and Jones printed on the next line. To
prevent this from happening, you can use the <KEEP> tag. The
format is:
<KEEP>(text)
Here is how you can use the <KEEP> tag.
<p> There have been many, many presidents living in the <keep>(White House) in <keep>(Washington D.C.) and <keep>(Teddy Roosevelt) was one of them. |
There have been many presidents living in the White House in Washington D.C. and Teddy Roosevelt was one of them.
KEEP is also used as an argument to some of the other tags. If, for example, you had some text set within <CODE_EXAMPLE>, <ENDCODE_EXAMPLE> tags and you did not want the text printed on two pages, you could use KEEP as an argument. Here is how it would be used:
<code_example>(keep) ...block of text... <endcode_example> |
If you want your documentation to contain the current system date, you
can use the <DATE> tag. This tag also allows you to supply the
date or it can supply a full date which includes the time. The
date formats are:
<DATE>
<DATE>(FULL)
<DATE>(date text)
<p> The current system date is <date>. <p> The full current system date is <date>(full). <p> Date text to use is <date>(January 1, 1995). |
The current system date is April 15, 1997.
The full current system date is 15-APR-1997 14:08:51.73.
Date text to use is January 1, 1995.
5.5 The Parenthesis <OPAREN>, <CPAREN> Tags
In most cases, the parentheses () can be used to enclose text. However,
when the parentheses are within an argument to a tag, the
<OPAREN> and <CPAREN> tags must be used. The following
example will show when to use these tags. You can also use each of the
tags separately. The formats are:
<OPAREN>
<CPAREN>
<p> This text and the parentheses, (text to underline), will be underlined. <p> This text and the parentheses, <underline>(<oparen>text to underline<cparen>), are now underlined. |
This text and the parentheses, (text to underline), will be underlined.
This text and the parentheses, (text to underline), are now underlined.
5.6 Enclosing a Character in Parentheses using the <PARENDCHAR> Tag
You can optionally include a character in parentheses using the
<PARENDCHAR> tag. Using this tag results in better spacing of the
character between the parentheses. The format is:
<PARENDCHAR>(character)
<p> Using the PARENDCHAR tag allows this character, (%), in parentheses to have more space so it appears as <PARENDCHAR>(%). |
Using the PARENDCHAR tag allows this character, (%), in parentheses to have more space so it appears as (%).
Previous | Next | Contents | Index |