Producing HTML Documents with Scribe
By including the library file: The resulting document is structured as follows:
To achieve these results, the following changes must be made to the Scribe
manuscript file:
The following sections describe these changes in detail.
Once you've made the changes described below, you will still be able to format
your document for other devices. For devices other than HTML, the HTML library
contains "stub" definitions for the new commands that duplicate the behavior of
the regular Scribe commands.
Summary: You can do all of the fancy HTML formatting you want, and you'll
still be able to format for other devices, without changing your document.
Each @Section command should be converted to @MakeSection: This will start a new HTML file named tag.html at this point. If you want to
continue the same file (for example, if you have several short sections), you
can use the @MakeInlineSection command: If you use other section-level sectioning commands, such as @PrefaceSection,
you can give an additional parameter to the @MakeSection or @MakeInlineSection
command: If your document doesn't contain chapters, skip this part, and make sure that
you specify "nochapters" to the @MakeDocument command.
Each @Chapter command should be converted to @MakeChapter: This will start a new HTML file named tag.html at this point. If you want to
continue the same file (for example, if there is very little introductory
material before the first real chapter) you can use the @MakeInlineChapter
command: If you use other chapter-level sectioning commands, such as @Appendix or
@UnNumbered, you can give an additional parameter to the @MakeChapter or
@MakeInlineChapter command:
@MakeDocument is very similar to @MakeChapter, except that it doesn't actually
start a chapter. It does determine the name of the first HTML generated. It
should be placed before any text in the .mss file.
We use a convention that the name of the top-level document in a directory is
home.html. So, the tag in the @MakeDocument command would be "home.html".
There are two options that may be specified in the @MakeDocument command:
For example: The section cross references for each chapter are stored in Scribe "generated
portions," each named after the chapter tag. This is the same mechanism that
Scribe uses for the tables of contents. For a document named "test.mss" with a
@MakeChapter(tag=intro, ...), the chapter contents for that chapter would be
stored in a file named "test.intro".
Each of these generated portions requires a command to be added to the
beginning of the .mss file. For each @MakeChapter, insert a line of the form: If you add a chapter and forget the @generate command, Scribe will produce
some very cryptic error messages: The @* command has no effect for the HTML device, except in unfilled
environments. As an alternative, the HTML library defines the @br command,
which causes a line break for all device types.
You should use @br in place of @*.
At the very end of your .mss file, add the command: If you leave out this command, you will get two error messages for the last
chapter and section tags:
3. Making A Structured HTML Document
@libraryfile(HTML)
in addition to specifying the HTML device, you can produce structured HTML
documents, with inter-file links set up automatically. This command should be
included after all document setup commands, such as @generate, @disable, and
@style.
3.1. Coexistence With Other Device Types
3.2. Convert @Section to @MakeSection
@MakeSection(tag=tag, title="Title of the Section")
@MakeInlineSection(tag=tag, title="Title of the Section")
@MakeSection(tag=tag, title="Title of the Section",
command=PrefaceSection)
3.3. Convert @Chapter to @MakeChapter
@MakeChapter(tag=tag, title="Title of the Chapter")
@MakeInlineChapter(tag=tag, title="Title of the Chapter")
@MakeChapter(tag=tag, title="Title of the Chapter",
command=UnNumbered)
3.4. Add @MakeDocument at the Beginning
@MakeDocument(tag=tag, title="Title of the Whole Document")
@MakeDocument(tag=home.html, title="Document Title", nochapters)
3.5. Include @generate Commands for Each Chapter
@generate(tag=tag)
before the @LibraryFile(HTML) command.
Error in BACKPLACE command found while processing the manuscript.
res-html.mss, line 123: @backplace(resources)
The name RESOURCES should be defined but is not!
Error in BACKPLACE command.
res-html.mss, line 123: @backplace(resources)
Portion RESOURCES cannot be backplaced.
3.6. Forced Line Breaks -- Convert @* to @br
3.7. Add an @HTMLfinish Command at the End
@HTMLfinish()
Error in VALUE command found while processing the manuscript.
other.mss, line 241: @value(tag-next)
The name tag-next is used in the @Value command, but it has not been defined
with @String.
Copyright (C) 1993, 1994 Digital Equipment Corporation
Glenn Trewitt, trewitt@pa.dec.com