Programming code
Capture blocks of programming code within a displayText group in lineGroup elements with attribute class="program".
displayText[@class="program"]
If the book style uses a monospaced font to display the code then each lineGroup should have a fontStyle="monospace" attribute.
Printed book
XML
<displayText class="program">
<lineGroup><line>
<monospace>tapply(comp.dat$Fruit,list(comp.</monospace>
</line>
</lineGroup>
<lineGroup><line>
<monospace>dat$Grazing),mean)Grazed Ungrazed</monospace>
</line>
</lineGroup>
<lineGroup><line>
<monospace>67.9405 50.8805</monospace>
</line>
</lineGroup>
</displayText>