Skip to content

Commit

Permalink
Start 24.10.
Browse files Browse the repository at this point in the history
  • Loading branch information
Javier committed Aug 30, 2024
1 parent 775ba90 commit 195d47c
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ case, it's advisable to install TeXLive.)

| Version | Most relevant changes
| --- | --- |
| [24.9](news/whats-new-in-babel-24.8.html) | Transforms: `digits.native`, CJK spacing (tentative). |
| [24.10](news/whats-new-in-babel-24.10.html) | `\localename`, `mainlocalename`, `babelhyphenmins` |
| [24.9](news/whats-new-in-babel-24.9.html) | Transforms: `digits.native`, CJK spacing (tentative). |
| [24.8](news/whats-new-in-babel-24.8.html) | `\BabelWrapText` and hook `foreign`. |
| [24.7](news/whats-new-in-babel-24.7.html) | Improved a few locales: Filipino, Geez, etc. |
| [24.6](news/whats-new-in-babel-24.6.html) | Improved transforms: `kern`, `norule`, `after`. |
Expand Down
68 changes: 68 additions & 0 deletions docs/news/whats-new-in-babel-24.10.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# What's new in babel 24.10

**Draft**

## `\localename`, `\mainlocalename`

Consider the following document:
```tex
\documentclass{article}
\usepackage[english]{babel}
\let\savelanguage\languagename
\begin{document}
\savelanguage$=$\languagename?
\ifx\savelanguage\languagename True\else False!?!?\fi
\end{document}
```
Is ‘english’ not the same as ‘english’? As explained in the manual,
there was a bug in `babel` which messed up catcodes. No alternative was
provided, but now there is one: `\localename`. This name follows
the new paradigm in `babel`, based on the concept of ‘locale’.

In addition, there is a new macro named `\mainlocalename`, with the
name of the main language.

## `\babelhyphenmins`

(Under development.)

```tex
\babelhyphenmins*[<language-list>]{<left>}{<right>}[<hyphenationmin>]
```

The rationale behind this new command is the following: hyphenmins are
very often a stylistic choice. There are in fact three possible
sets of values, which I’m going to illustrate with Spanish:

* A technical limit imposed by the patterns, especially when they have
been generated with `patgen`. This limit in Spanish is 1/1, because it
includes patterns like `4b. .b2`. Sadly, this limit is often unknown
or has been lost.
* The ‘traditional’ limit marked by typographical conventions in each
country (very likely the same language). Note sometimes there is not
a single convention even in the same country. In Spanish it’s 2/2.
* The layout. If the text is wide, you can decide to raise the value
to 2/3 or even 3/3.

Now, consider a document written in English with some words in other
languages with lower values (in Greek it’s 1/1!). This will lead to
undesired typographical inconsistencies.

This explains why the language is optional.

The starred version not only adjust the settings in the locales, but
also sets them at once.

In other words, hyphenmins are language dependent only to some extent,
and having a command to deal with them in a more general way can be
useful.

It’s worth noting `\hyphenationmin` is language dependent in the TeX
sense (it depends, globally, on the current `\language`), while
`\righthyphenmin` and `\lefthyphenmin` are not (they depend only on the
group). With this command its value can be unified in the whole
document.




0 comments on commit 195d47c

Please sign in to comment.