worm-scraper icon indicating copy to clipboard operation
worm-scraper copied to clipboard

Use indented paragraphs instead of blank lines between paragraphs

Open n-zer opened this issue 1 year ago • 2 comments

This is just a suggestion, but the formatting of the original web novel is not ideal for an e-reader as there is a lot of wasted space. Print publications and e-books typically have no spacing in between paragraphs and instead delineate paragraphs with indents like so:

image

This greatly improves readability, especially in dialogue-heavy sections, and can be done fairly trivially by adding a stylesheet:

@charset "utf-8";
/* Styles for Worm */
p{
  text-indent:2em;
  margin-bottom:0px;
  margin-top:0px;
}

Traditionally the first paragraph in a chapter is not indented, but I haven't bothered with this for the few web novels I've reformatted since it requires per-chapter processing and I'm lazy. But for your project it may be worth doing as well.

n-zer avatar Dec 28 '24 08:12 n-zer

This is a good suggestion.

I'm a little hesitant to deviate too much from the original presentation. And I'm a bit disappointed that this kind of typesetting is required on a per-book basis (instead of done automatically by the e-reader's default stylesheet). But we should probably do it. Maybe with an option to turn it off.

Skimming through my Kindle library, I see most are formatted in the way you suggest, with one instance where paragraphs were separated by a small additional margin on top of the line-spacing. (Maybe 0.2em or so.)

I'll work on this when I work on #54, which is another instance of departing from the original presentation to become more book-like.

domenic avatar Dec 28 '24 09:12 domenic

I gave this a quick try. It's not trivial. Your simple version works poorly with the already-indented sections. (The indents today use padding-left: 30px.) For example, Worm Scarab 25.2 looks pretty bad with your proposed stylesheet:

Spoilers, obviously

image

Note also how this uncovers a bad use (in the source) of <br> instead of a paragraph break... We can fix that up via the substitutions system, but I worry about how many more there might be.

I tried something a bit more sophisticated, of

p:not([style]) {
  margin: 0;
}

p:not([style]) + p:not([style]) {
  text-indent: 1em;
}

and it's OK:

Basically the same spoilers

image

Even that worked very poorly in Ward Daybreak 1.8 until I added more missing indents.

I'm a bit hesitant to pull the trigger though, without more testing. Hmm.

domenic avatar Jan 03 '25 07:01 domenic