[latex3-commits] [git/LaTeX3-latex3-babel] master: A typo. Two md files. A top image. (2b1d060)

Javier email at dante.de
Wed Feb 24 18:04:53 CET 2021


Repository : https://github.com/latex3/babel
On branch  : master
Link       : https://github.com/latex3/babel/commit/2b1d0600657c52e8795afbb20929e23594eca8d5

>---------------------------------------------------------------

commit 2b1d0600657c52e8795afbb20929e23594eca8d5
Author: Javier <email at localhost>
Date:   Wed Feb 24 18:04:53 2021 +0100

    A typo. Two md files. A top image.


>---------------------------------------------------------------

2b1d0600657c52e8795afbb20929e23594eca8d5
 news-guides/guides/localizing-counters.md          |  19 +++++++++++++++++++
 news-guides/guides/old-and-deprecated-functions.md |  15 +++++++++++++++
 news-guides/media/babel-top.png                    | Bin 0 -> 457286 bytes
 news-guides/news/whats-new-in-babel-3.53.md        |   2 +-
 4 files changed, 35 insertions(+), 1 deletion(-)

diff --git a/news-guides/guides/localizing-counters.md b/news-guides/guides/localizing-counters.md
new file mode 100644
index 0000000..ced28ba
--- /dev/null
+++ b/news-guides/guides/localizing-counters.md
@@ -0,0 +1,19 @@
+# Localizing counters
+
+Some random thoughts.
+
+Localizing counters is far from trivial because their format can be set only with a set of macros clearly having English and a few other languages in mind. 
+
+Some dangerous hacks have been applied previously, such as mapping `\roman` to another counter or converting `\chaptername`, which should be a string, in a sort of function with several arguments. 
+
+Mapping the standard counters makes sense in some cases. For example, `\alph` can be replaced by a counter with a different alphabet, including not only a different script (eg, Devanagari), but also variations in a script (a letter added in Spanish, some of them removed in legal documents in Italian). `\arabic` may be replaced by another set of decimal digits. More doubtful is to replace `\roman` by another counter, even if it's also an additive numeral system, but in many cultures Roman numeral are not used and therefore some replacement can be necessary.
+
+So, I'm investigating several approaches, trying to take into account the fact many classes take some stylistics decisions.
+
+Some ideas:
+
+* Traverse all `\the...` to replace a certain counter by another one. This kind of replacements is technically problematic, but the result is the logical one. For example, `\thefigure` may get converted from `\ifnum\c at chapter>\z@\thechapter.\fi\@arabic\c at figure}` to `\ifnum\c at chapter>\z@\thechapter.\fi\localecounter{mydigits}{figure}}`. An obvious limitation is we must know which `\the...` macros have been defined.
+* Directly redefine `\the<counter>`, technically straightforward, but what if this counter has been redefined by a style? And even worse, some of these macros might be dynamically redefined with hardcodes changes.
+* With CJK languages (and some others), a few sectioning commands must be redefined or patched, because the string `<section name> <section label>` is hardcoded.
+
+Or perhaps treating differently chapters, footnotes, lists, and on so on.
diff --git a/news-guides/guides/old-and-deprecated-functions.md b/news-guides/guides/old-and-deprecated-functions.md
new file mode 100644
index 0000000..1c17216
--- /dev/null
+++ b/news-guides/guides/old-and-deprecated-functions.md
@@ -0,0 +1,15 @@
+# Old and deprecated functions
+
+## Fonts
+
+A couple of tentative macros were provided by `babel` <3.9g with a partial solution for “Unicode” fonts. These macros are now deprecated — use `\babelfont`. A short description follows, for reference:
+* `\babelFSstore{babel-language}` sets the current three   basic families (rm, sf, tt) as the default for the language given.
+* `\babelFSdefault{babel-language}{fontspec-features}` patches `\fontspec` so that the given features are always passed as   the optional argument or added to it (not an ideal solution).
+```
+\setmainfont[Language=Turkish]{Minion Pro}
+\babelFSstore{turkish}
+\setmainfont{Minion Pro}
+\babelFSfeatures{turkish}{Language=Turkish}
+```
+
+
diff --git a/news-guides/media/babel-top.png b/news-guides/media/babel-top.png
new file mode 100644
index 0000000..97a0b23
Binary files /dev/null and b/news-guides/media/babel-top.png differ
diff --git a/news-guides/news/whats-new-in-babel-3.53.md b/news-guides/news/whats-new-in-babel-3.53.md
index 7e2a396..0802408 100644
--- a/news-guides/news/whats-new-in-babel-3.53.md
+++ b/news-guides/news/whats-new-in-babel-3.53.md
@@ -10,7 +10,7 @@ This new feature is related to issue [#111](https://github.com/latex3/babel/issu
 
 ## `\babelprovide` with `ldf` files
 
-Until now, `\babelprovide` was not allowed without the optional argument when the language was loaded as the `ldf` file. However, now some `ini` files provide additional features which can be useful, like [counters](whats-new-in-babel-3.41). Therefore, this restriction has been lifted.
+Until now, `\babelprovide` was not allowed without the optional argument when the language was loaded as the `ldf` file. However, now some `ini` files provide additional features which can be useful, like [counters](whats-new-in-babel-3.41.md). Therefore, this restriction has been lifted.
 
 See also: [Using `\babelprovide` to modify or extend locales](../guides/using-babelprovide-to-modify-or-extend-locales.md).
 





More information about the latex3-commits mailing list.