gutenbergtools / ebookmaker

The Project Gutenberg tool to generate EPUBs and other ebook formats.
GNU General Public License v3.0
81 stars 17 forks source link

Unwelcome poetry reflow from .txt #241

Open gbnewby opened 1 week ago

gbnewby commented 1 week ago

My understanding, and some of our documentation, is that adding two spaces at the start a line prevents it from being wrapped, when promoted to HTML5.

In https://www.gutenberg.org/ebooks/74578 unwelcome wrapping is occurring with a poetry fragment starting with:

Maan tomu-uurna:

tulen ja tuhkan taru kiertää sen.

Is this something that recently stopped working in ebm? Or, is our understanding of how to prevent wrapping, for poetry & other content, incorrect?

eshellman commented 1 week ago

No changes in 10 years AFAIK. Looking at the source file, I'm guessing that the plain text parser is interpreting the first few stanzas as verse and the stuff after "Maan" as justified plaintext.

Can't change the plain text parsing behavior. if there's documentation that's wrong, we can correct it.

gbnewby commented 6 days ago

Ok - seems that if lines start with a capital letter, it's not wrapped. If lines start with a lower case letter and there is no blank line, it's wrapped unless there is a blank space between lines.

I'm informing the submitter.

On Mon, Oct 14, 2024 at 7:54 PM Eric Hellman @.***> wrote:

No changes in 10 years AFAIK. Looking at the source file, I'm guessing that the plain text parser is interpreting the first few stanzas as verse and the stuff after "Maan" as justified plaintext.

Can't change the plain text parsing behavior. if there's documentation that's wrong, we can correct it.

— Reply to this email directly, view it on GitHub https://github.com/gutenbergtools/ebookmaker/issues/241#issuecomment-2412703900, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFQRDLSNLMB6WUAU44WNC7LZ3R7VXAVCNFSM6AAAAABP54JLDGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJSG4YDGOJQGA . You are receiving this because you authored the thread.Message ID: @.***>

eshellman commented 6 days ago

The best signal for verse paragraphs in text is: more than one line indented with respect to the first line of the paragraph.

We can improve our css to left justify the verse if that is desired.