SGML Scripting
I suppose that most programmers and several other people would like to write
their documents similar to scripts rather than as plain SGML files. InfoPrism
allows this for documents with the document type Manual
and the scripting language Tcl resp. [incr Tcl].
This document describes SGML scripting with InfoPrism and the additional
commands you have to learn.
The command set and the syntax is similar to those of ordinary scripts written
for [incr Tcl] version 3.0a1. However, SGML scripts are processed by a safe
interpreter.
The first command in any SGML script is the manual command with the document title as argument. Additional
options are:
-lang CODE- Specifies the document language.
Recognized are
DE and EN.
Global commands affect the whole document and may appear anywhere in the document.
-
author [-email ADDRESS] NAME
- Specifies the author of the document. Optionally the email
ADDRESS of the author may be given.
-
keywords [NAME ...] - Specifies keywords related to the document.
stylesheet URL [TYPE]- Specifies a stylesheet for
rendering the output document.
Sectioning commands are, in descending order, h2, h3
, h4, h5 and h6. The argument is used as section title.
Additional options are:
-descr TEXT- Use TEXT as long
section name.
-label NAME- Attach label
NAME to section.
include FILE- Works similar to the vanilla Tcl command
source.
ul {
li cats
li dogs
}
ol {
li [code ./configure]
li [code make]
li [code make install]
}
Software packages adhering to the GNU standards can be easily
installed with the following commands:
./configuremakemake install
Definition lists are lists where each item consists of a term and a description.
The syntax of the Tcl language makes it difficult to script nested lists and complex items. In this section we describe a set of commands used as remedy for this problem:
- liwul
- Unordered list within an ordinary list item:
liwul "Some animals are: " {
li "cats"
li "dogs"
}
-
ddwul
- Unordered list within a description list item.
- ddwdl
- Description list within a description list item.
- ddwex
- Example within a description list item.
Tables can be created with the table and row commands.
table SCRIPT- Evaluates SCRIPT and creates a table with the result as it contents.
-
row [COLUMN ...] - Creates table row from
COLUMN arguments.
table {
row Name Age
row Stefanie 18
row Christine 16
row Ulla 32
}
| Name | Age
|
| Stefanie | 18
|
| Christine | 16
|
| Ulla | 32
|
You can use the ent command to generate entities:text "[ent copy] 1998 by Stefan Hornburg"
© 1998 by
Stefan Hornburg
The pre and example commands marks the enclosed text as
preformatted.pre "Preserved => <= blanks"
Preserved => <= blanks
label KEY TEXT- Marks TEXT as target for references to KEY.
ref
KEY TEXT- TEXT refers to KEY.
Each index has to be declared with the makeindex command. insertindex inserts the index into the document. Index entries are generated by the index and
withindex commands.makeindex animals
text "Famous animals living in the sea are the [withindex animals whale]
and the [withindex animals dolphin]."
insertindex animals
Famous animals living in the sea are the whale and the dolphin.
img SRC [ALT]- Inserts image
located at SRC. It it recommended to pass an string ALT
containing an short description of the image.
Written by Stefan Hornburg <racke@gundel.han.de>
Translated from sbl.tcl by Info Prism's sgml2html v0.0.6
Last modified 21 December 1998