If you want to create a bigger block of verbatim text, just indent it by two spaces more than surronding document (this technique is used to generate most of the inset monospaced (Courier) blocks such as the one that follows).
And the listing follows
function foo(bar) {
a = bar;
return a+3;
}
As can be seen, the code is trivial.
For formal specification writing you may want to use special tag schema
<<schema:
<xs:element name="TITLE">
<xs:complexType mixed="true">
<xs:attributeGroup ref="cb:typeAttributes"/>
</xs:complexType>
</xs:element>
>>
Usually this produces just verbatim output, but may allow some automated processing on the schema.
Similar code and logoutput exist for illustrating program code and logs respectively. All these forms of verbatim output may eventually evolve to support some form of syntax highlighting.