LaTeX requires something before a line break, so we insert a `~` if no printable content has yet been emitted. Closes #2874.