<monospace>
Monospace Text (Typewriter Text)
Used to mark text that should appear in a non-proportional font, such as courier.
Remarks
Usage: The <monospace> is only for monospaced words that are inline with
other text, for example, computer code fragments, variables, parameters and operators, etc. For block monospace elements, particularly where spaces and line breaks also need to be preserved, use either:
- the generic block structural element <preformat> (which can hold ASCII art, man-machine dialogs, or shape poetry), or
- the semantically explicit element <code> (which holds script or computer coding examples. XML tagging, XML DTD and schema fragments).
Emphasis as a Toggle Switch:
The @toggle attribute controls the behavior of this element. When the value of @toggle is set
to “no”, the emphasized text remains in the requested style, no matter what the surrounding text does. When the value of @toggle
is “yes”, if the surrounding text is set to the same
emphasis style, the text within this element will change to another emphasis style, so that the text will always
be typographically distinct from its surroundings.
Using the element <italic> as an example, setting
the @toggle attribute to “no” would mean that material marked as italics will always be italics, even in an italic context. In contrast, if the @toggle attribute was set to “yes” on the <italic> element, if the formatting context imposes italics (whether due to another <italic> element, a stylesheet, some CSS, or other means), then the
italics would be turned off within that context, making the emphasized text emphasized by contrast, but not italic. The <italic> element would still produce italics everywhere else.
Model Description
Any combination of:
- Text, numbers, or special characters
- External Linking Elements
- <inline-supplementary-material> Inline Supplementary Material
- Related Material Elements
- Citation Elements
- Emphasis Elements
- <alternatives> Alternatives For Processing
- Inline Display Elements
- <chem-struct> Chemical Structure (Display)
- <inline-formula> Formula, Inline
- Math Elements
- Other Inline Elements
- <fn> Footnote
- <target> Target of an Internal Link
- <tbx:entailedTerm> Entailed Term
- <xref> X(cross) Reference
- <std-ref> Standard Reference Designation
- Baseline Change Elements
This element may be contained in:
<addr-line>, <aff>, <alt-title>, <article-title>, <attrib>, <award-id>, <bold>, <chapter-title>, <chem-struct>, <code>, <collab>, <comment>, <compl>, <compound-kwd-part>, <compound-subject-part>, <copyright-statement>, <data-title>, <def-head>, <disp-formula>, <element-citation>, <ext-link>, <fixed-case>, <full>, <funding-source>, <gov>, <inline-formula>, <inline-supplementary-material>, <institution>, <intro>, <italic>, <kwd>, <label>, <license-p>, <main>, <meta-value>, <mixed-citation>, <monospace>, <named-content>, <nav-pointer>, <on-behalf-of>, <overline>, <p>, <part-title>, <preformat>, <price>, <publisher-loc>, <rb>, <related-article>, <related-object>, <related-term>, <role>, <roman>, <sans-serif>, <sc>, <see>, <see-also>, <see-also-entry>, <see-entry>, <series>, <sig>, <sig-block>, <source>, <std>, <strike>, <styled-content>, <sub>, <subject>, <subtitle>, <sup>, <supplement>, <target>, <td>, <term>, <term-head>, <term-source>, <textual-form>, <th>, <title>, <trans-source>, <trans-subtitle>, <trans-title>, <underline>, <verse-line>, <xref>
Example 1
Where a monofont is preferred:
... <p>There are three ways of forming subkeys: subkeys formed using the “<monospace>forward</monospace>” processing parameter, subkeys formed using the “<monospace>backward</monospace>” processing parameter, and subkeys formed using ...</p> ...
Example 2
For inline code within text:
...
<non-normative-note>
<label>NOTE</label>
<p>A well-formed <italic>symbol_range</italic> is of a form
form such as <monospace><S4E00>..<S9FA5></monospace>,
where the common prefix is “S”, and the rest
of the <italic>identifier</italic> portion of each
<italic>symbol</italic> is ...</p>
</non-normative-note>
...