[latex3-commits] [git/LaTeX3-latex3-babel] master: Fix #126 (again). prehyphenation disabled in verb. Transform for Hindi. (49ee89b)
Javier
email at dante.de
Tue Apr 13 18:07:53 CEST 2021
Repository : https://github.com/latex3/babel
On branch : master
Link : https://github.com/latex3/babel/commit/49ee89b34629682d4ae254fc323b609e51a009e5
>---------------------------------------------------------------
commit 49ee89b34629682d4ae254fc323b609e51a009e5
Author: Javier <email at localhost>
Date: Tue Apr 13 18:07:53 2021 +0200
Fix #126 (again). prehyphenation disabled in verb. Transform for Hindi.
>---------------------------------------------------------------
49ee89b34629682d4ae254fc323b609e51a009e5
README.md | 3 ++-
babel.dtx | 26 +++++++++++++++++++++-----
babel.ins | 2 +-
babel.pdf | Bin 828589 -> 828827 bytes
bbcompat.dtx | 2 +-
locale/hi/babel-hi.ini | 9 +++++++++
6 files changed, 34 insertions(+), 8 deletions(-)
diff --git a/README.md b/README.md
index 28d1723..5c8008c 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-## Babel 3.57.2338
+## Babel 3.57.2341
This package manages culturally-determined typographical (and other)
rules, and hyphenation patterns for a wide range of languages. Many
@@ -51,6 +51,7 @@ respective authors.
- doubleletter.hyphen: Norsk
- oneletter.nobreak: Czech, Slovak
- hyphen.repeat: Czech, Polish, Portuguese, Slovak, Spanish
+ * 'prehyphenation' transforms are disabled in verbatim.
* Fixes:
- \shorthandoff*{^} was not revertible (#126).
diff --git a/babel.dtx b/babel.dtx
index e2bde39..185624c 100644
--- a/babel.dtx
+++ b/babel.dtx
@@ -31,7 +31,7 @@
%
% \iffalse
%<*filedriver>
-\ProvidesFile{babel.dtx}[2021/04/10 v3.57.2338 The Babel package]
+\ProvidesFile{babel.dtx}[2021/04/13 v3.57.2341 The Babel package]
\documentclass{ltxdoc}
\GetFileInfo{babel.dtx}
\usepackage{fontspec}
@@ -4924,8 +4924,8 @@ help from Bernd Raichle, for which I am grateful.
% \section{Tools}
%
% \begin{macrocode}
-%<<version=3.57.2338>>
-%<<date=2021/04/10>>
+%<<version=3.57.2341>>
+%<<date=2021/04/13>>
% \end{macrocode}
%
% \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -9178,7 +9178,7 @@ help from Bernd Raichle, for which I am grateful.
\bbl at csarg\let{shdef@\string#2}\relax}%
\or
\bbl at ifunset{bbl at shdef@\string#2}%
- {\bbl at csarg\let{shdef@\string#2}#2}%
+ {\bbl at withactive{\bbl at csarg\let{shdef@\string#2}}#2}%
{}%
\csname bbl at oricat@\string#2\endcsname
\csname bbl at oridef@\string#2\endcsname
@@ -12111,6 +12111,14 @@ help from Bernd Raichle, for which I am grateful.
\BabelEnsureInfo}
\@namedef{bbl at ADJ@bcp47.toname at off}{%
\bbl at bcptonamefalse}
+\@namedef{bbl at ADJ@prehyphenation.disable at nohyphenation}{%
+ \directlua{ Babel.ignore_pre_char = function(node)
+ return (node.lang == \the\csname l at nohyphenation\endcsname)
+ end }}
+\@namedef{bbl at ADJ@prehyphenation.disable at off}{%
+ \directlua{ Babel.ignore_pre_char = function(node)
+ return false
+ end }}
% TODO: use babel name, override
%
% As the final task, load the code for lua.
@@ -13890,6 +13898,10 @@ end
Babel.fetch_subtext = {}
+ Babel.ignore_pre_char = function(node)
+ return (node.lang == \the\l at nohyphenation)
+ end
+
&% Merging both functions doesn't seen feasible, because there are too
&% many differences.
Babel.fetch_subtext[0] = function(head)
@@ -13913,7 +13925,11 @@ end
if lang == locale or lang == nil then
lang = lang or locale
- word_string = word_string .. unicode.utf8.char(item.char)
+ if Babel.ignore_pre_char(item) then
+ word_string = word_string .. Babel.us_char
+ else
+ word_string = word_string .. unicode.utf8.char(item.char)
+ end
word_nodes[#word_nodes+1] = item
else
break
diff --git a/babel.ins b/babel.ins
index 9349f99..cf9fc7b 100644
--- a/babel.ins
+++ b/babel.ins
@@ -26,7 +26,7 @@
%% and covered by LPPL is defined by the unpacking scripts (with
%% extension .ins) which are part of the distribution.
%%
-\def\filedate{2021/04/10}
+\def\filedate{2021/04/13}
\def\batchfile{babel.ins}
\input docstrip.tex
diff --git a/babel.pdf b/babel.pdf
index 20b74dd..26027a7 100644
Binary files a/babel.pdf and b/babel.pdf differ
diff --git a/bbcompat.dtx b/bbcompat.dtx
index 29df07b..06e7ed6 100644
--- a/bbcompat.dtx
+++ b/bbcompat.dtx
@@ -30,7 +30,7 @@
%
% \iffalse
%<*dtx>
-\ProvidesFile{bbcompat.dtx}[2021/04/10 v3.57.2338]
+\ProvidesFile{bbcompat.dtx}[2021/04/13 v3.57.2341]
%</dtx>
%
%% File 'bbcompat.dtx'
diff --git a/locale/hi/babel-hi.ini b/locale/hi/babel-hi.ini
index a230ec2..173ac50 100644
--- a/locale/hi/babel-hi.ini
+++ b/locale/hi/babel-hi.ini
@@ -203,6 +203,15 @@ superscriptingExponent = ×
alphabetic = क ख ग घ ङ च छ ज झ ञ ट ठ ड ढ ण त थ द ध न प फ ब भ म य र ल व श ष स ह
[transforms.prehyphenation]
+punctuation.space.1.0 = { {a}()|[:;!{?}]() }
+punctuation.space.1.1 = { insert, penalty = 10000 }
+punctuation.space.1.2 = { spacefactor= .6 .3 .3, data = 2 }
+punctuation.space.1.3 = {}
+punctuation.space.2.0 = { {a}()[:;!{?}]() }
+punctuation.space.2.1 = { insert, penalty = 10000 }
+punctuation.space.2.2 = { insert, spacefactor= .6 .3 .3, data = 1 }
+punctuation.space.2.3 = {}
+; == Harvard-Kyoto ==
; Multiletter
transliteration.hk.1.0 = { lRR }
transliteration.hk.1.1 = { string = ॡ }
More information about the latex3-commits
mailing list.