Skip to content

Justify mathematical texts - #337

Closed
ScriptRaccoon wants to merge 2 commits into
mainfrom
improve-math-text-display
Closed

Justify mathematical texts#337
ScriptRaccoon wants to merge 2 commits into
mainfrom
improve-math-text-display

Conversation

@ScriptRaccoon

@ScriptRaccoon ScriptRaccoon commented Aug 16, 2026

Copy link
Copy Markdown
Owner

This PR implements justified text in property proofs (in popups), implication pages, descriptions, and content pages by using the CSS declaration text-align: justify. Justified text is generally not recommended on the web for accessibility reasons (article on this matter), but it is more consistent with the usual layout of mathematical writing, such as in journals, on the arXiv, and on the nLab, and the negative effect of excessive spacing between words is mitigated by enabling hyphenation throughout the body. Headings are excluded from justification and hyphenation.

Proofs in Minimized Popups

Before

1-before

After

1-after

Proofs in Expanded Popups

Before

2-before

After

2-after

Implications

Before

3-before

After

3-after

Content Pages

Before

4-before

After

4-after

Issues

Despite the hyphenation, some sentences still have excessively large spaces between words.

spaces

This seems to happen when the browser does not know how to hyphenate a technical term. In this case, one can use a soft hyphen: replacing subterminal with sub­terminal fixes the issue. However, this is not really scalable.

We also still have the non-trivial issue of formulas being broken across lines (#135).

break

More generally, the text needs to remain readable at every viewport width. This is a significant difference from the layout of a classical paper.

@ScriptRaccoon ScriptRaccoon changed the title Improve display of mathematical texts Justify mathematical texts Aug 16, 2026
@ScriptRaccoon

ScriptRaccoon commented Aug 16, 2026

Copy link
Copy Markdown
Owner Author

Actually I have just decided against this after looking at this paragraph (from foundations.md). The white space is annoying. And it cannot be controlled at all (in a scalable way).

Bildschirmfoto 2026-08-16 um 14 44 46

Arguably, most texts look better with text-align: justify and hyphens: auto, but some do not, and it has a negative effect on a11y. Also, justification does not solve a concrete problem.

@ScriptRaccoon
ScriptRaccoon deleted the improve-math-text-display branch August 16, 2026 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant