DECdocument
Producing Online and
Printed Documentation


Previous Contents Index

2.3 Basic Text Elements

When you create an SDML file, you use some common tags to divide your text into basic text elements. If you are writing for both printed and Bookreader display, you need to use some Bookreader formatting tags also. This section explains how to use the common global tags when creating a new SDML file, and the next section explains how to use the common Bookreader formatting tags.

2.3.1 Chapters

Use the <CHAPTER> tag to identify the start of a new chapter and to provide its title. If your source file contains a chapter in a book, place the <CHAPTER> tag first in the file because it enables all cross-references within that file. The <CHAPTER> tag takes two arguments:

An example of the beginning of a chapter follows:

Example


    <CHAPTER>(Introduction to DECdocument\intro_chap) 

In this example, the chapter tag has two arguments: the chapter title and the symbol name. The first chapter tag in a book automatically receives the chapter number 1, and each following chapter is increased by one.

You should only put one chapter in a source file. Then, you can process all the files together in one bookbuild. If you need to change the order of the chapter, you can alter the profile file.¹

Use the <SET_CHAPTER_NUMBER> tag to override the default chapter number. For example:

Example


 
    <SET_CHAPTER_NUMBER>(13) 
    <CHAPTER>(Supported Devices\sup_dev_chap) 
    <p> 
    The primary supported devices... 
 

In this example, the chapter number is set to 13. This causes any subsequent chapters to be numbered beginning with number 14, unless you use another <SET_CHAPTER_NUMBER> tag to reset the current chapter number.

2.3.2 Headings and Subheadings

Headings are used to label a section of text. DECdocument automatically numbers all headings during processing. The output differs according to which doctype you use. DECdocument counts each heading level and numbers each heading within a level. The headings appear in the table of contents.

Label a first-level heading with the tag <HEAD1>, a second-level heading with the tag <HEAD2>, and so on. Most doctypes support up to six heading levels; check the specific doctype for the exact number you can use.

If your document has a <CHAPTER> tag, the chapter number is included in the heading level number. In the following example, the chapter is number 2, so the <HEAD2> tag of this section is 2.1.1. If you do not use the <CHAPTER> tag, DECdocument uses only the heading level number.

Example


    <CHAPTER>(Comprehensive Study of the United States\study_sym)
    <HEAD1>(Alaska\alaska_sym)
    <HEAD2>(Physical Features\physical_sym)
    <P>Alaska consists of a compact central mass ...
    <HEAD2>(Geological Features\geological_sym)
    <P>The main features are mountains ...
    <HEAD2>(Geographical Features\geographical_sym)
    <P>Between the Pacific and Rocky Mountain systems ...

Use the <SUBHEADN> tag to create unnumbered subsidiary headings where n is either 1 or 2. Subheadings are not numbered and do not appear in the table of contents.

Example


    <SUBHEAD2>(Using a Subhead\subheads_sym) 
    <P>Use subheads only when the clarity 
    of your exposition absolutely requires them. 

Output

Using a Subhead

Use subheads only when the clarity of your exposition absolutely requires them.

Note

Using symbol names for headings and subheadings allows you to cross-reference them. You must use symbol names for all tags that accept symbol names when you process a book for Bookreader display. See Chapter 4 for more information on using symbol names.

2.3.3 Paragraphs

A paragraph is labeled with the <P> tag. You do not have to leave blank lines before or after the paragraph because spacing, line justification,¹ and paragraph indentation are provided by the specified doctype. However, you might want to leave blank lines or spaces in your source files to make them easier to read.

The following example shows the <P> tag in a doctype that leaves a blank line between paragraphs, with no indentation.

Example


    <P>The species is the basic unit of classification.  Clearly, 
    not all species resemble each other to the same degree or 
    are closely related.  <P>In any careful study, 
    one of the vital early steps is the organization and naming of objects. 

Output

The species is the basic unit of classification. Clearly, not all species resemble each other to the same degree or are closely related.

In any careful study, one of the vital early steps is the organization and naming of objects.

Note that DECdocument formats the paragraphs correctly no matter how you break the source file across lines, and it ignores extra spaces in your source file.

If you want a paragraph enclosed in parentheses, place a space or an end of line between the <P> tag and the parenthetical text, or use the <OPAREN> and <CPAREN> tags.

Example


 
    The species is the basic unit of classification. 
    <p> <OPAREN>Clearly, not all species resemble each other to 
    the same degree or are closely related.<CPAREN> 

Output

The species is the basic unit of classification.

(Clearly, not all species resemble each other to the same degree or are closely related.)

2.3.4 Lists

Table 2-2 describes the different types of lists.

(5)
Table 2-2 Types of Lists
List Type List Element Identifier Examples
Alphabetic Letters A, B, C, or a, b, c
Callout Reverse-print callout numbers
Numbered Arabic numerals 1, 2, 3
Roman Roman numerals I, II, III
Stacked None
  • one
  • two
  • three
Simple None
one
two
three
Unnumbered Special characters
(for example, bullets)
  • one
  • two
  • three

Use the following tags to create a list:

The following example shows how to use the <LIST> and related tags to create an unnumbered list.

Example


    <P>The works of the most influential dramatists of 
    the nineteenth century are still performed today: 
    <LIST>(UNNUMBERED)
    <LE>Anton Chekhov 
    <LE>Alexandre Dumas 
    <LE>Henrik Ibsen 
    <LE>T. W. Robertson 
    <LE>George Bernard Shaw 
    <LE>August Strindberg 
    <LE>Oscar Wilde 
    <ENDLIST>

Output

The works of the most influential dramatists of the nineteenth century are still performed today:

You can create nested lists, which are lists embedded within other lists. You can nest any number of lists. The following example shows how to code a nested list.

Example


 
    <list>(NUMBERED) 
    <le>Review doc plan. 
    <le>Find out these numbers: 
         <list>(UNNUMBERED) 
         <le>LPN 
         <le>DPN 
         <le>order number 
         <endlist> 
    <le>For revisions of books not already in the library, have 
    the production group or the writer rename the file 
    according to its new LPN. 
    <endlist> 
 

Output

  1. Review doc plan.
  2. Find out these numbers:
  3. For revisions of books not already in the library, have the production group or the writer rename the file according to its new LPN.

    Note

    ¹ See Section 9.6 for more information on the profile file and bookbuilding.

    ¹ Line justification refers to line alignment with the margins.

    2.4 Controlling the Output of a Document

    DECdocument provides four tags to allow you to control the output of your document: <PAGE>, <LINE>, <KEEP>, and <FINAL_CLEANUP>. Keep in mind, however, that DECdocument is a text formatter, and using these special tags to enforce a particular format could produce undesirable results.

    2.4.1 Starting New Pages

    Use the <PAGE> tag to force the text following the tag to begin on a new page. In the following example, "Section One" would begin on a new page because the <PAGE> tag is coded directly before the Section One heading:

    Example


        <HEAD1>(Introduction\intro_symbol) 
        .
        .
        .
        <PAGE>
        <HEAD1>(Section One\one_symbol) 
        .
        .
        .
    

    The <PAGE> tag is disabled for Bookreader output. You do not need to remove it from source files; its presence has no effect for Bookreader display.

    2.4.2 Starting New Lines

    Use the <LINE> tag to force the text following this tag to begin on a new line of output.

    Example


        <P>
        Code your file like this to break 
        the line before the word <LINE>green.  
        The next line will begin with 
        the word green. 
    

    Output

    Code your file like this to break the line before the word
    green. The next line will begin with the word green.

    For a Bookreader book, use the <LINE> tag carefully and only as documented in the Using Global Tags. Be sure you actually want a line break in all formatting cases. Do not use the <LINE> tag simply because you do not like the way a line breaks on the printed output.

    2.4.3 Keeping a Text String on One Line

    Use the <KEEP> tag to force a string of text to stay together on the same line of output.

    The following example keeps the entire directory name together as one word, without hyphenating it.

    Example


        <P>
        This example keeps <KEEP>([ANDERSON.PUBLIC]BOOKNAME.SDML) 
        together on one line. 
    

    Output

    This example keeps [ANDERSON.PUBLIC]BOOKNAME.SDML together on one line.

    2.4.4 Specifying Final Formatting

    Use the <FINAL_CLEANUP> tag to provide explicit formatting instructions to the text formatter to be used for final formatting and cleanup. This tag has four arguments that specify different instructions:

    See Using Global Tags for more information on the <FINAL_CLEANUP> tag.

    The <FINAL_CLEANUP> tag is disabled for Bookreader output. You do not have to remove it from source files; its presence has no effect for Bookreader display.

    2.5 Other Features

    This section describes some useful features of DECdocument such as emphasizing text, using footnotes, using change bars, coding hyphens and dashes in text, and using the part tag. Note that certain restrictions may apply when you use these tags for Bookreader display.

    2.5.1 Emphasizing Words and Phrases

    You can emphasize text in many ways for both printed and Bookreader display. Some emphasis tags specify the reason for the emphasis. For example, the <NEWTERM> tag emphasizes a word or phrase defined and used for the first time.

    Other tags specify the formatting effects in the output rather than the reason for emphasis. For example, the <EMPHASIS> tag is used to print text in bold or italic type.

    Descriptions of each of the emphasis tags follows:

    Table 2-3 shows each of the tags (except <NOTE>) used in text.

    Table 2-3 Examples of Emphasis Tags
    Coding Output&185;
    <EMPHASIS>(abc def) abc def
    <EMPHASIS>(abc def\BOLD) abc def
    <EMPHASIS>(abc def\SMALLCAPS) ABC DEF
    <EMPHASIS>(abc def\SMALL_BOLDCAPS) ABC DEF
    <GREF>(abc def) abc def
    <KEYWORD>(abc def) abc def
    <NEWTERM>(abc def) abc def
    <UNDERLINE>(abc def) abc def
    <VARIABLE>(abc def) abc def


    ¹The output of the samples in this table depends on the doctype and printer used. For example, the <NEWTERM> tag outputs bold for books displayed by Bookreader, but outputs italics for printed books.

    If you want the punctuation following a bold or italic font to be displayed in the same font, include the punctuation as part of the argument.

    Online Highlighting of Extensions to Standards

    To highlight extensions to language standards or other information, use the <EXTENSION> tag. This tag affects only Bookreader display; it has no effect in printed output. For books displayed by Bookreader, the <EXTENSION> tag displays the specified text as slightly shaded; the shading can be turned off through the View menu on the Bookreader topic window. There are two ways to specify extension text:

    2.5.2 Using Footnotes in Text, Headings, and Tables

    You can create footnote references in text, headings, and tables in both printed and Bookreader documents.

    Footnotes appear at the bottom of a printed page, and appear as hotspots that can be popped up in a Bookreader book. You can control what character DECdocument displays as the footnote character. It can be a number or one of the following symbols:

    2.5.2.1 Using Footnotes in Text

    To create a footnote that refers to a specific piece of text, place the <FOOTNOTE> tag directly after the text to be footnoted. Use one of the footnote characters as the first argument and include the text as the second argument to the tag, as shown.

    Example


        <P>
        Popular alternative rock<FOOTNOTE>(1\A form of music 
        that originated from punk rock.) groups include 
        the Sugarcubes, Siouxie and the Banshees, John Lydon, 
        and Anne Clark. 
    

    Output

    Popular alternative rock¹ groups include the Sugarcubes, Siouxie and the Banshees, John Lydon, and Anne Clark.

    To refer to a previously defined footnote, use the <FOOTREF> tag. The argument of the <FOOTREF> tag should be the character of the footnote that you want to refer to. The <FOOTREF> tag always refers to the most recent occurrence of the <FOOTNOTE> tag that uses the same argument character. For example:

    Example


     
        <p> 
        The Sharkey Music Company<footnote>(TM\Trademark of the 
        Sharkey Music Company) has signed a variety of artists, 
        including classical, jazz, and modern dance. 
        <p> 
        Laurie Anderson was the founder of the Sharkey Music 
        Company <footref>(TM). 
     
    

    Output

    The Sharkey Music Companytm has signed a variety of artists, including classical, jazz, and modern dance.

    Laurie Anderson was the founder of the Sharkey Music Company tm.

    2.5.2.2 Using Footnotes in Headings

    To footnote information in a heading, use a combination of two tags: <FOOTREF> and <FOOTNOTE_TEXT>. Use the <FOOTREF> tag in the argument to the heading to refer to the <FOOTNOTE_TEXT> tag. Place the <FOOTNOTE_TEXT> tag on the line directly following the <HEADN> tag.

    Example


     
        <HEAD1>(Rain Forest Preservation Company<FOOTREF>(R)) 
        <FOOTNOTE_TEXT>(R\Trademark of Rain Forest Preservation 
        Company) 
        <P> 
        The tropical rain forests of the world... 
     
    

    Note

    You can use only one <FOOTREF> tag per heading; otherwise, your online bookbuild will fail.

    Supply multiple arguments to the <FOOTREF> tag to create a footnote that has more than one definition. When you supply multiple arguments to the <FOOTREF> tag, the definitions from the <FOOTNOTE_TEXT> tag will appear in the same order as the <FOOTREF> tag arguments. For example:

    Example


        <HEAD1>(Using Postscript<FOOTREF>(R\1) Printers) 
        <FOOTNOTE_TEXT>(R\Postscript<SPECIAL_CHAR>(registered_symbol) 
        is a registered trademark of Adobe Systems, Incorporated.) 
        <FOOTNOTE_TEXT>(1\For more information about Digital's printers...) 
    

    Note that in order to define one of the special characters as the second argument to the <FOOTNOTE_TEXT> tag, you need to use the <SPECIAL_CHAR> tag along with the argument corresponding to the character you want. See Using Global Tags for more information on the <SPECIAL_CHAR> tag.

    Note

    ¹ A form of music that originated from punk rock.

    tm Trademark of the Sharkey Music Company


    Previous Next Contents Index