texlive[76038] Master/texmf-dist: babel-latin (12aug25)

commits+karl at tug.org commits+karl at tug.org
Tue Aug 12 22:20:19 CEST 2025


Revision: 76038
          https://tug.org/svn/texlive?view=revision&revision=76038
Author:   karl
Date:     2025-08-12 22:20:19 +0200 (Tue, 12 Aug 2025)
Log Message:
-----------
babel-latin (12aug25)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/generic/babel-latin/README
    trunk/Master/texmf-dist/doc/generic/babel-latin/latin.pdf
    trunk/Master/texmf-dist/source/generic/babel-latin/latin.dtx
    trunk/Master/texmf-dist/source/generic/babel-latin/latin.ins
    trunk/Master/texmf-dist/tex/generic/babel-latin/ecclesiasticallatin.lua
    trunk/Master/texmf-dist/tex/generic/babel-latin/latin.ldf

Modified: trunk/Master/texmf-dist/doc/generic/babel-latin/README
===================================================================
--- trunk/Master/texmf-dist/doc/generic/babel-latin/README	2025-08-12 20:20:08 UTC (rev 76037)
+++ trunk/Master/texmf-dist/doc/generic/babel-latin/README	2025-08-12 20:20:19 UTC (rev 76038)
@@ -3,8 +3,8 @@
 
 Package author: C. Beccari
 Current maintainer: K. Wehr
-Version: 4.1
-Date: 29th April 2025
+Version: 4.2
+Date: 11th August 2025
 Bug tracker: https://github.com/wehro/babel-latin/issues
 
 The babel-latin package is subject to the LaTeX Project Public License,

Modified: trunk/Master/texmf-dist/doc/generic/babel-latin/latin.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/generic/babel-latin/latin.dtx
===================================================================
--- trunk/Master/texmf-dist/source/generic/babel-latin/latin.dtx	2025-08-12 20:20:08 UTC (rev 76037)
+++ trunk/Master/texmf-dist/source/generic/babel-latin/latin.dtx	2025-08-12 20:20:19 UTC (rev 76038)
@@ -27,13 +27,12 @@
 % The Current Maintainer of this work is Keno Wehr.
 %
 % \fi
-% \CheckSum{1084}
+% \CheckSum{1092}
 % \iffalse
 %    Tell the LaTeX system who we are and write an entry on the transcript.
 %<*driver>
 \ProvidesFile{latin.dtx}
 \documentclass{ltxdoc}
-\usepackage[british]{babel}
 \usepackage{fontspec}
 \usepackage{booktabs}
 \usepackage{metalogo}
@@ -72,7 +71,7 @@
 \title{Babel support for the Latin language}
 \author{Claudio Beccari\and Keno Wehr\thanks{Current maintainer. Please report
 errors to \url{https://github.com/wehro/babel-latin/issues}.}}
-\date{v.\,4.1\quad\today}
+\date{v.\,4.2\quad\today}
 \begin{document}
 \DocInput{latin.dtx}
 \end{document}
@@ -533,6 +532,13 @@
 %    |\shorthandon{^}| before the first occurence of |^| in each
 %    Esperanto/Kurmanji/Slovak text part.
 %
+% \changes{4.2}{2025/08/11}{Document incompatibility with
+%     \package{ucharclasses} package}
+%    \subsection{\package{ucharclasses}}
+%    The \XeTeX\ package \package{ucharclasses} can be used with \babellatin,
+%    but the punctuation spacing for ecclesiastical Latin does not work with
+%    this package.
+%
 %    \section{Plain \TeX}
 % \changes{4.0}{2021/06/27}{Basic support for plain \TeX}
 %    According to the \babel{} manual, the recommended way to load the Latin
@@ -566,7 +572,7 @@
 %     \cs{LatinMarksOff}}
 %    We identify the language definition file.
 %    \begin{macrocode}
-\ProvidesLanguage{latin}[2025-04-29 v4.1 Latin support from the babel system]
+\ProvidesLanguage{latin}[2025-08-11 v4.2 Latin support from the babel system]
 %    \end{macrocode}
 %    The macro |\LdfInit| takes care of preventing that this file is
 %    loaded more than once with the same option, checking the category
@@ -729,21 +735,25 @@
 %
 %    For Unicode-based engines, we also have to take into account characters
 %    with diacritics. We map ú, ū, and ŭ to V with the respective diacritic.
+%    It's not enough to test for \XeLaTeX\ or \LuaLaTeX, because \LuaLaTeX\ 
+%    might be used with the \package{luainputenc} package. We test for Unicode
+%    input the same way the packages \package{hyph-utf8} and
+%    \package{dehyph-exptl} do in their hyphenation pattern loader files.
 % \changes{4.1}{2025/04/29}{Mapping ú, ū, and ŭ to \'{V}, V^^^^0304, and \u{V},
 %    respectively, instead of just V, for \lang{classicallatin} and
 %    \lang{medievallatin} if a Unicode engine is used}
+% \changes{4.2}{2025/08/11}{Ensure compatibility with \package{luainputenc}}
 %    \begin{macrocode}
-  \ExplSyntaxOn
-  \sys_if_engine_opentype:T
-    {
-      \DeclareUppercaseMapping[la-x-classic]{`ú}{\a'{V}}
-      \DeclareUppercaseMapping[la-x-classic]{`ū}{\a={V}}
-      \DeclareUppercaseMapping[la-x-classic]{`ŭ}{\u{V}}
-      \DeclareUppercaseMapping[la-x-medieval]{`ú}{\a'{V}}
-      \DeclareUppercaseMapping[la-x-medieval]{`ū}{\a={V}}
-      \DeclareUppercaseMapping[la-x-medieval]{`ŭ}{\u{V}}
-    }
-  \ExplSyntaxOff
+  \def\babellatin at testengine#1#2!{\def\babellatin at secondarg{#2}}%
+  \babellatin at testengine χ!\relax % that's chi, a 2-byte UTF-8 sequence
+  \ifx\babellatin at secondarg\empty
+    \DeclareUppercaseMapping[la-x-classic]{`ú}{\a'{V}}
+    \DeclareUppercaseMapping[la-x-classic]{`ū}{\a={V}}
+    \DeclareUppercaseMapping[la-x-classic]{`ŭ}{\u{V}}
+    \DeclareUppercaseMapping[la-x-medieval]{`ú}{\a'{V}}
+    \DeclareUppercaseMapping[la-x-medieval]{`ū}{\a={V}}
+    \DeclareUppercaseMapping[la-x-medieval]{`ŭ}{\u{V}}
+  \fi
 \fi
 %    \end{macrocode}
 %    The following \cs{BabelLower} command takes care for the correct
@@ -1313,7 +1323,7 @@
 %    For \XeTeX{} the punctuation spacing will be defined based on five
 %    different character classes: one for question and exclamation marks, one
 %    for colons and semicolons, one for opening and closing guillemets,
-%    respectiveley, and one for opening brackets. Concerning spacing, brackets
+%    respectively, and one for opening brackets. Concerning spacing, brackets
 %    are treated the same way as letter characters in most cases. However, in
 %    strings like “(?)” no spacing is desired before the question mark. So we
 %    need a dedicated character class for opening brackets.
@@ -1480,9 +1490,31 @@
   \else
 %    \end{macrocode}
 %    For \XeTeX{} we have to enable the character classes functionality and
-%    assign the punctuation characters to the character classes.
+%    assign the punctuation characters to the character classes. The character
+%    classes of the punctuation characters are saved because they have to be
+%    restored when changing to another language.
+% \changes{4.2}{2025/08/11}{Save \XeTeX\ character classes when changing to
+%     ecclesiastical Latin}
 %    \begin{macrocode}
     \ifbabellatin at xetex
+      \babel at savevariable\XeTeXinterchartokenstate
+      \babel at savevariable{\XeTeXcharclass`\!}
+      \babel at savevariable{\XeTeXcharclass`\?}
+      \babel at savevariable{\XeTeXcharclass`\‼}
+      \babel at savevariable{\XeTeXcharclass`\⁇}
+      \babel at savevariable{\XeTeXcharclass`\⁈}
+      \babel at savevariable{\XeTeXcharclass`\⁉}
+      \babel at savevariable{\XeTeXcharclass`\‽}
+      \babel at savevariable{\XeTeXcharclass`\;}
+      \babel at savevariable{\XeTeXcharclass`\:}
+      \babel at savevariable{\XeTeXcharclass`\«}
+      \babel at savevariable{\XeTeXcharclass`\»}
+      \babel at savevariable{\XeTeXcharclass`\‹}
+      \babel at savevariable{\XeTeXcharclass`\›}
+      \babel at savevariable{\XeTeXcharclass`\(}
+      \babel at savevariable{\XeTeXcharclass`\[}
+      \babel at savevariable{\XeTeXcharclass`\{}
+      \babel at savevariable{\XeTeXcharclass`\⟨}
       \XeTeXinterchartokenstate = 1
       \XeTeXcharclass `\! \babellatin at qmark@class
       \XeTeXcharclass `\? \babellatin at qmark@class
@@ -1531,24 +1563,6 @@
     \directlua{ecclesiasticallatin.deactivate_spacing()}%
   \else
     \ifbabellatin at xetex
-      \XeTeXcharclass `\! \z@
-      \XeTeXcharclass `\? \z@
-      \XeTeXcharclass `\‼ \z@
-      \XeTeXcharclass `\⁇ \z@
-      \XeTeXcharclass `\⁈ \z@
-      \XeTeXcharclass `\⁉ \z@
-      \XeTeXcharclass `\‽ \z@
-      \XeTeXcharclass `\; \z@
-      \XeTeXcharclass `\: \z@
-      \XeTeXcharclass `\« \z@
-      \XeTeXcharclass `\» \z@
-      \XeTeXcharclass `\‹ \z@
-      \XeTeXcharclass `\› \z@
-      \XeTeXcharclass `\( \z@
-      \XeTeXcharclass `\[ \z@
-      \XeTeXcharclass `\{ \z@
-      \XeTeXcharclass `\⟨ \z@
-      \XeTeXinterchartokenstate = 0
     \else
       \bbl at deactivate{;}%
       \bbl at deactivate{:}%
@@ -1870,8 +1884,8 @@
 %    \begin{macrocode}
 luatexbase.provides_module({
     name        = "ecclesiasticallatin",
-    date        = "2025-04-29",
-    version     = "4.1",
+    date        = "2025-08-11",
+    version     = "4.2",
     description = "babel-latin punctuation spacing for ecclesiastical Latin"
 })
 local add_to_callback     = luatexbase.add_to_callback

Modified: trunk/Master/texmf-dist/source/generic/babel-latin/latin.ins
===================================================================
--- trunk/Master/texmf-dist/source/generic/babel-latin/latin.ins	2025-08-12 20:20:08 UTC (rev 76037)
+++ trunk/Master/texmf-dist/source/generic/babel-latin/latin.ins	2025-08-12 20:20:19 UTC (rev 76038)
@@ -25,7 +25,7 @@
 %%
 %% --------------- start of docstrip commands ------------------
 %%
-\def\filedate{2025-04-29}
+\def\filedate{2025-08-11}
 \def\batchfile{latin.ins}
 \input docstrip.tex
 

Modified: trunk/Master/texmf-dist/tex/generic/babel-latin/ecclesiasticallatin.lua
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel-latin/ecclesiasticallatin.lua	2025-08-12 20:20:08 UTC (rev 76037)
+++ trunk/Master/texmf-dist/tex/generic/babel-latin/ecclesiasticallatin.lua	2025-08-12 20:20:19 UTC (rev 76038)
@@ -32,8 +32,8 @@
 -- 
 luatexbase.provides_module({
     name        = "ecclesiasticallatin",
-    date        = "2025-04-29",
-    version     = "4.1",
+    date        = "2025-08-11",
+    version     = "4.2",
     description = "babel-latin punctuation spacing for ecclesiastical Latin"
 })
 local add_to_callback     = luatexbase.add_to_callback

Modified: trunk/Master/texmf-dist/tex/generic/babel-latin/latin.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel-latin/latin.ldf	2025-08-12 20:20:08 UTC (rev 76037)
+++ trunk/Master/texmf-dist/tex/generic/babel-latin/latin.ldf	2025-08-12 20:20:19 UTC (rev 76038)
@@ -28,7 +28,7 @@
 %% 
 %% Please report errors to: https://github.com/wehro/babel-latin/issues
 %% 
-\ProvidesLanguage{latin}[2025-04-29 v4.1 Latin support from the babel system]
+\ProvidesLanguage{latin}[2025-08-11 v4.2 Latin support from the babel system]
 \LdfInit\CurrentOption{captions\CurrentOption}
 \def\babellatin at classical{classicallatin}
 \def\babellatin at classic{classiclatin}
@@ -109,17 +109,16 @@
 \ifx\fmtname\babellatin at latex
   \DeclareUppercaseMapping[la-x-classic]{`u}{V}
   \DeclareLowercaseMapping[la-x-classic]{`V}{u}
-  \ExplSyntaxOn
-  \sys_if_engine_opentype:T
-    {
-      \DeclareUppercaseMapping[la-x-classic]{`ú}{\a'{V}}
-      \DeclareUppercaseMapping[la-x-classic]{`ū}{\a={V}}
-      \DeclareUppercaseMapping[la-x-classic]{`ŭ}{\u{V}}
-      \DeclareUppercaseMapping[la-x-medieval]{`ú}{\a'{V}}
-      \DeclareUppercaseMapping[la-x-medieval]{`ū}{\a={V}}
-      \DeclareUppercaseMapping[la-x-medieval]{`ŭ}{\u{V}}
-    }
-  \ExplSyntaxOff
+  \def\babellatin at testengine#1#2!{\def\babellatin at secondarg{#2}}%
+  \babellatin at testengine χ!\relax % that's chi, a 2-byte UTF-8 sequence
+  \ifx\babellatin at secondarg\empty
+    \DeclareUppercaseMapping[la-x-classic]{`ú}{\a'{V}}
+    \DeclareUppercaseMapping[la-x-classic]{`ū}{\a={V}}
+    \DeclareUppercaseMapping[la-x-classic]{`ŭ}{\u{V}}
+    \DeclareUppercaseMapping[la-x-medieval]{`ú}{\a'{V}}
+    \DeclareUppercaseMapping[la-x-medieval]{`ū}{\a={V}}
+    \DeclareUppercaseMapping[la-x-medieval]{`ŭ}{\u{V}}
+  \fi
 \fi
 \StartBabelCommands*{classicallatin,classiclatin,medievallatin}{}
   \SetHyphenMap{\BabelLower{`V}{`u}}
@@ -582,6 +581,24 @@
     \directlua{ecclesiasticallatin.activate_spacing()}%
   \else
     \ifbabellatin at xetex
+      \babel at savevariable\XeTeXinterchartokenstate
+      \babel at savevariable{\XeTeXcharclass`\!}
+      \babel at savevariable{\XeTeXcharclass`\?}
+      \babel at savevariable{\XeTeXcharclass`\‼}
+      \babel at savevariable{\XeTeXcharclass`\⁇}
+      \babel at savevariable{\XeTeXcharclass`\⁈}
+      \babel at savevariable{\XeTeXcharclass`\⁉}
+      \babel at savevariable{\XeTeXcharclass`\‽}
+      \babel at savevariable{\XeTeXcharclass`\;}
+      \babel at savevariable{\XeTeXcharclass`\:}
+      \babel at savevariable{\XeTeXcharclass`\«}
+      \babel at savevariable{\XeTeXcharclass`\»}
+      \babel at savevariable{\XeTeXcharclass`\‹}
+      \babel at savevariable{\XeTeXcharclass`\›}
+      \babel at savevariable{\XeTeXcharclass`\(}
+      \babel at savevariable{\XeTeXcharclass`\[}
+      \babel at savevariable{\XeTeXcharclass`\{}
+      \babel at savevariable{\XeTeXcharclass`\⟨}
       \XeTeXinterchartokenstate = 1
       \XeTeXcharclass `\! \babellatin at qmark@class
       \XeTeXcharclass `\? \babellatin at qmark@class
@@ -621,24 +638,6 @@
     \directlua{ecclesiasticallatin.deactivate_spacing()}%
   \else
     \ifbabellatin at xetex
-      \XeTeXcharclass `\! \z@
-      \XeTeXcharclass `\? \z@
-      \XeTeXcharclass `\‼ \z@
-      \XeTeXcharclass `\⁇ \z@
-      \XeTeXcharclass `\⁈ \z@
-      \XeTeXcharclass `\⁉ \z@
-      \XeTeXcharclass `\‽ \z@
-      \XeTeXcharclass `\; \z@
-      \XeTeXcharclass `\: \z@
-      \XeTeXcharclass `\« \z@
-      \XeTeXcharclass `\» \z@
-      \XeTeXcharclass `\‹ \z@
-      \XeTeXcharclass `\› \z@
-      \XeTeXcharclass `\( \z@
-      \XeTeXcharclass `\[ \z@
-      \XeTeXcharclass `\{ \z@
-      \XeTeXcharclass `\⟨ \z@
-      \XeTeXinterchartokenstate = 0
     \else
       \bbl at deactivate{;}%
       \bbl at deactivate{:}%



More information about the tex-live-commits mailing list.