michal-h21 / luavlna

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

The 'a' occurs at the end of lines and there is no way to alter the characters that shouldn't be at the end of the line. #10

Closed ruzito closed 3 years ago

ruzito commented 3 years ago

Hi, I'm trying to write a thesis in LuaLaTeX from TeXLive 2020 in Overleaf and I'm having problems with stranded 'a' at the ends of lines. I was surprised not to see it as an issue here as it's a very common character. I believe it is a forgotten 'a' in the defaults \singlechars{czech}{AIiVvOoUuSsZzKk}. But another problem is, that i cannot change it with that command myself it just doesn't do anything.

This code:

\documentclass{article}

% Both of these work the same
%           |
%           V

% \usepackage{polyglossia}
% \setdefaultlanguage{czech}
% \singlechars{czech}{AaIiVvOoUuSsZzKk}

\usepackage[czech]{babel}
\usepackage{luavlna}
\singlechars{czech}{AaIiVvOoUuSsZzKk}

%           ^
%           |

\begin{document}

\section*{'a' at the end of sentence and no way to alter}

First unindented para

Xxxxxx xxxxx xxx xxxxx xxxx xxx xxxxx xx xxxxx xxxxx
xxxxx xx xx xxxxx xxxxxxx xxxxxxx xxx xx xxx xx xxxxx xxxxx
zaznamenanými fakty a událostmi xxx

Xxxxxx xxxxx xxx xxxxx xxxx xxx xxxxx xx xxxxx xxxxx
xxxxx xx xx xxxxx xxxxxxx xxxxxxx xxx xx xxx xx xxxxx xxxxx
zaznamenanými fakty i událostmi xxx

\end{document}

Produces this output:

image

According to Zalomení řádků a nevhodné výrazy na jejich konci the 'a' letter should behave the same as 'i' letter in the example.

ruzito commented 3 years ago

So i found out that both cases are valid for 'a' being in the list and for 'a' not being in the list. But still the \singlechars command has no effect which keeps me from closing this issue.

michal-h21 commented 3 years ago

Hi, Luavlna sets the default values for single chars after end of the preamble. If you want to pass your own values, you have two options:

  1. use \usepackage[defaults=false]{luavlna}. It will prevent setting of the default values, so your settings won't be overridden.
  2. move \singlechars{czech}{AaIiVvOoUuSsZzKk} after \begin{document}. It will overwrite the default Luavlna settings.
ruzito commented 3 years ago

Oh OK thank you :-)