The markup used to store the text is a logical markup. This mean that every convention used is aimed to represent the logical structure of the document, not the way it is rendered on a PDF or on an HTML page. If the output looks broken, it’s a problem which must be fixed on the software side, not on the text side.
