Whitespace handling

Custom content is processed as follows before it is sent to the typesetting input stream:

  • successive spaces are collapsed to a single space;

  • line breaks and tabs are ignored.

Thus you can use spaces to separate words as usual, whereas newlines and tabs can be used to format the custom content without introducing unwanted spaces into the output document. If you need to specify a literal space at the beginning or end of a line, you can use the <space/> command to make the presence of the space clear.

Any custom content emitted by a mapping is regarded as part of the ‘content’ of the tag. This means that the handling of white space is influenced by the content model applied to the element being mapped.