lute-v3 icon indicating copy to clipboard operation
lute-v3 copied to clipboard

Ignore Lute's soft page break when the page is too short (less than 40%)

Open shetozz opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe.

Currently, if the user manually breaks a page at the right spot, the soft page of lute can produce very short pages because of that.

Describe the solution you'd like

Lute's soft page break should be ignored when the resulting page is shorter than 40% of the min character count.

Additional context

Screenshot from 2024-03-19 14-40-07

shetozz avatar Mar 19 '24 14:03 shetozz

Dev notes:

  • the current code splits by "---", and then does the page splitting. So the code would need to potentially merge the last pages of those subdivisions ...
  • maybe not as tough as I thought it would be :-) -- just needs some test cases.

jzohrab avatar Mar 20 '24 03:03 jzohrab