From Newsgroup: comp.text.tex
ram@zedat.fu-berlin.de (Stefan Ram) wrote or quoted:
ram@zedat.fu-berlin.de (Stefan Ram) wrote or quoted:
new_active_list.append( active )
this_line_quality = -adjustment**2
In August 2024, I posted an implementation of TeX's paragraph
algorithm for plain text in Python intended to be used to
generate ragged-right output. I'm still working on this code
and intend to publish the new version of the code once it's
finished. Here is a preliminary report:
Now it's December 2025. In the meantime, I have written code to
parse TeX's hyphenation patterns, and today I combined that code
with my plain-text line breaking code that follows the ideas of
TeX's line breaking algorithm. This is the first output generated:
|In the heart of Berlin, nerd extraordinaire Max dedicated his weekend
|to an epic quest: building the ultimate smart avocado slicer. The device
|not only sliced avocados perfectly but also tweeted its daily avocado
|count and suggested guacamole recipes based on weather data.
|
|As Max proudly demonstrated his invention to a skeptical squirrel in his |backyard, the slicer suddenly launched an avocado pit like a tiny can-
|non rCo right into his neighborrCOs pool. The squirrel chittered, the avoca- |do pit sank, and Max muttered, rCLAt least it didnrCOt hack the Wi-FirCarCY
. So, my code hyphenated "cannon" and "avocado". (It might
even have taken doublehyphendemerits into account, but still
decided to have those two hyphens.)
The code is still not ready to be published, but there is some
progress . . .
--- Synchronet 3.21a-Linux NewsLink 1.2