DECdocument
Producing Online and
Printed Documentation


Previous Contents Index


Chapter 12
Diagnosing Errors in a Bookreader Book

This chapter lists common problems you may encounter when building a Bookreader book.

Problem:

There are topics that require scrolling too many times.

Action:

Consider breaking long portions of information into shorter topics by using more <HEADN> tags or using the <SET_ONLINE_TOPIC> tag. See Section 2.6.2 for more information on using the <SET_ONLINE_TOPIC> tag.

Problem:

The informal tables, figures, and examples are not easy to view.

Action:

Make the informal tables, figures, and examples into formal tables, figure, and examples, which are automatically made into popups. Or use the <ONLINE_POPUP> tag to make the informal tables, figures, and examples popups without making them formal. See Section 3.4 for more information on using the <ONLINE_POPUP> tag.

Problem:

Each cross-reference is not a hotspot.

Action:

If a cross-reference is hard coded, use the <REFERENCE> tag and make sure that what you want to reference has a symbol name assigned to it. See Chapter 4 for more information on using symbol names and cross-referencing.

Problem:

The hotspot box only contains part of the actual reference text. In the following example, "1--1" is highlighted, but you may have wanted "Figure 1--1" highlighted:

The automobile was invented by German Karl Benz, who designed the first internal-combustion car, the Benz, a three-wheeler, (See Figure [1-1] in 1885.)

Action:

Check to make sure that you did not use the \VALUE qualifier to the <REFERENCE> tag. A hotspot is only created around the actual contents of the <REFERENCE> tag. See Section 4.3 for more information on how to refer to symbol names.

Problem:

The correct figures are not displayed.

Action:

Make sure that you have included the correct figure file in the <FIGURE_FILE> tag. See Section 3.2.5 for more information on including graphics in your document.

Problem:

The entire index is not accessible. Certain topics cannot be accessed from index entries.

Action:

Make sure that you have placed index entries in the proper places according to the rules in Chapter 5.

Problem:

You are getting LMF warning messages when you build your book.

Action:

Check to see that you coded the proper LMF information in the correct order in the front matter, as shown in Section 6.3.1. Or, if you are not using the LMF tags, disregard the warning messages.

Problem:

You build a printed book fine, but the Bookreader book produces the following error:


    DVC-E-PAGECOORDLOST, PAGE COORDINATION LOST, TeXpage = 1, ChunkID = 2 

Action:

Check to see that there are no extraneous characters preceding the <PROFILE> tag in the profile file. These extra characters will usually appear on the title page for a printed book, but will cause the bookbuild to abort for a Bookreader book.

Problem:

When you try to open a book in Bookreader, nothing appears; the process seems to go into an endless compute-intensive loop.

Action:

Ensure that the correct LMF tags have been coded with the correct licenses. Make sure at least one of the licenses specified in the <LMF_PRODUCT> or <LMF_ALTNAME> tags is installed. See Section 6.3.1 for more information on LMF and the related tags.

Problem:

Your book is not building because you get the following error:


    TEX-E-NOROOM, Exceeded memory capacity: 

Action:

DECdocument has run out of memory. Check to see whether you have long lists, tables, or examples. If you do, insert several <ONLINE_CHUNK> tags as documented in Section 2.6.1.

Problem:

Your figures do not appear in Bookreader.

Action:

Make sure that you have properly coded the <FIGURE_FILE> tags, and have included a filename.BRF file as the online figure. See Section 3.2.2 for more information on properly coding online figures.

Problem:

You get the following error when building a Bookreader book:


    %DVC-E-UNDEFSYM, Undefined symbol on TEX page 5 symbol = intro_sym 

Action:

Ensure that all online popups are coded correctly, and that they are not empty. See Section 3.4 for more information on online popups.

Problem:

No text follows the first heading in each chapter in your Bookreader book.

Action:

Add a paragraph of text directly following the <CHAPTER> tag.

Problem:

You renamed your book and you now get an error when trying to read it through Bookreader.

Action:

You must rename both the book.DECW$BOOK file and the book.DECW$BOOKSHELF file besides renaming the book cited within the book.DECW$BOOKSHELF file. Use the ONLINE_BOOKSHELF doctype to create a new library bookshelf file with the correct book name.


Part 4
Practical Exercises

This part contains exercises to teach you how to build a sample booklet for both printed and Bookreader display. The sample booklet has already been created. Copy the source files from the specified directory on the system, and then build the booklet using DECdocument. You can also copy the already built booklet from the specified directory on the system.


Chapter 13
Practical Exercises

Most books contain many chapters. When you use DECdocument to create a book, you usually create a separate SDML file for each chapter. When you finish writing the book, you process all the SDML files together. DECdocument automates file processing by using a special file called a profile, which acts as the center of control for all the SDML files in a book.

A profile is a file that lists the names, the location, and the sequence of the files that make up a single book. Every book has a unique profile.

The following exercises help you create a profile that consists of three files: a front matter file and two chapter files. One of the chapters contains three figure files. Copy all the source files from the kit, and then process the profile twice: once to create a printed version of the booklet, and once to create a Bookreader version of the booklet.

13.1 EXERCISE_CHAP1.SDML

Example 13-1 is the SDML source file for EXERCISE_CHAP1.SDML. Enter the following line to copy EXERCISE_CHAP1.SDML into your current working directory:


    $ COPY DOC$ROOT:[EXAMPLES]EXERCISE_CHAP1.SDML */LOG 

Example 13-1 EXERCISE_CHAP1.SDML

 
    <CHAPTER>(Learning to Play Tennis\chap_learning) 
 
    <P> 
    <EMPHASIS>(Tennis\BOLD) is a sport for people of all ages.  
    You can learn to play tennis as early as you are able to 
    hold a racquet, or as late in life as you want. 
 
    <P> 
    Tennis has evolved in the past few years as a sport 
    <X>(History) 
    <X>(History<XS>of tennis) 
    not only for the elite, but as a popular playground 
    sport.  More and more tennis courts are being built 
    in public parks around the world, making tennis 
    accessible to everyone. 
 
    <p> 
    <HEAD1>(Equipment\equip) 
    <p> 
    Perhaps the most important piece of equipment you 
    <X>(Equipment) 
    will need is a tennis racquet. Sports manufacturers 
    all over the world provide countless different 
    styles and sizes of tennis racquets.  Tennis racquets 
    are made out of many different materials, including: 
 
    <LIST>(unnumbered) 
    <LE>Wood 
    <LE>Aluminum 
    <LE>Graphite 
    <LE>Ceramic 
    <LE>Metal 
    <LE>Boron 
    <ENDLIST> 
 
    <p> 
    <SUBHEAD1>(Choosing a Racquet) 
    <P> 
    Choose a racquet that feels comfortable in your hand. 
    <X>(Equipment) 
    <X>(Equipment<XS>choosing a racquet) 
    <X>(Racquet) 
    <X>(Racquet<XS>choosing a racquet) 
    When you grip the racquet, your index finger and your 
    thumb should overlap slightly.  The racquet should feel 
    comfortable and easy to swing.  The best way to 
    choose a racquet is to borrow a racquet to try out.  
    Try as many racquets as you can until you find the one 
    that feels the most comfortable. 
 
    <p> 
    <SUBHEAD1>(Widebody Racquets) 
    <P> 
    A new invention in tennis racquet technology 
    <X>(Widebody racquets) 
    <X>(Equipment<XS>widebody racquets) 
    <X>(Racquet<XS>widebody) 
    is the widebody racquet.<FOOTNOTE>(1\A widebody racquet 
    is one in which the width of the frame is much thicker 
    than conventional frames.  The thick frame provides more 
    stiffness, which increases power when hitting the ball.) 
    Widebody racquets have almost exclusively replaced the 
    conventional frames of the past among the amateur players.  
    Even the professional tennis players are beginning to 
    experiment with widebody racquets. 
 
 
    <p> 
    <HEAD1>(<QUOTE>The Basics<ENDQUOTE>\basics) 
    <P> 
    Correctly stroking a tennis ball begins with early 
    <X>(Strategy) 
    <X>(Strategy<XS>preparation) 
    <X>(Strategy<XS>weight shifting) 
    <X>(Strategy<XS>eye on ball) 
    <X>(Strategy<XS>firm grip) 
    <X>(Strategy<XS>follow-through) 
    preparation.  Preparation means turning your body 
    and taking the racquet back early.  To maximize your 
    hitting potential, step towards the ball and shift 
    your weight into the shot as you make contact.   Maintain 
    a firm grip on the racquet, especially as you make contact. 
    It is important to keep your eye on the ball during the 
    stroke, so that you can hit the ball on the middle of the strings. 
    The final stage of the stroke is the follow-through.  
    A good way to maintain a proper follow-through is to 
    follow-through with the racquet finishing in front of your body. 
 
 
    <HEAD2>(Practice\practice) 
    <P> 
    The only way to become a better tennis player is 
    <X>(Practice) 
    to practice your strokes.  The more you practice, 
    the more comfortable you will feel on the court. 
 
    <HEAD2>(Lessons\lessons) 
    <P> 
    Sometimes, it is a good idea to take a lesson from 
    <X>(Lessons) 
    a certified professional tennis instructor.  An 
    instructor can often recognize common mistakes you 
    might be making.  
 
    <HEAD1>(Summary\chap1_sum) 
    <P> 
    In summary, tennis is a sport of a lifetime that people 
    of all ages can enjoy.  You need to find the right tennis 
    racquet to suit your style.  And always try to remember 
    <QUOTE>the basics<ENDQUOTE> when playing tennis. 
 

13.2 EXERCISE_CHAP2.SDML

Example 13-2 is the SDML source file for EXERCISE_CHAP2.SDML. This chapter contains illustrations. Enter the following lines to copy EXERCISE_CHAP2.SDML, LENDL.PS, LENDL.BRF, BECKER.PS, BECKER.BRF, SHRIVER.PS, SHRIVER.BRF into your current working directory:


    $ COPY DOC$ROOT:[EXAMPLES]CHAP2.SDML */LOG 
    $ COPY DOC$ROOT:[EXAMPLES]LENDL.PS */LOG 
    $ COPY DOC$ROOT:[EXAMPLES]LENDL.BRF */LOG 
    $ COPY DOC$ROOT:[EXAMPLES]BECKER.PS */LOG 
    $ COPY DOC$ROOT:[EXAMPLES]BECKER.BRF */LOG 
    $ COPY DOC$ROOT:[EXAMPLES]SHRIVER.PS */LOG 
    $ COPY DOC$ROOT:[EXAMPLES]SHRIVER.BRF */LOG 

Example 13-2 EXERCISE_CHAP2.SDML

 
    <CHAPTER>(The Past and Present Stars of Tennis\chap_tennis_stars) 
 
 
    <P> 
    Tennis has been played for many years.  Tennis 
    <X>(History of tennis) 
    has had its stars since the early days.  Many of the 
    players of yesterday provide endless inspiration to the many 
    who excel in the sport today.  <REFERENCE>(tab_one) 
    lists many of the players of yesterday who have been 
    immortalized by their mastery of the game. 
 
    <TABLE>(Players of Yesterday\tab_one) 
    <X>(Players<XS>of yesterday) 
    <X>(Players<XS>Maureen "Little Mo" Connolly) 
    <X>(Players<XS>Rod Laver) 
    <X>(Players<XS>Helen Wills Moody) 
    <X>(Players<XS>Stan Smith) 
    <X>(Players<XS>Betty Stove) 
    <X>(Players<XS>Fred Stolle) 
    <X>(Players<XS>Margaret Court) 
    <X>(Players<XS>Cliff Drysdale) 
    <TABLE_ATTRIBUTES>(KEEP) 
    <TABLE_SETUP>(2\20) 
    <TABLE_HEADS>(Female Players\Male Players) 
    <TABLE_ROW>(Maureen "Little Mo" Connolly\Rod Laver) 
    <TABLE_ROW>(Helen Wills Moody\Stan Smith) 
    <TABLE_ROW>(Betty Stove\Fred Stolle) 
    <TABLE_ROW>(Margaret Court\Cliff Drysdale) 
    <ENDTABLE> 
 
    <P> 
    Today, with tennis becoming more and more popular, 
    (as described in <REFERENCE>(chap_learning)) 
    tennis has even more stars.  <REFERENCE>(tab_two) 
    lists many of the players of today who are colorful 
    and exhuberant, and will someday be the stars of 
    yesterday. 
 
    <TABLE>(Stars of Today\tab_two) 
    <X>(Players<XS>Martina Navratilova) 
    <X>(Players<XS>Chris Evert) 
    <X>(Players<XS>Steffi Graf) 
    <X>(Players<XS>Pam Shriver) 
    <X>(Players<XS>Gabriela Sabatini) 
    <X>(Players<XS>Gretchen Magers) 
    <X>(Players<XS>Helena Sukova) 
    <X>(Players<XS>Arantxa Sanchez) 
    <TABLE_ATTRIBUTES>(KEEP) 
    <TABLE_SETUP>(2\20) 
    <TABLE_HEADS>(<span>(2)Players of Today) 
 
       <TABLE_UNIT> 
       <TABLE_UNIT_HEADS>(Females\Country)   
       <TABLE_ROW>(Martina Navratilova\USA) 
       <TABLE_ROW>(Chris Evert\USA) 
       <TABLE_ROW>(Steffi Graf\Germany) 
       <TABLE_ROW>(Pam Shriver\USA) 
       <TABLE_ROW>(Gabriela Sabatini\Argentina) 
       <TABLE_ROW>(Gretchen Magers\USA) 
       <TABLE_ROW>(Helena Sukova\Czechoslovakia) 
       <TABLE_ROW>(Arantxa Sanchez\Spain) 
       <ENDTABLE_UNIT> 
  
       <TABLE_UNIT> 
       <X>(Players<XS>Jimmy Connors) 
       <X>(Players<XS>Boris Becker) 
       <X>(Players<XS>Stefan Edberg) 
       <X>(Players<XS>Alberto Mancini) 
       <X>(Players<XS>John McEnroe) 
       <X>(Players<XS>Emilio Sanchez) 
       <X>(Players<XS>Mats Wilander) 
       <X>(Players<XS>Andre Agassi) 
       <TABLE_UNIT_HEADS>(Males\Country) 
       <TABLE_ROW>(Jimmy Connors\USA) 
       <TABLE_ROW>(Boris Becker\Germany) 
       <TABLE_ROW>(Stefan Edberg\Switzerland) 
       <TABLE_ROW>(Alberto Mancini\Argentina) 
       <TABLE_ROW>(John McEnroe\USA) 
       <TABLE_ROW>(Emilio Sanchez\Spain) 
       <TABLE_ROW>(Mats Wilander\Switzerland) 
       <TABLE_ROW>(Andre Agassi\USA) 
       <ENDTABLE_UNIT> 
 
    <ENDTABLE> 
 
 
    <HEAD1>(Tennis Graphics\graphics) 
    <P> 
    Famous tennis players of today are recognizable 
    by styles they embody while performing their art. 
    <REFERENCE>(fig_one) shows Ivan Lendl celebrating 
    <X>(Players<XS>Ivan Lendl) after hitting a winning shot. 
 
    <FIGURE>(Ivan Lendl\fig_one) 
    <FIGURE_ATTRIBUTES>(KEEP) 
    <FIGURE_FILE>(BOOKREADER\LENDL.BRF\69.88) 
    <FIGURE_FILE>(PS\LENDL.PS\40.06) 
    <ENDFIGURE> 
 
    <P> 
    <REFERENCE>(fig_two) shows Boris <quote>(Boom Boom) Becker preparing 
    <X>(Players<XS>Boris Becker) to unleash his mighty serve. 
 
    <FIGURE>(Boris Becker\fig_two) 
    <FIGURE_ATTRIBUTES>(KEEP) 
    <FIGURE_FILE>(BOOKREADER\BORIS.BRF\40) 
    <FIGURE_FILE>(PS\BORIS.PS\19.9) 
    <ENDFIGURE> 
 
    <HEAD1>(Famous Serve and Volleyers\serve_and_volley) 
    <P> 
    Tennis involves many different strategies.  Some players 
    <X>(Strategy) 
    <X>(Strategy<XS>serve and volley) 
    <X>(Strategy<XS>baseline) 
    stay on the baseline and hit groundstrokes, waiting 
    for the right opportunity to approach the net to hit 
    a crisp volley.  Others prefer to serve and charge 
    immediately into the net to hit a winning volley and 
    end the point quickly.  <REFERENCE>(ex_one) names some 
    of the professional players who have become famous for 
    their penetrating serve and volley game. 
 
    <EXAMPLE>(Serve and Volleyers\ex_one) 
    <X>(Players<XS>Boris Becker) 
    <X>(Players<XS>Jana Novotna) 
    <X>(Players<XS>Pam Shriver) 
    <X>(Players<XS>Stefan Edberg) 
    <X>(Players<XS>John McEnroe) 
    <X>(Players<XS>Patty Fendick) 
    <X>(Players<XS>Roscoe Tanner) 
    <X>(Players<XS>Helena Sukova) 
    <X>(Players<XS>Rod Laver) 
    <X>(Players<XS>Fred Stolle) 
    <X>(Players<XS>Stan Smith) 
    <CODE_EXAMPLE> 
       Boris Becker 
            Jana Novotna 
       Pam Shriver 
    Stefan Edberg      
        John McEnroe 
            Patty Fendick 
      Roscoe Tanner 
             Helena Sukova 
      Rod Laver 
            Fred Stolle 
        Stan Smith 
    <ENDCODE_EXAMPLE> 
    <ENDEXAMPLE> 
 
    <HEAD1>(Playing the Baseline\baseline) 
    <P> 
    You may prefer to stay on the baseline and rally. 
    Hitting groundstrokes from the baseline means 
    you rarely venture into the net to hit volleys. 
    Perhaps the most famous baseline player in the history 
    <X>(Baseliners) 
    <X>(Baseliners<XS>names of) 
    of tennis was Bjorn Borg.  Borg <X>(Players<XS>Bjorn Borg) 
    felt more comfortable staying back on the baseline and 
    hitting topspin <X>(Strategy<XS>topspin) groundstrokes. 
 
    <HEAD1>(Professionals and their Fans\fans) 
    <P> 
    Many professional tennis players appreciate their fans 
    as much as their fans appreciate them. 
 
 
    <ONLINE_POPUP>(Pam Shriver) 
    <FIGURE> 
    <X>(Players<XS>Pam Shriver) 
    <FIGURE_FILE>(BOOKREADER\SHRIVER.BRF\82.6) 
    <FIGURE_FILE>(PS\SHRIVER.PS\20.6) 
    <ENDFIGURE> 
    <ENDONLINE_POPUP> 
 
 
    <HEAD1>(Summary\chap2_summary) 
    <P> 
    Whatever style you choose to follow in tennis, remember 
    that there are plenty of stars you can emulate. 
 

13.3 Creating Front Matter

Front matter for a book includes a title page, copyright page, table of contents, and preface.

For more information on creating a front matter file, see Chapter 6.

Example 13-3 is the SDML source file for EXERCISE_FRONT.SDML. Enter the following line to copy EXERCISE_FRONT.SDML into your current working directory:


    $ COPY DOC$ROOT:[EXAMPLES]EXERCISE_FRONT.SDML */LOG 

Example 13-3 EXERCISE_FRONT.SDML

 
    <FRONT_MATTER>(front) 
    <DEFINE_BOOK_NAME>(tennis_book\Tennis: The Sport of a Lifetime) 
 
    <TITLE_PAGE> 
    <TITLE>(<REFERENCE>(tennis_book)) 
 
    <ABSTRACT> 
    This test booklet was a product of learning by tutorial. 
    <DATE> 
    <ENDABSTRACT> 
 
    <ENDTITLE_PAGE> 
 
    <COPYRIGHT_PAGE> 
    <PRINT_DATE>(January 1991) 
    <COPYRIGHT_DATE>(1991) 
    <ENDCOPYRIGHT_PAGE> 
 
    <CONTENTS_FILE> 
 
    <PREFACE> 
    <P> 
    The preface contains information about the structure of 
    the document, the intended audience, and document notation 
    conventions. 
    <ENDPREFACE> 
 
    <ENDFRONT_MATTER> 
 

13.4 Creating a Profile

A profile is a list of the elements that make up a book. This sample booklet you are creating consists of two chapters and one front matter file. In addition, you can place the <INDEX_FILE> tag in the profile to cause DECdocument to create an index during the processing stage. The elements you include in the profile are processed in the sequence that they appear in the profile.

To specify that you want to include all second-level headings as separate topics that Bookreader displays, use the <SET_ONLINE_TOPIC> tag. You can use this tag in the profile to set the topic level for all the chapters in the book instead of using it in the front of every individual chapter. You must place this tag after the element or elements that you want to affect. Once you change one element in the profile to display second-level headings as topics, all the rest of the elements in your profile will display second-level headings as topics unless you specify another <SET_ONLINE_TOPIC> tag. See Section 2.6.2 in this book, and Using Doctypes and Related Tags for more information on using the <SET_ONLINE_TOPIC> tag. This is a Bookreader formatting tag and will not affect the printed output.

See Section 9.6.2 for more information on creating a profile. See Section 9.8 for more information on processing an index.

Example 13-4 is the SDML source file for EXERCISE_PROFILE.SDML. Enter the following line to copy EXERCISE_PROFILE.SDML into your current working directory:


    $ COPY DOC$ROOT:[EXAMPLES]EXERCISE_PROFILE.SDML */LOG 

Example 13-4 EXERCISE_PROFILE.SDML

 
    <PROFILE> 
   
       <ELEMENT>(FRONT.SDML) 
       <SET_ONLINE_TOPIC>(head2) 
       <ELEMENT>(CHAP1.SDML) 
       <ELEMENT>(CHAP2.SDML) 
 
       <INDEX_FILE> 
    <ENDPROFILE> 
 

13.5 Building the Booklet

To build the booklet for both printed and Bookreader display, you need to process it twice.

13.5.1 Processing the Printed Booklet

To process the booklet to be printed on a POSTSCRIPT printer, enter the following command:


 
    $ DOCUMENT exercise_profile SOFTWARE.HANDBOOK PS /BATCH /INDEX 
 

The formatted output for the booklet includes the table of contents and the index in the correct locations in the output.

Print your booklet, EXERCISE_PROFILE.PS, on a POSTSCRIPT printer.


Previous Next Contents Index