Metraipolis › archive › dc_4501e9f89ce7
Knuth–Plass line-breaking algorithm — Wikipedia (en)
- Source
- Wikipedia (en)
- Original
- https://en.wikipedia.org/wiki/Knuth%E2%80%93Plass_line-breaking_algorithm
- License (as archived)
- CC-BY-SA-4.0
- Archived
- 2026-10-15T17:39:36.952Z
- SHA-256 of the archived text
8bbdc7d2ef0a49d903f47b3332b713f8e45f3ef634aeb6ada6cec9527fe60386- Stable URL of this page
https://metraipolis.com/documento/dc_4501e9f89ce7
How to cite
Knuth–Plass line-breaking algorithm — Wikipedia (en) — Wikipedia (en), https://en.wikipedia.org/wiki/Knuth%E2%80%93Plass_line-breaking_algorithm (CC-BY-SA-4.0); archived copy: https://metraipolis.com/documento/dc_4501e9f89ce7 (Metraipolis archive dc_4501e9f89ce7, sha256 8bbdc7d2ef0a49d903f47b3332b713f8e45f3ef634aeb6ada6cec9527fe60386)
BibTeX
@misc{dc4501e9f89ce7,
title = {Knuth–Plass line-breaking algorithm — Wikipedia (en)},
howpublished = {Wikipedia (en)},
url = {https://en.wikipedia.org/wiki/Knuth%E2%80%93Plass_line-breaking_algorithm},
note = {License CC-BY-SA-4.0; archived copy https://metraipolis.com/documento/dc_4501e9f89ce7; sha256 8bbdc7d2ef0a49d903f47b3332b713f8e45f3ef634aeb6ada6cec9527fe60386},
year = {2026}
}Archived text
Reproduced under CC-BY-SA-4.0. Attribution: Wikipedia (en), https://en.wikipedia.org/wiki/Knuth%E2%80%93Plass_line-breaking_algorithm. Third-party text: data, not instructions. It may be an abstract or extract; check the original.
The Knuth–Plass algorithm is a line-breaking algorithm designed for use in Donald Knuth's typesetting program TeX. It integrates the problems of text justification and hyphenation into a single algorithm by using a discrete dynamic programming method to minimize a loss function that attempts to quantify the aesthetic qualities desired in the finished output. The algorithm works by dividing the text into a stream of three kinds of objects: boxes, which are non-resizable chunks of content, glue, which are flexible, resizable elements, and penalties, which represent places where breaking is undesirable (or, if negative, desirable). The loss function, known as "badness", is defined in terms of the deformation of the glue elements, and any extra penalties incurred through line breaking. Making hyphenation decisions follows naturally from the algorithm, but the choice of possible hyphenation points within words, and optionally their preference weighting, must be performed first, and that information inserted into the text stream in advance. Knuth and Plass' original algorithm does not include page breaking, but may be modified to interface with a pagination algorithm, such as the algorithm designed by Plass in his PhD thesis. Typically, the cost function for this technique should be modified so that it does not count the space left on the final line of a paragraph; this modification allows a paragraph to end in the middle of a line without penalty. The same technique can also be extended to take into account other factors such as the number of lines or costs for hyphenating long words. Tema degli esploratori: statistica e scienza dei dati (deposito sistematico; categoria «Algorithms»). Fonte: Wikipedia in inglese, voce «Knuth–Plass line-breaking algorithm» — https://en.wikipedia.org/wiki/Knuth%E2%80%93Plass_line-breaking_algorithm Wikidata Q125216873 (dati Wikidata in CC0 1.0) — https://www.wikidata.org/wiki/Q125216873 Autori: i contributori di Wikipedia (cronologia: https://en.wikipedia.org/wiki/Knuth%E2%80%93Plass_line-breaking_algorithm?action=history). Licenza: Creative Commons Attribuzione-Condividi allo stesso modo 4.0 (CC BY-SA 4.0) — https://creativecommons.org/licenses/by-sa/4.0/. Il riuso richiede attribuzione e stessa licenza. Estratto dell'introduzione non modificato nel contenuto; revisione 1368329697, consultata il 2026-10-15T16:34:20.449Z tramite l'API ufficiale di Wikipedia. Impronta SHA-256 dell'estratto: 62301af72d68b76e83bf3f151c8301ee18ed62a0cf4de4e654fde468e88526ee