Skip to content

[Enhancement Proposal] Advanced Text Justification with LaTeX-like Microtype Adjustments #181

@Opussci

Description

@Opussci

Proposal:

As a follow-up to the earlier justification request (#21) where default CSS justification was implemented, I’d like to propose an additional enhancement for advanced text justification akin to LaTeX’s professional typesetting standards.

Rationale:

LaTeX’s justification algorithms, combined with the microtype package, are highly regarded in scientific and academic publishing for their ability to produce optically balanced text with subtle adjustments to spacing, kerning, and hyphenation. While CSS text-align: justify provides basic justification, it lacks the refinements that prevent "rivers" of whitespace or uneven word spacing, all common issues in dense, technical documents, especially if multi-column.

Solution:
Please investigate integrating a JavaScript library like microtype (demo) as an optional justification method alongside the default CSS. This would allow users to enable LaTeX-grade justification where typographic quality is critical (e.g., scientific articles, formal reports).

Why this matters:

LaTeX’s justification is the gold standard for journals and books.

Microtype Enhancements, like optical margins, improve visual texture and are must must-have functionality with any desktop publishing software, i.e., InDesign.

Outcome:
Evaluate the feasibility of integrating such a library. If possible, this would elevate the project’s typesetting capabilities significantly, to be on par with LaTeX and as an alternative to all desktop publishing tools, like InDesign, which is used for the majority of professional typesetting tasks today.

Assess performance trade-offs, if some exist, implement this feature like a User Choice: Make this an opt-in feature for those who prioritize typography over performance (since JS-based justification may have overhead), toggle in settings (e.g., justification: "css" | "microtype").

Thank you for considering!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions