Skip to content

Commit

Permalink
Bump to 24.12.
Browse files Browse the repository at this point in the history
  • Loading branch information
Javier committed Oct 20, 2024
1 parent 1c581a1 commit 2733b8c
Show file tree
Hide file tree
Showing 8 changed files with 88 additions and 41 deletions.
18 changes: 7 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Babel 24.11.65837
## Babel 24.12

(dev)
2024-10-20

`babel` is the multilingual framework to localize documents in
LaTeX, LuaLaTeX, XeLaTeX. It manages culturally-determined
Expand All @@ -10,9 +10,9 @@ languages even work with Plain formats.

The latest stable version is available on <https://ctan.org/pkg/babel>.

Changes in version 24.11 are described in:
Changes in version 24.12 are described in:

https://latex3.github.io/babel/news/whats-new-in-babel-24.11.html
https://latex3.github.io/babel/news/whats-new-in-babel-24.12.html

Apart from the manual, you can find information on some aspects of babel at:

Expand Down Expand Up @@ -48,18 +48,14 @@ respective authors.

### Summary of latest changes
```
24.12 (dev)
24.12 2024-10-20
* Fixes:
- Date sometimes missing with lazy loading.
- Wrong sigma in some Greek numerals.
- Wrong stigma in some Greek numerals.
- Wrong handling of ‘complex’ class options.
* More tools for automated document generation workflows:
- New LaTeX hook: presets.
- New command: \PassOptionsToLocale
24.11 2024-10-05
* Start a thorough review of the manual.
* (lua) Transforms variables.
- New command: \PassOptionsToLocale.
```

### Previous changes
Expand Down
Binary file modified babel-code.pdf
Binary file not shown.
98 changes: 76 additions & 22 deletions babel.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
%
% \iffalse
%<*filedriver>
\ProvidesFile{babel.dtx}[2024/10/19 v24.11.65838 The Babel package]
\ProvidesFile{babel.dtx}%
[2024/10/20 v24.12
The multilingual framework for pdfLaTeX, LuaLaTeX and XeLaTeX]
\documentclass{ltxdoc}
\GetFileInfo{babel.dtx}
\usepackage{fontspec}
Expand Down Expand Up @@ -2988,6 +2990,55 @@ is true with any of these two environment selectors.

Its natural place of use is in hooks or in |\extras<language>|.

\subsection{Presets}

\New{24.12} Apart from configuration files, which are loaded before the
locale files, you can preset some options even before loading \babel.
One on the aims of this feature is to ease the integration with
automated document generation or conversion workflows.

\Describe{\AddToHook\{babel/presets\}}{\marg{settings}}

This \LaTeX{} hook is executed just before locale files (either
\texttt{ini} or \texttt{ldf}) are loaded. It’s in fact, similar to the
config files, but it’s executed a little later and there is no need to
a separate file. The following command has been devised for this hook,
but other candidates are |\AfterBabelLanguage| and |\DeclareOption|
(although the latter can be somewhat dangerous).

Note these declarations are valid ‘just in case’. If \babel{} is not
loaded, they are ignored.

\Describe{\PassOptionsToLocale}{\marg{option-list}\marg{locale-name}}

Its purpose is what its name suggests, and it was devised to be used
with the previous hook.

\begin{example}
You are writing a class and expect lazy loading of secondary
languages. You also want to make sure |french|, if used, activates
its rules for punctuation spacing, and |malayalam|, if used, maps
digits to the native ones (with \luatex):
\setengine{luatex}
\begin{verbatim}
\AddToHook{babel/presets}{%
\PassOptionsToLocale{transforms=punctuation.space}{french}%
\PassOptionsToLocale{mapdigits}{malayalam}}
\end{verbatim}
If you want to take a step further and force \babel{} to use always
|ini| files in all secondary languages, you can resort to the \LaTeX{}
mechanism to pass options to packages:
\begin{verbatim}
\PassOptionsToPackage{provide+=*}{babel}
\end{verbatim}
\end{example}

\begin{note}
Remember localized fonts are preset, too, with lazy loading. In
the previous example you can set, for example,
|\babelfont[malayalam]{rm}{FreeSerif}|.
\end{note}

\section{Creating a language}

\New{3.10} And what if there is no style for your language or none fits
Expand Down Expand Up @@ -5053,27 +5104,27 @@ to its manual, and remember for short and simple texts you can rely on
\subsection{Related packages}

The following packages can be useful in multilingual contexts (the list
is far from complete):
is far from exhaustive):
\begin{description}
\itemsep=-\parskip
\item[babelbib] Multilingual bibliographies.
\item[biblatex] Programmable bibliographies and citations.
\item[bicaption] Bilingual captions.
\item[csquotes] Logical markup for quotes.
\item[hyphsubst] Selects a different set of patterns for a language.
\item[iflang] Tests correctly the current language.
\item[microtype] Adjusts the typesetting according to
\item[\sffamily babelbib] Multilingual bibliographies.
\item[\sffamily biblatex] Programmable bibliographies and citations.
\item[\sffamily bicaption] Bilingual captions.
\item[\sffamily csquotes] Logical markup for quotes.
\item[\sffamily hyphsubst] Selects a different set of patterns for a language.
\item[\sffamily iflang] Tests correctly the current language.
\item[\sffamily microtype] Adjusts the typesetting according to
some languages (kerning and spacing). Ligatures can be disabled.
Search in its manual for |babel| and |DeclareMicrotypeBabelHook|.
\item[mkpattern] Generates hyphenation patterns.
\item[siunitx] Typesetting of numbers and physical quantities.
\item[substitutefont] Combines fonts in several encodings.
\item[tracklang] Tracks which languages have been requested.
\item[translator] An open platform for packages that need to be
\item[\sffamily mkpattern] Generates hyphenation patterns.
\item[\sffamily siunitx] Typesetting of numbers and physical quantities.
\item[\sffamily substitutefont] Combines fonts in several encodings.
\item[\sffamily tracklang] Tracks which languages have been requested.
\item[\sffamily translator] An open platform for packages that need to be
localized.
\item[ucharclasses] (\xetex) Switches fonts when you switch from one
\item[\sffamily ucharclasses] (\xetex) Switches fonts when you switch from one
Unicode block to another. Note it doesn’t work with RTL scripts.
\item[zhspacing] Spacing for CJK documents in \xetex.
\item[\sffamily zhspacing] Spacing for CJK documents in \xetex.
\end{description}

\subsection{Indexing}
Expand Down Expand Up @@ -5906,8 +5957,8 @@ wouldn’t exist.
% \section{Tools}
%
% \begin{macrocode}
%<<version=24.11.65838>>
%<<date=2024/10/19>>
%<<version=24.12>>
%<<date=2024/10/20>>
% \end{macrocode}
%
% \textbf{Do not use the following macros in \texttt{ldf} files. They
Expand Down Expand Up @@ -6310,8 +6361,10 @@ wouldn’t exist.
%
% \begin{macrocode}
%<*package>
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesPackage{babel}[<@date@> v<@version@> The Babel package]
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{babel}%
[<@date@> v<@version@>
The multilingual framework for pdfLaTeX, LuaLaTeX and XeLaTeX]
% \end{macrocode}
%
% Start with some “private” debugging tools, and then define macros for
Expand Down Expand Up @@ -7809,10 +7862,11 @@ wouldn’t exist.
% \end{macrocode}
%
% Since the following command is meant for a hook (although a \LaTeX
% one), it’s placed here:
% one), it’s placed here.
%
% \begin{macrocode}
\providecommand\PassOptionsToLocale[2]{%
\@namedef{bbl@passto@#2}{#1}}
\bbl@csarg\bbl@add@list{passto@#2}{#1}}
% \end{macrocode}
%
% \subsection{Setting up language files}
Expand Down
5 changes: 1 addition & 4 deletions babel.ins
Original file line number Diff line number Diff line change
Expand Up @@ -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{2024/10/19}
\def\filedate{2024/10/20}
\def\batchfile{babel.ins}
\input docstrip.tex

Expand Down Expand Up @@ -174,9 +174,6 @@

% Compatibility files

\let\minusOption\bblMinus
\let\plusOption\bblPlus

\def\compatfile#1{\file{#1.sty}{\from{bbcompat.dtx}{styfile,#1}}}

\generate{%
Expand Down
Binary file modified babel.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion bbcompat.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
%
% \iffalse
%<*dtx>
\ProvidesFile{bbcompat.dtx}[2024/10/19 v24.]
\ProvidesFile{bbcompat.dtx}[2024/10/20 v24.]
%</dtx>
%
%% File 'bbcompat.dtx'
Expand Down
2 changes: 1 addition & 1 deletion locale/kmr/babel-kmr.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ version = 1.1
date = 2020-06-30
name.local = Kurmancî
name.english = Northern Kurdish
name.babel = kurmanji northernkurdish
name.babel = northernkurdish kurmanji
name.polyglossia = kurdish
tag.bcp47 = kmr
language.tag.bcp47 = kmr
Expand Down
4 changes: 2 additions & 2 deletions testfiles-lua/bbl-340.tlg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
This is a generated file for the LaTeX2e validation system.
Don't change this file in any respect.
\today = 82.64001pt, 7.75pt, 2.24pt
\greeknumeral {1} \greeknumeral {56} \greeknumeral {123987} = 66.87003pt, 7.35pt, 2.24pt
\today = 80.88pt, 7.75pt, 2.24pt
\greeknumeral {1} \greeknumeral {56} \greeknumeral {123987} = 65.11002pt, 7.35pt, 2.24pt
\MakeUppercase {\greeknumeral {1} \greeknumeral {56} \greeknumeral {123987}} = 77.96004pt, 7.35pt, 2.23pt
\today = 103.82pt, 6.94pt, 0.22pt
\MakeUppercase {lupus} = 32.51pt, 7.05pt, 0.22pt
Expand Down

0 comments on commit 2733b8c

Please sign in to comment.