CADiZ

Reference manual / Troff mark-up


Contents of this page

Introduction

A troff mark-up for Z specifications is defined here by its conversion to a sequence of Z (UCS) characters. Cadiz performs this conversion to Z characters, which it then lexes. Only the core Z notation is considered here; the troff mark-up of symbols defined in the toolkit is documented elsewhere.

The ISO standard does not define a troff mark-up. However, the sequence of Z characters to which cadiz converts troff mark-up is checked for conformance to the ISO standard.

ISO Standard mark-up

White space and comments

Spaces and tabs in the mark-up are converted to SPACE characters. Newlines characters in the mark-up are converted to NLCHAR characters.

Text from -- to the end of that line is a comment and is ignored.

Mark-up directives

Non-ASCII symbols may be marked-up using their troff codenames, e.g. \(dg is mark-up for a \dagger character.

Alternatively, in the style of the eqn preprocessor, mnemonic names may be associated with non-ASCII symbols using mark-up directives. These mark-up directives are usually written immediately before the definition of the corresponding Z symbol. For example, those for toolkit symbols are in toolkit sections, and those for the core notation are in the prelude section. Hence you write mark-up directives only for new symbols that you define in your sections of your Z specification.

The conversion of a name to a specific UCS character is defined by a directive like the following.

.Zo Delta U+0394 .Zo arithmos U-0001D538

If a name is to be converted to more than one character, a directive like the following is used.

.Zw thrm vdash?

The conversions of all such names include a SPACE character before and after them.

In the following sections, mark-up directives are given to define the conversions of all the names for the core notation. Any core notation for which no name is defined is ASCII and is marked-up as itself.

Greek letters

The Greek letters of the core Z language are converted according to the following mark-up directives.

Z character LATEX mark-up
\theta .Zo theta U+03B8
\lambda .Zo lambda U+03BB
\mu .Zo mu U+03BC

Occurrences of \Delta and \Xi as prefixes of Z names cannot be marked-up using mnemonic names because of the insertion of SPACE around the expansions of mark-up names. Instead, use \(*D and \(*C.

Other letters

Other letters of the core Z language are converted according to the following mark-up directives.

Z character LATEX mark-up
\arithmos .Zo arithmos U-0001D538
\nat .Zo nn U+2115
\power .Zo ps U+2119

Special characters

Special characters of the core Z language are converted according to the following mark-up directives.

Z character LATEX mark-up
\ldata .Zo << U+300A
\rdata .Zo >> U+300B
\lblot .Zo opbind U+2989
\rblot .Zo clbind U+298A

Subscripts may be marked-up as follows.

^subscript

LATEX mark-up Z characters
\searrow subscript\nwarrow

For example, \exists1 is marked-up as exists^1.

Superscripts and subscripts may also be marked-up using mnemonic names for the motions.

Z character LATEX mark-up
\nearrow .Zo nearrow U+2197
\swarrow .Zo swarrow U+2199
\searrow .Zo searrow U+2198
\nwarrow .Zo nwarrow U+2196

The troff mark-up from which box characters are converted is discussed below.

The troff mark-up for NLCHAR and SPACE characters is discussed above.

Symbol characters

Symbol characters of the core Z language are converted according to the following mark-up directives.

Z character LATEX mark-up
\vdash .Zo vdash U+22A2
\vdash? .Zw thrm vdash?
\land .Zo and U+2227
\lor .Zo or U+2228
\implies .Zo imp U+21D2
\iff .Zo iff U+21D4
\lnot .Zo neg U+00AC
\forall .Zo forall U+2200
\exists .Zo exists U+2203
\cross .Zo cp U+00D7
\in .Zo mem U+2208
@ .Zo dot U+2981
\ .Zo zhide U+29F9
\project .Zo zproj U+2A21
\semi .Zo zfrc U+2A1F
>> .Zo zpipe U+2A20

Section header mark-up

Section headers are delimited from surrounding informal text or neighbouring paragraphs by .ZH and .ZE which, like the troff requests they resemble, must each be at the beginning of a line.

.ZH section name parents ... .ZE

These .ZH and .ZE brackets are converted to ZEDCHAR and ENDCHAR respectively.

Names introduced by mark-up directives are not recognised in section headers.

Paragraph mark-up

Outlined paragraphs are delimited by .ZS and .ZE, the .ZS being converted to box characters and the .ZE being converted to an ENDCHAR. Non-outlined paragraphs are delimited by .ZH and .ZE, the .ZH being converted to a ZEDCHAR and the .ZE being converted to an ENDCHAR. Any middle line in an outlined paragraph may be marked-up using .ZM, which is converted to a | character with SPACE characters around it.

For each outlined paragraph, its mathematical representation, Z characters, and troff mark-up are given below.

Axiomatic description paragraph mark-up

Mathematical representation


DeclPart
\where
Predicate

Z characters

AXCHAR Declpart | Predicate ENDCHAR

Troff mark-up

.ZS DeclPart .ZM Predicate .ZE

Generic axiomatic description paragraph mark-up

Mathematical representation

[Formals]

DeclPath
\where \where \where
Predicate

Z characters

GENCHAR AXCHAR [Formals] DeclPart | Predicate ENDCHAR

Troff mark-up

.ZS [Formals] DeclPart .ZM Predicate .ZE

Schema definition paragraph mark-up

Mathematical representation

NAME

DeclPart
\where \where \where
Predicate
\end{schema}

Z characters

SCHCHAR NAME DeclPart | Predicate ENDCHAR

Troff mark-up

.ZS NAME DeclPart .ZM Predicate .ZE

Generic schema definition paragraph mark-up

Mathematical representation

NAME [Formals]

DeclPart
\where \where \where
Predicate
\end{schema}

Z characters

GENCHAR SCHCHAR NAME [Formals] DeclPart | Predicate ENDCHAR

Troff mark-up

.ZS NAME [Formals] DeclPart .ZM Predicate .ZE

CADiZ-specific mark-up

The following names are defined for marking-up CADi\num extensions to standard Z. They are all defined in the prelude section, and are not noticed by the -ws option. CADi\num would conform better to the standard if this mark-up were introduced in a separate CADi\num-specific section.

Symbol characters

Symbol characters of the core Z language are converted according to the following mark-up directives.

Z character LATEX mark-up
\dagger .Zo dagger U+2020
\zovr .Zo zov U+2295
\xor .Zo xor U+22BB

Tool directives

The troff mark-up recognised by cadiz also includes that of various tool directives.


IT 22-Jan-2002