michal-h21 / luavlna

Small library for plain luatex for preventing single
7 stars 1 forks source link

Why nobreak space in "2022. Tato" ? #14

Open olsak opened 1 year ago

olsak commented 1 year ago

Hello,

when I upgraded the luavlna package then the commit https://github.com/michal-h21/luavlna/commit/487415bc7f9f3f9530155135fbbe7820ffd842ec was applied in my computer and now paragraphs are created differently. See http://petr.olsak.net/priv/x.pdf (this pdf was created before the mentioned commit) and http://petr.olsak.net/priv/y.pdf (after the commit applied). The first paragraph in the section Uvod is created differently. Note that there is a new nobreak space between "2002." and "Tato". I don't understand why there is such nobreak space.

The consequence of this change is that the page break at the pages 3-4 is very bad. One member of our Academic senate was pointed out this issue when this Annual report was submitted for approval :). I have upgraded my TeXlive just before this version was generated for Academic senate and I have not noticed that.

michal-h21 commented 1 year ago

Thanks for the report. It seems that the issue is that the string with Unicode ranges for letters contained range for numbers. The original regex tested only for letters, so this seems to be the change that caused problems. I've removed the range for numbers in the sources, does it work correctly for you now?

olsak commented 1 year ago

I confirm that your last commit returns the shape of the mentioned paragraph to the previous (correct) state. I.e. the space between "2002." and "Tato" is untouched by luavlna.

michal-h21 commented 1 year ago

Great! I will post the update to CTAN, so the fix should be available in TeX Live soon.