Constraining LLMs for Perfect Monospace Text Formatting
Typesetting is notoriously hard to do well. This is especially true when typesetting fully justified text, i.e., text that is aligned to both the left and right margins of a column. It’s all too easy to end up with large spaces between words, giving an ugly appearance, for example: