CTAN Comprehensive TeX Archive Network

Directory macros/luatex/generic/luavlna


Luavlna, version 0.1i, 2021-03-02


Luavlna is a small package for plain Lua and Lua. In some languages, like Czech or Polish, there should be no single letter words at the line end, according to the typographical norms. There exists some external commands (like vlna) or packages (encxvlna for enc, xevlna for , impnattypo for Lua).

Other feature of this package is including of non-breakable space after initials, like in personal names, after or before academic degrees and between numbers and units (SI and others).

The code is modified version of Patrick Gundlach’s answer on .sx^1. The difference is that it is possible to specify which single letters should be taken into account for different languages. The support for degrees and units was added as well.


The usage is simple:

\input ucode
%% in the case of luacsplain, use instead:
%% \chyph
%% but language code for Czech is different than in LaTeX or normal 
%% LuaTeX, so you will need to set single letters with somethinh like:
%% \singlechars{5}{AIiVvOoUuSsZzKk}
\input luavlna
\input luaotfload.sty
\font\hello={name:Linux Libertine O:+rlig;+clig;+liga;+tlig} at 12pt 
Příliš žluťoučký kůň úpěl ďábelské ódy. 
Text s krátkými souhláskami a samohláskami i dalšími jevy 
z nabídky možností (v textu možnými). 

I začátek odstavce je třeba řešit, i když výskyt zalomení není pravděpodobný.

Co třeba í znaky š diakritikou?

Různé možnosti [v závorkách <i jiných znacích
Podpora iniciál a titulů: M. J. Hegel, Ing. Běháková, Ph.D., Ž. Zíbrt.
Podpora jednotek: 100,5 MN\cdot{}s, 100.5 kJ, 200 µA, $-1$ dag, 12 MiB, 1 m$^3$/s.

It is also possible to use the package with lua, just use


in the preamble.


\singlechars{language name}{letters} 

Enable this feature for certain letters in given language.

Default values:

%% only Czech and Slovak are supported out of the box
\compoundinitials{language name}{compounds}

Declare compound letters for given language. Second argument should be comma separated list of compound letters, in exact form in which they can appear.

Default values:


Turning off language switching

By default, language of the nodes is taken into account. If you want to use settings for one language for a whole document, you can use following command:

	\preventsinglelang{language name}

Turning off processing

If you want to stop processing of the spaces in the document you can use command


To resume processing, use


Debugging commands


Insert debugging marks on/off. Default off.


Michal Hoftich Miro Hrončok


Permission is granted to copy, distribute and/or modify this software under the terms of the Project Public License, version 1.3.


Download the contents of this package in one zip archive (102.1k).

luavlna – Prevent line breaks after single letter words, units, or academic titles

In some languages, like Czech or Polish, there should be no single letter words at the end of a line, according to typographical norms. This package handles such situations using Lua’s callback mechanism. In doing this, the package can detect languages used in the text and insert spaces only in parts of the document where languages requiring this feature are used.

Another feature of this package is the inclusion of non-breakable space after initials (like in personal names), after or before academic degrees, and between numbers and units.

The package supports both plain Lua and Lua.

BTW: “vlna” is the Czech word for “wave” or “curl” and also denotes the tilde which, in , is used for “unbreakable spaces”.

Bug trackerhttps://github.com/michal-h21/luavlna/issues
Version0.1i 2021-03-02
LicensesThe Project Public License 1.3
MaintainerMichal Hoftich
Contained inTeX Live as luavlna
MiKTeX as luavlna
See alsoencxvlna
Guest Book Sitemap Contact Contact Author