DECdocument
DECdocument
Tutorial and
Application Guide


Previous Contents Index


Chapter 6
Tags that Center Text

DECdocument determines how the SDML file text will be placed on a page or pages. Depending on the doctype, a certain amount of space is allowed on each of the four sides and the text is left-justified unless a format tag specifies that the text should be indented.

There are times when you might want to center a heading or some text. DECdocument has two tags that you can use to center text. This chapter will describe these tags and show how they can be used.

6.1 Center a Heading with the <CHEAD> Tag

If you want to center a heading, you can use the <CHEAD> tag. This tag creates an unnumbered, centered heading within the current margins. Here is the format:

<CHEAD>(heading text)

6.2 Center Text with the <CENTER_LINE> Tag

You can center a line of text by using the <CENTER_LINE> tag. This tag creates a line of text centered within the current margins. The format is:

<CENTER_LINE>(text)

6.3 Example of Centering Text

The centering tags can be used anywhere in an SDML file. Here is an example where they are used on a flyer. This example uses the centering tags and some of the other tags that you have learned. This sample text file is called SAMPLE_FLYER.SDML.


 
<chead>(The RISTORANTE Presents the) 
<p> 
<chead>(<emphasis>(Annual Hats and Chaps Christmas Party)) 
<p> 
<chead>(Lets Eat, Drink and be Merry!) 
<p> 
<chead>(<literal>(T  H  E  ---  P  R  O  G  R  A  M)) 
<p> 
<p> 
 
<center_line>(<emphasis>(Appetizers:\bold)  Antipasto Classico, Clams Oreganato, Funghi) 
<center_line>(Imbottito, Garlic Focaccia) 
<p> 
<center_line>(Games and Prizes) 
<p> 
<center_line>(***********************************) 
<p> 
<center_line>(Soup and Salad) 
<p> 
<chead>(<emphasis>(ENTREE SELECTIONS:)) 
 
<table> 
<table_setup>(2\8) 
<table_row>(<emphasis>(VEAL:\bold) \Vitello Piccata (Medallions of veal 
        simmered in white wine, butter, mushrooms, capers and a hint of lemon)) 
<table_row>( \Scaloppine alla Marsala (Veal sauted with mushrooms and a 
        Marsal demi-glace)) 
<endtable> 
 
<table> 
<table_setup>(2\8) 
<table_row>(<emphasis>(SEAFOOD:\bold)\Scampi Fra Diavolo (Jumbo shrimp 
        simmered in a spicy tomato and pepper sauce)) 
<table_row>( \Scampi Medio Evo (Jumbo shrimp sauteed in garlic, butter 
        and white wine sauce)) 
<table_row>( \Tirrenia (Filet of Fish simmered in white wine w/garlic, 
        oregano and parmesan cheese)) 
<table_row>( \Imbottito con Branchio (Filet of fish stuffed w/rich crabmeat 
        blend and spinach then crowned with a cheese sauce)) 
<endtable> 
 
<p> 
                   
<chead>(<emphasis>(Prize) for the Most Festive Attire) 
<p> 
<chead>(White Elephant Gift Exchange) 
<p> 
<p> 
 
<chead>(<emphasis>(DESSERT:) Your choice of scrumptous dessert from 
        the dessert tray) 
 

Command

You can create a PS, TXT or TERM output file.

Output

The printed flyer will appear as shown on the following page.

The RISTORANTE Presents the

Annual Hats and Chaps Christmas Party

Lets Eat, Drink and be Merry!

T H E --- P R O G R A M

Appetizers: Antipasto Classico, Clams Oreganato, Funghi
Imbottito, Garlic Focaccia

Games and Prizes

***********************************

Soup and Salad

ENTREE SELECTIONS:

VEAL: Vitello Piccata (Medallions of veal simmered in white wine, butter, mushrooms, capers and a hint of lemon)
Scaloppine alla Marsala (Veal sauted with mushrooms and a Marsal demi-glace)
SEAFOOD: Scampi Fra Diavolo (Jumbo shrimp simmered in a spicy tomato and pepper sauce)
Scampi Medio Evo (Jumbo shrimp sauteed in garlic, butter and white wine sauce)
Tirrenia (Filet of Fish simmered in white wine w/garlic, oregano and parmesan cheese)
Imbottito con Branchio (Filet of fish stuffed w/rich crabmeat blend and spinach then crowned with a cheese sauce)

Prize for the Most Festive Attire

White Elephant Gift Exchange

DESSERT: Your choice of scrumptous dessert from the dessert tray


Chapter 7
Creating a Manual

So far you have become acquainted with many of the often used DECdocument tags. The tags described in the previous chapters showed how to format text. There are other tags that are used in the creation of manuals, articles, reports, letters and other types of documents. This chapter will show you how to create a manual. It will describe the parts of a manual and the tags that are used in the different parts.

7.1 Parts of a manual

Basically there are four main parts to a manual. These parts are:
  1. Front
  2. Body
  3. Appendix
  4. Index

Manuals can contain all or some of these parts and they can also contain other parts such as a glossary. A manual's contents depends on its purpose. The example in this chapter will contain only the four main parts.

Some of the manual parts consist of elements or sections. Here is a further breakdown of the main parts:

  1. Front - referred to as Front Matter
    • Title page
    • Copyright page
    • Table of contents
    • Preface
  2. Body
    • 1 or more chapters
  3. Appendix
    • 1 or more appendix sections
  4. Index
    • 1 or more index entries

The following sections will describe the DECdocument tags that are used in each of the main parts and elements.

7.2 Front Matter

The front matter consists of these elements:

Before you can work with the front matter elements, you need to identify the front part. There are two tags that are used. These tags are:

<FRONT_MATTER>

<ENDFRONT_MATTER>

All of the front matter elements will be placed inside of these two tags.

As we go along, we will build the SAMPLE_MANUAL.SDML file. At the end of this chapter, we will have created a complete manual SDML file.

To begin, the SAMPLE_MANUAL.SDML file will contain the front matter tags.

Example


<front_matter>
 
<endfront_matter>

7.2.1 Title Page

The first page of a manual is the title page. The title page will consist of the manual title and a comment or comments about the document. There are other items that can be included on this page but we will only use these two in our example.

The tags that identify the title and title page are:

<TITLE_PAGE>

<TITLE>(title text)

<ENDTITLE_PAGE>

The title can be one to three lines. The text is separated by a "\" backslash. For example:

<TITLE>(This is Our\Sample Manual)

The abstract tags that identify the document comments are:

<ABSTRACT>

document comments text

<ENDABSTRACT>

The abstract tags follow the <TITLE> tag.

We will add these tags and some text to the SAMPLE_MANUAL.SDML file.

When you create an SDML file that contains many lines of text, such as for a manual, it is helpful to put in comments to identify some of the parts and elements. As we go along, we will add some comment lines. We will also put in some blank lines so it is easier to read the tags.

Example


<front_matter> 
 
<title_page>
 
<comment>(*****************************************************)
<comment>(******  I n s e r t  T i t l e  h e r e     *********)
<comment>(*****************************************************)
<title>(This is Our\Sample Manual)
 
<abstract>
This document shows the parts and elements of a manual.
<endabstract>
 
<endtitle_page>
 
<endfront_matter> 

7.2.2 Copyright Page

The second page of a manual is the copyright page. The copyright page can contain a print date and copyright and notice information. The copyright page is not required.

The tags that identify the copyright page are:

<COPYRIGHT_PAGE>

<ENDCOPYRIGHT_PAGE>

The other tags that we are going to use are for the print date and the copyright date. These tags are:

<PRINT_DATE>(date text)

<COPYRIGHT_DATE>(date text)

The <PRINT_DATE> tag is used for the document print date and the <COPYRIGHT_DATE> tag is used for the copyright date.

We are only going to put in a few lines for the copyright page so you can see how the dates will be formatted.

Example


 
<front_matter> 
 
<title_page> 
 
<comment>(*****************************************************) 
<comment>(******  I n s e r t  T i t l e  h e r e     *********) 
<comment>(*****************************************************) 
<title>(This is Our\Sample Manual) 
 
<abstract> 
This document shows the parts and elements of a manual. 
<endabstract> 
 
<endtitle_page> 
 
 
<copyright_page>
<print_date>(January 1995)
<p>
This is the copyright page for the sample manual.
<p>
<copyright_date>(1995 ABC Company, Inc.)
<endcopyright_page>
 
<endfront_matter> 

7.2.3 Table of Contents

The third element in the front matter section is the table of contents. There is one tag that you use to tell DECdocument that you want a table of contents in your manual. This tag is:

<CONTENTS_FILE>

When DECdocument processes the SDML file, it will create a table of contents and place it here.

Example


 
<front_matter> 
 
<title_page> 
 
<comment>(*****************************************************) 
<comment>(******  I n s e r t  T i t l e  h e r e     *********) 
<comment>(*****************************************************) 
<title>(This is Our\Sample Manual) 
 
<abstract> 
This document shows the parts and elements of a manual. 
<endabstract> 
 
<endtitle_page> 
 
<copyright_page> 
<print_date>(January 1995) 
<p> 
This is the copyright page for the sample manual. 
<p> 
<copyright_date>(1995 ABC Company, Inc.) 
<endcopyright_page> 
 
 
<comment>(***** The table of contents prints here ****)
<contents_file>
 
<endfront_matter> 

7.2.4 Preface

The last element in the front matter section is the preface. The preface provides some information about the document. This information might include the purpose of the document, intended audience, goals, etc.

The tags that identify the preface are:

<PREFACE>(page number)

<ENDPREFACE>

The <PREFACE> tag gives the page number that the preface starts on. The preface starts on an odd numbered page. Since you don't know how many pages the table of contents will take up, you guess at this number and correct it later if necessary.

We will write a small preface for the sample manual.

Example


 
<front_matter> 
 
<title_page> 
 
<comment>(*****************************************************) 
<comment>(******  I n s e r t  T i t l e  h e r e     *********) 
<comment>(*****************************************************) 
<title>(This is Our\Sample Manual) 
 
<abstract> 
This document shows the parts and elements of a manual. 
<endabstract> 
 
<endtitle_page> 
 
<copyright_page> 
<print_date>(January 1995) 
<p> 
This is the copyright page for the sample manual. 
<p> 
<copyright_date>(1995 ABC Company, Inc.) 
<endcopyright_page> 
 
<comment>(***** The table of contents prints here ****) 
<contents_file> 
 
 
<comment>(*****************************************************)
<comment>(******  S t a r t   P r e f a c e    h e r e  *******)
<comment>(*****************************************************)
<preface>(7)       <comment>( be sure to check page number     )
<p>
 
<head>(Purpose)
<p>
The purpose of this document is to show what parts a manual contains.
<p>
 
<head>(Intended Audience)
<p>
This document is intended for new users who are learning how to use
DECdocument.
 
<endpreface>
 
<endfront_matter> 

7.2.5 Comments

There are many variations of the front matter elements and there are other tags that can be included. There are also arguments to some of the tags. What tags you want to use depends on how you want your manual to look and what you want it to contain. The Producing Online and Printed Documentation manual provides more detailed information on front matter elements.

7.3 Body of the Manual

The main part of a manual is the body. The body consists of one or more chapters. The chapters can contain paragraphs of text, tables, lists, examples, etc. You can have as many chapters as you want to include. In Section 3.12, you used the <CHAPTER> tag to create a chapter.

We will add some chapter text to the SAMPLE_MANUAL.SDML for the body.

Example


 
<front_matter> 
 
<title_page> 
 
<comment>(*****************************************************) 
<comment>(******  I n s e r t  T i t l e  h e r e     *********) 
<comment>(*****************************************************) 
<title>(This is Our\Sample Manual) 
 
<abstract> 
This document shows the parts and elements of a manual. 
<endabstract> 
 
<endtitle_page> 
 
<copyright_page> 
<print_date>(January 1995) 
<p> 
This is the copyright page for the sample manual. 
<p> 
<copyright_date>(1995 ABC Company, Inc.) 
<endcopyright_page> 
 
<comment>(***** The table of contents prints here ****) 
<contents_file> 
 
<comment>(*****************************************************) 
<comment>(******  S t a r t   P r e f a c e    h e r e  *******) 
<comment>(*****************************************************) 
<preface>(7)       <comment>( be sure to check page number     ) 
<p> 
 
<head>(Purpose) 
<p> 
The purpose of this document is to show what parts a manual contains. 
<p> 
 
<head>(Intended Audience) 
<p> 
This document is intended for new users who are learning how to use 
DECdocument. 
 
<endpreface> 
 
<endfront_matter> 
 
 
<comment>(*****************************************************)
<comment>(******  S t a r t   c h a p t e r s   h e r e  ******)
<comment>(*****************************************************)
 
<chapter>(Body of a Manual)
<p>
The main part of a manual is the body.  The body consists of one or more
chapters.  The chapters can contain paragraphs of text, tables, lists,
examples, etc.  You can have as many chapters as you want to include.
 
....... Note:  we will put the dogs chapter in here later ........
 

7.4 Appendix

The appendix section consists of one or more appendices. An appendix is very much like a chapter in that it can contain paragraph text, lists, tables, examples, etc.

When DECdocument processes appendices, it assigns a letter to each appendix. So you will have Appendix A, Appendix B, Appendix C, etc.

The tags that are used for an appendix are:

<APPENDIX>(appendix name)

<ENDAPPENDIX>

You give an appendix a name just like a chapter. The name is in parentheses and follows the <APPENDIX> tag. An appendix has an <ENDAPPENDIX> tag and a chapter does NOT have an "end" tag.

We will add an appendix to our SDML file.

Example


 
<front_matter> 
 
<title_page> 
 
<comment>(*****************************************************) 
<comment>(******  I n s e r t  T i t l e  h e r e     *********) 
<comment>(*****************************************************) 
<title>(This is Our\Sample Manual) 
 
<abstract> 
This document shows the parts and elements of a manual. 
<endabstract> 
 
<endtitle_page> 
 
<copyright_page> 
<print_date>(January 1995) 
<p> 
This is the copyright page for the sample manual. 
<p> 
<copyright_date>(1995 ABC Company, Inc.) 
<endcopyright_page> 
 
<comment>(***** The table of contents prints here ****) 
<contents_file> 
 
<comment>(*****************************************************) 
<comment>(******  S t a r t   P r e f a c e    h e r e  *******) 
<comment>(*****************************************************) 
<preface>(7)       <comment>( be sure to check page number     ) 
<p> 
 
<head>(Purpose) 
<p> 
The purpose of this document is to show what parts a manual contains. 
<p> 
 
<head>(Intended Audience) 
<p> 
This document is intended for new users who are learning how to use 
DECdocument. 
 
<endpreface> 
 
<endfront_matter> 
 
<comment>(*****************************************************) 
<comment>(******  S t a r t   c h a p t e r s   h e r e  ******) 
<comment>(*****************************************************) 
 
<chapter>(Body of a Manual) 
<p> 
The main part of a manual is the body.  The body consists of one or more 
chapters.  The chapters can contain paragraphs of text, tables, lists, 
examples, etc.  You can have as many chapters as you want to include. 
 
....... Note:  we will put the dogs chapter in here later ........ 
 
 
<comment>(*****************************************************)
<comment>(******  S t a r t   a p p e n d i x   h e r e  ******)
<comment>(*****************************************************)
 
<appendix>(User Notes)
<p>
This page can be used for notes.
<endappendix>
 

7.5 Index

An index section provides information on where different topics are located in the manual. The index section consists of one or more index entries. An index entry gives the page location of a specific topic. You can create index entries as you are writing text to your SDML file or add them after you have completed your SDML file.

Index entries are created by using the <X> tag followed by text. The format is:

<X>(text)

Here are some index entries:

<x>(Doctype)
<x>(Destination)
<x>(Note tag)

When DECdocument processes the SDML file, an index is created and placed at the end of the document. The index is in alphabetical order. When the PS, TXT or TERM file is printed or displayed, the index entries will appear similar to these:

Destination, 1-2, 1-3
Doctype, 1-1
Note tag, 3-26

If you would want information on these topics, you can refer to the pages listed.

Index Sub-entry

There are several variations of index entries. One of these is the index sub-entry. When it is printed out, there is a main index entry and entries under the main entry. It appears like this:

Dog types
Beagle, 2-2
Poodle, 3-1, 3-2
Weiner Dog, 4-6

To create these types of index entries, you use the <X> and <XSUBENTRY> tags. Here are the index entries that create the above items:

<x>(Dog types<xsubentry>Beagle)
<x>(Dog types<xsubentry>Poodle)
<x>(Dog types<xsubentry>Weiner Dog)

There could also be an index entry for "Dog types" (i.e. <x>(Dog types)). If there were, the location page numbers would follow the entry.

Informational Index Entry

If you want to make some informational index entries, you can use the <Y> tag with the <XSUBENTRY> tag. This will create index entries which have NO page numbers. Here is an example of this usage:

<y>(Types of dogs<xsubentry>See Dog types)

The informational index entry appears as:

Types of dogs
See Dog types


Previous Next Contents Index