X hits on this document

PDF document

Typesetting SGML Documents Using TjjX - page 4 / 6

18 views

0 shares

0 downloads

0 comments

4 / 6

Andrew E. Dobrowolski

must be translated by some process into a suitable form.

Implicit Specification of Characteristics

Translating a FOSI into 'lJ$ creates a series of macro definitions that appear in the TEX translation of the document instance. Given a suitable starting set of macros, it is possible to load the new macro definitions produced automatically from the FOSI translation and to format the document.

Because the output specification for a given document element is context sensitive, either the translation process or 'TEX must track and differen- tiate between differing contexts. To make the work

of the macro package should be built into

easier, the context sensitivity

the

translation

process.

In

fact,

W

' s limited

that

the

translation

look-ahead capability dictates will be context sensitive. 'lJ$

cannot recognize when an element is the last its kind within the parent structure, but some currence conditions require that this distinction

of oc- be

made. For example, the to inhibit a page break

last item in a list may need from separating it from the

second-to-last must therefore

item. This occurrence recognition be done by the translation process.

The easiest way to accomplish this is to give each e-i-c in the FOSI a distinct name and to use that name, when appropriate, in the translation of the document instance. Listings 3 and 4 show the translation into TJ of the document instance from Listing 1and the sample FOSI fragment of Listing 2. Notice how the two sets of <para>...</para>tags are translated according to their occurrence.

Let us examine more closely the specification of the first para e-i-c in the FOSI fragment in Listing 2. It explicitly sets the values for the f i r s t l n charac- teristic of the "indent" category and the s t a r t l n and endln characteristics of the "textbrk" category; however, it neglects to explicitly define many other important formatting parameters. Nowhere was the font mentioned, or the prespace, or the justification (quadding). Nonetheless, as the formatted output suggests, these characteristics are well defined. In general, one of two implicit methods is used to de- termine the value of a characteristic not mentioned

explicitly in an e-i-c. One of the methods is inheritance.

An un-

specified value it example

characteristic that is inherited assumes the

had at the level of of Listing 1,the font

its parent.

In the

family

of

the head

is

inherited from its parent (the section). If family characteristic for section is changed,

the font this will

in turn affect

the

the value of

an

head. This method of determining unspecified characteristic has to

\section{)

\sectionhead{)SGML

and FOSI

Structure :

An

Overview\endsectionhead{)

\firstpara{)All

SGML documents must

conform to certain rules that are defined partially by the standard and partially by a prolog t o the document, which is called the document type definition (DTD).\endfirstpara{)

\nonf irstpara{)In

addition to being

first off the starting blocks to

becoming a recognized standard,

the FOSI is manageable.

also the most \endnonfirstpara{)

Listing 3.

Translation of Document Fragment.

Listing 4.

Translation of a FOSI Fragment.

TUGboat, Volume 12 (1991), No. 3-Proceedings

of the 1991 Annual Meeting

Document info
Document views18
Page views18
Page last viewedSat Dec 10 19:03:24 UTC 2016
Pages6
Paragraphs365
Words3905

Comments