White space and line breaks in program code
Generally, a monospace font is used when printing source code written in C/C++ or Java. Also, as white space has an important meaning in source code, we cannot discard it when printing. Setting the properties font-family: monospace and white-space: pre; within the tag: <style> will preserve the white space in the code and print the white space and text in monospace.

The following example was made simply by pasting the unchanged program code into an <fo:block>:

void main(void) { printf("Hello, XML world!"); }
white-space: pre; is a shorthand property. It works the same as specifying the following: -ah-linefeed-treatment: preserve; -ah-white-space-treatment: preserve; white-space: nowrap; When white-space: nowrap; is specified, lines will not be wrapped. To wrap lines, specify white-space: normal; (default value).