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.
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.
Non-ASCII symbols may be marked-up using their troff codenames,
e.g. \(dg is mark-up for a 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.
The Greek letters of the core Z language are converted according to the following mark-up directives.
Z character | LATEX mark-up |
![]() | .Zo theta U+03B8 |
![]() | .Zo lambda U+03BB |
![]() | .Zo mu U+03BC |
Occurrences of and
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 of the core Z language are converted according to the following mark-up directives.
Z character | LATEX mark-up |
![]() | .Zo arithmos U-0001D538 |
![]() | .Zo nn U+2115 |
![]() | .Zo ps U+2119 |
Special characters of the core Z language are converted according to the following mark-up directives.
Z character | LATEX mark-up |
![]() | .Zo << U+300A |
![]() | .Zo >> U+300B |
![]() | .Zo opbind U+2989 |
![]() | .Zo clbind U+298A |
Subscripts may be marked-up as follows.
LATEX mark-up | Z characters | ![]() ![]() |
For example, 1 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 |
![]() | .Zo nearrow U+2197 |
![]() | .Zo swarrow U+2199 |
![]() | .Zo searrow U+2198 |
![]() | .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 of the core Z language are converted according to the following mark-up directives.
Z character | LATEX mark-up |
![]() | .Zo vdash U+22A2 |
![]() | .Zw thrm vdash? |
![]() | .Zo and U+2227 |
![]() | .Zo or U+2228 |
![]() | .Zo imp U+21D2 |
![]() | .Zo iff U+21D4 |
![]() | .Zo neg U+00AC |
![]() | .Zo forall U+2200 |
![]() | .Zo exists U+2203 |
![]() | .Zo cp U+00D7 |
![]() | .Zo mem U+2208 |
![]() | .Zo dot U+2981 |
\ | .Zo zhide U+29F9 |
![]() | .Zo zproj U+2A21 |
![]() | .Zo zfrc U+2A1F |
>> | .Zo zpipe U+2A20 |
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.
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.
Mathematical representation
DeclPart | ||
![]() |
![]() |
![]() |
Predicate |
Z characters
AXCHAR Declpart | Predicate ENDCHAR
Troff mark-up
.ZS DeclPart .ZM Predicate .ZE
Mathematical representation
[Formals] | ||
![]() |
![]() | |
![]() |
![]() | |
DeclPath | ||
![]() |
![]() |
![]() |
Predicate | ||
Z characters
GENCHAR AXCHAR [Formals] DeclPart | Predicate ENDCHAR
Troff mark-up
.ZS [Formals] DeclPart .ZM Predicate .ZE
Mathematical representation
NAME | ||||
![]() |
![]() |
![]() | ||
![]() | ||||
DeclPart | ||||
![]() |
![]() |
![]() | ||
Predicate | ||||
![]() | ||||
![]() |
Z characters
SCHCHAR NAME DeclPart | Predicate ENDCHAR
Troff mark-up
.ZS NAME DeclPart .ZM Predicate .ZE
Mathematical representation
NAME [Formals] | ||||
![]() |
![]() |
![]() | ||
![]() | ||||
![]() |
![]() |
![]() | ||
![]() | ||||
DeclPart | ||||
![]() |
![]() |
![]() | ||
Predicate | ||||
![]() | ||||
![]() |
Z characters
GENCHAR SCHCHAR NAME [Formals] DeclPart | Predicate ENDCHAR
Troff mark-up
.ZS NAME [Formals] DeclPart .ZM Predicate .ZE
The following names are defined for marking-up
CADi extensions to standard Z.
They are all defined in the prelude section,
and are not noticed by the -ws option.
CADi
would conform better to the standard if this mark-up were introduced in a separate CADi
-specific section.
Symbol characters of the core Z language are converted according to the following mark-up directives.
Z character | LATEX mark-up |
![]() | .Zo dagger U+2020 |
![]() | .Zo zov U+2295 |
![]() | .Zo xor U+22BB |
The troff mark-up recognised by cadiz also includes that of various tool directives.