News for hackers. Stuff that matters.
Re:Show HN: Justif – Knuth-Plass justification and microtypo... by emil-lp on Wednesday July 22, 2026 @05:38AM (#49004065)
Great work. It looks as the space in "No. 12" is too large. Is it possible to distinguish between space and sentence-end-space?
Re:Show HN: Justif – Knuth-Plass justification and microtypo... by lyall on Wednesday July 22, 2026 @06:06AM (#49004305)
Good eye! The space in "No. 12" would traditionally get a thin space [0] in professionally typeset documents, which is smaller than the standard space used for inter-word and inter-sentence spacing.

The solution here is to fix the sample text itself to use U+202F (NARROW NO-BREAK SPACE,  ). As opposed to the standard width no-break space it currently has for "No. 12" and "Fig. 7".

0: https://en.wikipedia.org/wiki/Thin_space

Re:Show HN: Justif – Knuth-Plass justification and microtypo... by quuxplusone on Wednesday July 22, 2026 @05:42PM (#49013855)
Not quite. A "thin space" is thinner than an ordinary interword space, which in turn is thinner (or at least less stretchy) than an intersentence space. The space in "No. 12" or "Fig. 7" or "Mr. Jones" or "cf. page 5" is by definition an interword space! The problem is that HTML renderers tend to prefer to set it as an intersentence space instead, because they think "." always indicates the end of a sentence. Using   can help; that's like "~" in TeX. TeX also supports a breaking-but-never-intersentence-sized space via "\ " (backslash space), which is what you'd probably want to use in "cf.\ page~5." AFAIK, HTML/Unicode have no equivalent of that.
Re:Show HN: Justif – Knuth-Plass justification and microtypo... by rolandog on Wednesday July 22, 2026 @06:06AM (#49004308)
The "standard" method would be to double space after the end of a sentence. This is how "filling" paragraphs works in org-mode to avoid breaking a line in the middle of an abbreviation.
Re:Show HN: Justif – Knuth-Plass justification and microtypo... by WillAdams on Wednesday July 22, 2026 @08:24AM (#49005645)
No, that's a convention from typing.

The actual approach used by a printer would be to be more generous with spacing material at the end of a sentence.

The relevant TeX commands are \frenchspacing or \nofrenchspacing.