diff options
author | Karl Berry <karl@freefriends.org> | 2021-03-03 22:45:51 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-03-03 22:45:51 +0000 |
commit | 5e3b6ab1e8550d779ab486c5d3d6c617e9f9d684 (patch) | |
tree | 12c34d250e3c3c34307f4fb6a0ef3b7b80ae4eaa /Master | |
parent | d5836467755e64c7a9d9dd2d00f9917de7655a2d (diff) |
luavlna (3mar21) (branch)
git-svn-id: svn://tug.org/texlive/branches/branch2020.0@58086 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/luatex/luavlna/README.md | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luavlna/luavlna-doc.pdf | bin | 91253 -> 92289 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luavlna/luavlna-doc.tex | 19 | ||||
-rw-r--r-- | Master/texmf-dist/tex/luatex/luavlna/luavlna.sty | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/luatex/luavlna/luavlna.tex | 29 |
5 files changed, 40 insertions, 14 deletions
diff --git a/Master/texmf-dist/doc/luatex/luavlna/README.md b/Master/texmf-dist/doc/luatex/luavlna/README.md index de38ed0c671..eb5fb3d0d0e 100644 --- a/Master/texmf-dist/doc/luatex/luavlna/README.md +++ b/Master/texmf-dist/doc/luatex/luavlna/README.md @@ -1,4 +1,4 @@ -# Luavlna, version 0.1h, 2021-01-08 +# Luavlna, version 0.1i, 2021-03-02 # Introduction diff --git a/Master/texmf-dist/doc/luatex/luavlna/luavlna-doc.pdf b/Master/texmf-dist/doc/luatex/luavlna/luavlna-doc.pdf Binary files differindex 40cca345466..b37ab16b773 100644 --- a/Master/texmf-dist/doc/luatex/luavlna/luavlna-doc.pdf +++ b/Master/texmf-dist/doc/luatex/luavlna/luavlna-doc.pdf diff --git a/Master/texmf-dist/doc/luatex/luavlna/luavlna-doc.tex b/Master/texmf-dist/doc/luatex/luavlna/luavlna-doc.tex index 20a83ae127d..470822d4acb 100644 --- a/Master/texmf-dist/doc/luatex/luavlna/luavlna-doc.tex +++ b/Master/texmf-dist/doc/luatex/luavlna/luavlna-doc.tex @@ -36,7 +36,7 @@ \section{Introduction} -This is a small package for plain Lua\TeX and Lua\LaTeX. In some languages, like +This is a small package for Plain Lua\TeX and Lua\LaTeX. 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 \verb!vlna!) or packages (\verb!encxvlna! @@ -144,6 +144,20 @@ The \verb|luavlna| package recognizes the following options \item[\texttt{defaults}] -- load default settings. Enabled by default. \end{description} + +\section{Default values} + +Luavlna defines default settings for Czech and Slovak. If you want to disable them, +you can use the \texttt{defaults=false} option for Luavlna package. In Plain Lua\TeX{}, +use: + +\begin{mycode} +\begin{verbatim} +\let\nosingledefaults\relax +\input luavlna +\end{verbatim} +\end{mycode} + \section{Commands} \begin{mycode} @@ -165,6 +179,7 @@ Default values: \end{verbatim} \end{mycode} + %By default, all %single letters are processed, this command can be used to pass a %string of characters, which should be processed only. @@ -224,7 +239,7 @@ settings for one language for a whole document, you can use following command: \subsection{Turning off processing} -If you want to stop processing of the spaces in the document you can use command +If you want to stop the processing of spaces in the document you can use the following command: \begin{mycode} \cmd{\preventsingleoff} diff --git a/Master/texmf-dist/tex/luatex/luavlna/luavlna.sty b/Master/texmf-dist/tex/luatex/luavlna/luavlna.sty index 89e6d475435..31fb0ba4380 100644 --- a/Master/texmf-dist/tex/luatex/luavlna/luavlna.sty +++ b/Master/texmf-dist/tex/luatex/luavlna/luavlna.sty @@ -1,4 +1,4 @@ -\ProvidesPackage{luavlna}[2021-01-08 luavlna] +\ProvidesPackage{luavlna}[2021-03-02 luavlna] \RequirePackage{kvoptions} @@ -23,7 +23,7 @@ \def\enablesplithyphens#1{% \ifcsname l@#1\endcsname% - \typeout{set lang #1, \the\csname l@#1\endcsname} + \typeout{set lang #1, \the\csname l@#1\endcsname}% \directlua{enable_split_hyphens("\the\csname l@#1\endcsname")}% \fi% } diff --git a/Master/texmf-dist/tex/luatex/luavlna/luavlna.tex b/Master/texmf-dist/tex/luatex/luavlna/luavlna.tex index ab47b8d6fcf..dd7415534d8 100644 --- a/Master/texmf-dist/tex/luatex/luavlna/luavlna.tex +++ b/Master/texmf-dist/tex/luatex/luavlna/luavlna.tex @@ -51,7 +51,7 @@ set_compounds = function(lang, compounds) end set_main_language = function(lang) - local langid = languages:get_number(lang) + local langid = get_lang_id(lang) if not langid then return nil, "Cannot find language number for: "..lang end luavlna.set_main_language(langid) end @@ -69,22 +69,33 @@ disable_split_hyphens = function(lang) end } +% the langno library supports both numeric and literal names +% we can try to find the language ID from macros first, if it fails +% we pass the language name to Lua. it will try to find ID in luanguage.dat and other sources +\def\singlecharsgetlang#1{% + \ifcsname lang@#1\endcsname% + \the\csname lang@#1\endcsname% + \else% unknown language macro, let langno library to find it + #1% + \fi% +} + % Set letters which are prevented from breaking \def\singlechars#1#2{% -\directlua{set_singlechars("#1","#2")} + \directlua{set_singlechars("\singlecharsgetlang{#1}","#2")}% } % Define compound initials \def\compoundinitials#1#2{% -\directlua{set_compounds("#1","#2")} + \directlua{set_compounds("\singlecharsgetlang{#1}","#2")}% } % Enable inserting of visual marks for debugging \def\preventsingledebugon{% -\directlua{luavlna.debug(true)} +\directlua{luavlna.debug(true)}% } \def\preventsinglelang#1{% - \directlua{set_main_language("#1")} + \directlua{set_main_language("\singlecharsgetlang{#1}")}% } %\newluatexattribute\preventsinglestatus @@ -94,18 +105,18 @@ end \preventsinglestatus=2 } -\def\preventsingleoff{ +\def\preventsingleoff{% \preventsinglestatus=1 } % Disable inserting of visual marks for dewbugging \def\preventsingledebugoff{% -\directlua{luavlna.debug(false)} +\directlua{luavlna.debug(false)}% } % enable/disable split hyphens for a language -\def\enablesplithyphens#1{\directlua{enable_split_hyphens("#1")}} -\def\disablesplithyphens#1{\directlua{disable_split_hyphens("#1")}} +\def\enablesplithyphens#1{\directlua{enable_split_hyphens("\singlecharsgetlang{#1}")}} +\def\disablesplithyphens#1{\directlua{disable_split_hyphens("\singlecharsgetlang{#1}")}} % disable processing of units or degrees |