<computertext> (
Computer Text)
Description
Description
This element holds computer text fragments, such as lines of computer code, where the convention is to display such content in a monospaced font. It can be used for very short inline fragments:
<para>In traditional BASIC programs, each statement is preceded by a line number,
such as <computercode>10 PRINT "hello world"</computercode> which is line 10 of the program.</para>
In traditional BASIC programs, each statement is preceded by a line number,
such as 10 PRINT "hello world" which is line 10 of the program.
The
<br> element is needed to preserve multiple lines of computer code that must remain intact.
<para>Here is a small program:</para>
<computertext>10 PRINT "hello world"<br/>
20 GOTO 10</computertext>
Here is a small program:
10 PRINT "hello world"
20 GOTO 10
Parent Elements
The elements listed below may directly contain this element.
They are "parent" elements. Elements in referenced groups are included, up to two levels of group nesting.
Model Diagram
The DTD model for this element:
--+(choice of TEXT with elements repeated)
|
|--+(choice) [Paragraph Content]
| |
| |-- trademark -- TEXT
| |
| |-- footnote -- (elements)
| |
| |--+(choice) [Links from Text]
| | |
| | |-- xref -- (TEXT and elements)
| | |
| | |-- chemeqnref -- (TEXT and elements)
| | |
| | |-- chemformref -- (TEXT and elements)
| | |
| | |-- matheqnref -- (TEXT and elements)
| | |
| | |-- tableref -- (TEXT and elements)
| | |
| | |-- citationref -- (TEXT and elements)
| | |
| | |-- figureref -- (TEXT and elements)
| | |
| | |-- suppmatref -- (TEXT and elements)
| | |
| | |-- listref -- (TEXT and elements)
| | |
| | |-- listitemref -- (TEXT and elements)
| | |
| | |-- chemstructureref -- (TEXT and elements)
| | |
| | |-- footnoteref -- (TEXT and elements)
| | |
| | |-- endnoteref -- (TEXT and elements)
| | |
| | |-- textref -- (TEXT and elements)
| | |
| | |-- enunciationref -- (TEXT and elements)
| |
| |--+(choice) [Objects in Text]
| | |
| | |-- inlinematheqn -- (elements)
| | |
| | |-- inlinechemeqn -- (elements)
| | |
| | |-- inlinegraphic
| |
| |--+(choice) [Mail and Web Links in Text]
| | |
| | |-- email -- (TEXT and elements)
| | |
| | |-- webaddress -- (TEXT and elements)
| |
| |--+(choice) [Names in Text]
| | |
| | |-- famousname -- TEXT
| | |
| | |-- companyname -- (TEXT and elements)
| | |
| | |-- institutionname -- (TEXT and elements)
| | |
| | |-- citation -- TEXT
| |
| |--+(choice) [Acronyms and Terms in Text]
| | |
| | |-- acronym -- TEXT
| | |
| | |-- terminology -- (TEXT and elements)
| |
| |--+(choice) [Formatting in Text]
| | |
| | |-- sub -- (TEXT and elements)
| | |
| | |-- sup -- (TEXT and elements)
| | |
| | |-- b -- (TEXT and elements)
| | |
| | |-- i -- (TEXT and elements)
| | |
| | |-- smallcaps -- (TEXT and elements)
| | |
| | |-- u -- (TEXT and elements)
| | |
| | |-- box -- (TEXT and elements)
| | |
| | |-- roman -- (TEXT and elements)
| | |
| | |-- script -- (TEXT and elements)
| | |
| | |-- tt -- (TEXT and elements)
| | |
| | |-- strikethrough -- (TEXT and elements)
| | |
| | |-- overline -- (TEXT and elements)
| | |
| | |-- newpage
| | |
| | |-- query -- TEXT
| |
| |--+(choice) [Formatting Objects in Text]
| | |
| | |-- br
| | |
| | |-- refrange -- (elements)
DTD Definition
The DTD contains the following element and attribute definitions
(note that embedded links are to definitions within the DTD page of this guide):
<!ELEMENT computertext (#PCDATA | %ParagraphContent;)*>
<!ATTLIST computertext
%a-group-CommonIDAttrs;>
.
Defined in DTD section
Block-level Content : Paragraphs
General Attributes (shared with other elements)