[latex3-commits] [latex3/babel] main: New key 'interchar' in \babelprovide. (d26fcfe)
github at latex-project.org
github at latex-project.org
Sun Dec 31 17:36:24 CET 2023
Repository : https://github.com/latex3/babel
On branch : main
Link : https://github.com/latex3/babel/commit/d26fcfeb9512e2700d0a869eb1a49afce56c056f
>---------------------------------------------------------------
commit d26fcfeb9512e2700d0a869eb1a49afce56c056f
Author: Javier <email at localhost>
Date: Sun Dec 31 17:36:24 2023 +0100
New key 'interchar' in \babelprovide.
* And some definitions for French.
>---------------------------------------------------------------
d26fcfeb9512e2700d0a869eb1a49afce56c056f
README.md | 14 ++++------
babel-code.pdf | Bin 641724 -> 643045 bytes
babel.dtx | 41 ++++++++++++++++++++++--------
babel.ins | 2 +-
babel.pdf | Bin 419191 -> 419514 bytes
bbcompat.dtx | 2 +-
locale/fr/babel-canadianfrench.tex | 12 +++++++++
locale/fr/babel-fr-BE.ini | 1 +
locale/fr/babel-fr-CA.ini | 1 +
locale/fr/babel-fr-LU.ini | 1 +
locale/fr/babel-fr.ini | 1 +
locale/fr/babel-french-canada.tex | 34 +++++++++++++++++++++++++
locale/fr/babel-french-canadianfrench.tex | 12 ---------
locale/fr/babel-french-swissfrench.tex | 12 ---------
locale/fr/babel-french.tex | 41 ++++++++++++++++++++++++++++++
locale/fr/babel-swissfrench.tex | 12 +++++++++
locale/gu/babel-gu.ini | 27 +++-----------------
17 files changed, 144 insertions(+), 69 deletions(-)
diff --git a/README.md b/README.md
index def9611..6ce6e33 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-## Babel 3.99
+## Babel 3.99.36567
2023-12-10
@@ -48,6 +48,10 @@ respective authors.
### Summary of latest changes
```
+24.1 2024-01-?? (dev)
+ * New key in \babelprovide: interchar (xe)
+ * Definitions for French interchar=punctuation.space (xe)
+
3.99 2023-12-10
* Spurious space in some cases because of a missing % (introduced
in 3.98).
@@ -57,14 +61,6 @@ respective authors.
lepcha, limbu, lineara, lu, makasar, samaritan, sinteromani,
tainua, tangut, waray.
-3.98 2023-12-06
- * Case mappings in ini files, with new casing variants in the
- Latin locales.
- * New: \ShowLocaleProperties.
- * Improved Persian/Farsi, thanks to Farshad Rasuli
- (@farshadrasuli).
- * In some languages and xetex, the language name was printed with
- the first \foreignlanguage.
```
### Previous changes
diff --git a/babel-code.pdf b/babel-code.pdf
index fad4043..4b90deb 100644
Binary files a/babel-code.pdf and b/babel-code.pdf differ
diff --git a/babel.dtx b/babel.dtx
index aa4c096..8e00241 100644
--- a/babel.dtx
+++ b/babel.dtx
@@ -32,7 +32,7 @@
%
% \iffalse
%<*filedriver>
-\ProvidesFile{babel.dtx}[2023/12/10 v3.99 The Babel package]
+\ProvidesFile{babel.dtx}[2023/12/31 v3.99.36567 The Babel package]
\documentclass{ltxdoc}
\GetFileInfo{babel.dtx}
\usepackage{fontspec}
@@ -5678,8 +5678,8 @@ wouldn’t exist.
% \section{Tools}
%
% \begin{macrocode}
-%<<version=3.99>>
-%<<date=2023/12/10>>
+%<<version=3.99.36567>>
+%<<date=2023/12/31>>
% \end{macrocode}
%
% \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -10202,7 +10202,7 @@ wouldn’t exist.
\bbl at vforeach{captions,date,import,main,script,language,%
hyphenrules,linebreaking,justification,mapfont,maparabic,%
mapdigits,intraspace,intrapenalty,onchar,transforms,alph,%
- Alph,labels,labels*,calendar,date,casing}%
+ Alph,labels,labels*,calendar,date,casing,interchar}%
{\bbl at csarg\let{KVP@##1}\@nnil}%
\global\let\bbl at release@transforms\@empty
\global\let\bbl at release@casing\@empty
@@ -12872,9 +12872,17 @@ wouldn’t exist.
\csname bbl at mod@\CurrentOption\endcsname
\bbl at exp{\\\AtBeginDocument{%
\\\bbl at usehooks@lang{\CurrentOption}{begindocument}{{\CurrentOption}}}}}%
- {\bbl at error{%
+ {\IfFileExists{babel-#1.tex}%
+ {\def\bbl at tempa{%
+ .\\There is a locale ini file for this language.\\%
+ If it’s the main language, try adding `provide=*'\\%
+ to the babel package options}}%
+ {\let\bbl at tempa\empty}%
+ \bbl at error{%
Unknown option '\CurrentOption'. Either you misspelled it\\%
- or the language definition file \CurrentOption.ldf was not found}{%
+ or the language definition file \CurrentOption.ldf\\%
+ was not found%
+ \bbl at tempa}{%
Valid options are, among others: shorthands=, KeepShorthandsActive,\\%
activeacute, activegrave, noconfigs, safe=, main=, math=\\%
headfoot=, strings=, config=, hyphenmap=, or a language name.}}}
@@ -13954,6 +13962,18 @@ wouldn’t exist.
% special case, hyphens are stored as |\bbl at upto|, to deal with ranges.
%
% \begin{macrocode}
+\newcommand\IfBabelIntercharT[1]{%
+ \let\bbl at tempa\@gobble % Assume to ignore
+ \edef\bbl at tempb{\zap at space#1 \@empty}%
+ \ifx\bbl at KVP@interchar\@nnil\else
+ \bbl at replace\bbl at KVP@interchar{ }{,}%
+ \bbl at foreach\bbl at tempb{%
+ \bbl at xin@{,##1,}{,\bbl at KVP@interchar,}%
+ \ifin@
+ \let\bbl at tempa\@firstofone
+ \fi}%
+ \fi
+ \bbl at tempa}
\newcommand\babelcharclass[3]{%
\EnableBabelHook{babel-interchar}%
\bbl at csarg\newXeTeXintercharclass{xeclass@#2@#1}%
@@ -14013,9 +14033,9 @@ wouldn’t exist.
\bbl at exp{\\\bbl at for\\\bbl at tempb{\zap at space#4 \@empty}}{%
\XeTeXinterchartoks
\@nameuse{bbl at xeclass@\bbl at tempa @%
- \bbl at ifunset{bbl at xeclass@\bbl at tempa @#2}{}{#2}}
+ \bbl at ifunset{bbl at xeclass@\bbl at tempa @#2}{}{#2}} %
\@nameuse{bbl at xeclass@\bbl at tempb @%
- \bbl at ifunset{bbl at xeclass@\bbl at tempb @#2}{}{#2}}
+ \bbl at ifunset{bbl at xeclass@\bbl at tempb @#2}{}{#2}} %
= \expandafter{%
\csname bbl at ic@\bbl at kv@label @#2\expandafter\endcsname
\csname\zap at space bbl at xeinter@\bbl at kv@label
@@ -14151,7 +14171,8 @@ wouldn’t exist.
% \subsection{8-bit TeX}
%
% Which start just above, because some code is shared with \xetex. Now,
-% 8-bit specific stuff.
+% 8-bit specific stuff. If just one encoding has been declared, then
+% asume no switching is necessary (1).
%
% \begin{macrocode}
%<*texxet>
@@ -14165,7 +14186,7 @@ wouldn’t exist.
\bbl at foreach\bbl at tempe{%
\def\bbl at tempd{##1}% Save last declared
\advance\count@\@ne}%
- \ifnum\count@>\@ne
+ \ifnum\count@>\@ne % (1)
\getlocaleproperty*\bbl at tempa{#1}{identification/encodings}%
\ifx\bbl at tempa\relax \let\bbl at tempa\@empty \fi
\bbl at replace\bbl at tempa{ }{,}%
diff --git a/babel.ins b/babel.ins
index ab14e5c..4e36f2b 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{2023/12/10}
+\def\filedate{2023/12/31}
\def\batchfile{babel.ins}
\input docstrip.tex
diff --git a/babel.pdf b/babel.pdf
index e17676a..eb34d2a 100644
Binary files a/babel.pdf and b/babel.pdf differ
diff --git a/bbcompat.dtx b/bbcompat.dtx
index 7afefac..df9766d 100644
--- a/bbcompat.dtx
+++ b/bbcompat.dtx
@@ -30,7 +30,7 @@
%
% \iffalse
%<*dtx>
-\ProvidesFile{bbcompat.dtx}[2023/12/10 v3.99]
+\ProvidesFile{bbcompat.dtx}[2023/12/31 v3.99.36567]
%</dtx>
%
%% File 'bbcompat.dtx'
diff --git a/locale/fr/babel-canadianfrench.tex b/locale/fr/babel-canadianfrench.tex
new file mode 100644
index 0000000..cedf0ff
--- /dev/null
+++ b/locale/fr/babel-canadianfrench.tex
@@ -0,0 +1,12 @@
+% This file is part of babel. For further details see:
+% https://www.ctan.org/pkg/babel
+\ifx\BabelBeforeIni\undefined
+ \PackageError{babel}%
+ {This file is a component of babel and cannot\MessageBreak
+ be loaded directly. I'll stop immediately}%
+ {Just use babel as documented.}%
+ \stop
+\fi
+\BabelBeforeIni{fr-CA}{%
+}
+\endinput
\ No newline at end of file
diff --git a/locale/fr/babel-fr-BE.ini b/locale/fr/babel-fr-BE.ini
index c329b51..4b65307 100644
--- a/locale/fr/babel-fr-BE.ini
+++ b/locale/fr/babel-fr-BE.ini
@@ -26,6 +26,7 @@ script.tag.opentype = latn
level = 1
encodings = T1 OT1 LY1
derivate = no
+require.babel = french
[captions]
preface = Préface
diff --git a/locale/fr/babel-fr-CA.ini b/locale/fr/babel-fr-CA.ini
index 9be455a..acfefb6 100644
--- a/locale/fr/babel-fr-CA.ini
+++ b/locale/fr/babel-fr-CA.ini
@@ -26,6 +26,7 @@ script.tag.opentype = latn
level = 1
encodings = T1 OT1 LY1
derivate = no
+require.babel = french-canada
[captions]
preface = Préface
diff --git a/locale/fr/babel-fr-LU.ini b/locale/fr/babel-fr-LU.ini
index 665e0ce..e078206 100644
--- a/locale/fr/babel-fr-LU.ini
+++ b/locale/fr/babel-fr-LU.ini
@@ -26,6 +26,7 @@ script.tag.opentype = latn
level = 1
encodings = T1 OT1 LY1
derivate = no
+require.babel = french
[captions]
preface = Préface
diff --git a/locale/fr/babel-fr.ini b/locale/fr/babel-fr.ini
index c59bed3..94adf41 100644
--- a/locale/fr/babel-fr.ini
+++ b/locale/fr/babel-fr.ini
@@ -25,6 +25,7 @@ script.tag.opentype = latn
level = 1
encodings = T1 OT1 LY1
derivate = no
+require.babel = french
[captions]
preface = Préface
diff --git a/locale/fr/babel-french-canada.tex b/locale/fr/babel-french-canada.tex
index cedf0ff..43351e1 100644
--- a/locale/fr/babel-french-canada.tex
+++ b/locale/fr/babel-french-canada.tex
@@ -9,4 +9,38 @@
\fi
\BabelBeforeIni{fr-CA}{%
}
+
+
+\ifcase\bbl at engine\or\or % XeTeX
+
+% Partly based on babel-french, by Daniel Flipo
+\IfBabelIntercharT{puntuation.space}{%
+ \providecommand{\BabelFrenchGuillemetSpace}{%
+ \leavevmode\nobreak\hskip.8\fontdimen2\font
+ plus.3\fontdimen3\font
+ minus.8\fontdimen4\font\relax}%
+ \providecommand{\BabelFrenchColonSpace}{\nobreakspace}%
+%
+ \babelcharclass{\CurrentOption}{colon}{:}%
+ \babelcharclass{\CurrentOption}{leftguillemet}{«}%
+ \babelcharclass{\CurrentOption}{rightguillemet}{»}%
+ \babelcharclass{\CurrentOption}{opening}{([\{}% just make != default
+%
+ \babelinterchar[label=puntuation.space]{\CurrentOption}%
+ {default, rightguillemet}{colon}{\BabelFrenchColonSpace}%
+ \babelinterchar[label=puntuation.space]{\CurrentOption}%
+ {leftguillemet}{default}{\BabelFrenchGuillemetSpace}%
+ \babelinterchar[label=puntuation.space]{\CurrentOption}%
+ {default}{rightguillemet}{\BabelFrenchGuillemetSpace}%
+%
+% Here boundary means essentialy space:
+ \babelinterchar[label=puntuation.space]{\CurrentOption}%
+ {boundary}{colon}{\ifhmode\unskip\nobreak\fi\BabelFrenchColonSpace}%
+ \babelinterchar[label=puntuation.space]{\CurrentOption}%
+ {leftguillemet}{boundary}{\BabelFrenchGuillemetSpace\ignorespaces}%
+ \babelinterchar[label=puntuation.space]{\CurrentOption}%
+ {boundary}{rightguillemet}{\ifhmode\unskip\fi\BabelFrenchGuillemetSpace}%
+}
+
+\fi
\endinput
\ No newline at end of file
diff --git a/locale/fr/babel-french-canadianfrench.tex b/locale/fr/babel-french-canadianfrench.tex
deleted file mode 100644
index cedf0ff..0000000
--- a/locale/fr/babel-french-canadianfrench.tex
+++ /dev/null
@@ -1,12 +0,0 @@
-% This file is part of babel. For further details see:
-% https://www.ctan.org/pkg/babel
-\ifx\BabelBeforeIni\undefined
- \PackageError{babel}%
- {This file is a component of babel and cannot\MessageBreak
- be loaded directly. I'll stop immediately}%
- {Just use babel as documented.}%
- \stop
-\fi
-\BabelBeforeIni{fr-CA}{%
-}
-\endinput
\ No newline at end of file
diff --git a/locale/fr/babel-french-swissfrench.tex b/locale/fr/babel-french-swissfrench.tex
deleted file mode 100644
index 78f7cc3..0000000
--- a/locale/fr/babel-french-swissfrench.tex
+++ /dev/null
@@ -1,12 +0,0 @@
-% This file is part of babel. For further details see:
-% https://www.ctan.org/pkg/babel
-\ifx\BabelBeforeIni\undefined
- \PackageError{babel}%
- {This file is a component of babel and cannot\MessageBreak
- be loaded directly. I'll stop immediately}%
- {Just use babel as documented.}%
- \stop
-\fi
-\BabelBeforeIni{fr-CH}{%
-}
-\endinput
\ No newline at end of file
diff --git a/locale/fr/babel-french.tex b/locale/fr/babel-french.tex
index b0e3a6e..a53769b 100644
--- a/locale/fr/babel-french.tex
+++ b/locale/fr/babel-french.tex
@@ -9,4 +9,45 @@
\fi
\BabelBeforeIni{fr}{%
}
+
+\ifcase\bbl at engine\or\or % XeTeX
+
+% Partly based on babel-french, by Daniel Flipo
+\IfBabelIntercharT{puntuation.space}{%
+ \providecommand{\BabelFrenchGuillemetSpace}{%
+ \leavevmode\nobreak\hskip.8\fontdimen2\font
+ plus.3\fontdimen3\font
+ minus.8\fontdimen4\font\relax}%
+ \providecommand{\BabelFrenchColonSpace}{\nobreakspace}%
+ \providecommand{\BabelFrenchHighSpace}{%
+ \leavevmode\nobreak\hskip.5\fontdimen2\font\relax}%
+%
+ \babelcharclass{\CurrentOption}{high}{;!?}%
+ \babelcharclass{\CurrentOption}{colon}{:}%
+ \babelcharclass{\CurrentOption}{leftguillemet}{«}%
+ \babelcharclass{\CurrentOption}{rightguillemet}{»}%
+ \babelcharclass{\CurrentOption}{opening}{([\{}% just make != default
+%
+ \babelinterchar[label=puntuation.space]{\CurrentOption}%
+ {default, rightguillemet, high, colon}{high}{\BabelFrenchHighSpace}%
+ \babelinterchar[label=puntuation.space]{\CurrentOption}%
+ {default, rightguillemet, high}{colon}{\BabelFrenchColonSpace}%
+ \babelinterchar[label=puntuation.space]{\CurrentOption}%
+ {leftguillemet}{default}{\BabelFrenchGuillemetSpace}%
+ \babelinterchar[label=puntuation.space]{\CurrentOption}%
+ {default, high}{rightguillemet}{\BabelFrenchGuillemetSpace}%
+%
+% Here boundary means essentialy space:
+ \babelinterchar[label=puntuation.space]{\CurrentOption}%
+ {boundary}{high}{\ifhmode\unskip\nobreak\fi\BabelFrenchHighSpace}%
+ \babelinterchar[label=puntuation.space]{\CurrentOption}%
+ {boundary}{colon}{\ifhmode\unskip\nobreak\fi\BabelFrenchColonSpace}%
+ \babelinterchar[label=puntuation.space]{\CurrentOption}%
+ {leftguillemet}{boundary}{\BabelFrenchGuillemetSpace\ignorespaces}%
+ \babelinterchar[label=puntuation.space]{\CurrentOption}%
+ {boundary}{rightguillemet}{\ifhmode\unskip\fi\BabelFrenchGuillemetSpace}%
+}
+
+\fi
+
\endinput
\ No newline at end of file
diff --git a/locale/fr/babel-swissfrench.tex b/locale/fr/babel-swissfrench.tex
new file mode 100644
index 0000000..78f7cc3
--- /dev/null
+++ b/locale/fr/babel-swissfrench.tex
@@ -0,0 +1,12 @@
+% This file is part of babel. For further details see:
+% https://www.ctan.org/pkg/babel
+\ifx\BabelBeforeIni\undefined
+ \PackageError{babel}%
+ {This file is a component of babel and cannot\MessageBreak
+ be loaded directly. I'll stop immediately}%
+ {Just use babel as documented.}%
+ \stop
+\fi
+\BabelBeforeIni{fr-CH}{%
+}
+\endinput
\ No newline at end of file
diff --git a/locale/gu/babel-gu.ini b/locale/gu/babel-gu.ini
index 39ebfdc..2a798b3 100644
--- a/locale/gu/babel-gu.ini
+++ b/locale/gu/babel-gu.ini
@@ -6,11 +6,12 @@
; * Common Locale Data Repository (license Unicode):
; http://cldr.unicode.org/
; http://unicode.org/copyright.html
+; * With contributions Kuldip Pipaliya (@kuldipem)
[identification]
charset = utf8
-version = 1.10
-date = 2022-09-01
+version = 1.11
+date = 2023-12-26
name.local = ગુજરાતી
name.english = Gujarati
name.babel = gujarati
@@ -48,28 +49,6 @@ also = ઉપરાંત
proof = પુરાવો
glossary =
-[captions.licr]
-preface =
-ref =
-abstract =
-bib =
-chapter = પ્રકરણ
-appendix = અનુસૂચિ
-contents =
-listfigure =
-listtable =
-index = અનુક્રમણિકા
-figure =
-table = ટેબલ
-part = ભાગ
-encl =
-cc =
-headto =
-page = પાનુ
-see = જુઓ
-also = ઉપરાંત
-proof = પુરાવો
-glossary =
[date.gregorian]
date.long = [d] [MMMM], [y]
More information about the latex3-commits
mailing list.