[latex3-commits] [git/LaTeX3-latex3-babel] docs: Updated page on Arabic: calendars, pdftex. (a144927)
Javier
email at dante.de
Tue Dec 27 16:48:22 CET 2022
Repository : https://github.com/latex3/babel
On branch : docs
Link : https://github.com/latex3/babel/commit/a14492763a260ad29a45b456891237d9106c4be2
>---------------------------------------------------------------
commit a14492763a260ad29a45b456891237d9106c4be2
Author: Javier <email at localhost>
Date: Tue Dec 27 16:48:22 2022 +0100
Updated page on Arabic: calendars, pdftex.
>---------------------------------------------------------------
a14492763a260ad29a45b456891237d9106c4be2
docs/guides/locale-arabic.md | 48 ++++++++++++++++++++++++++++--------
docs/news/whats-new-in-babel-3.84.md | 9 ++++---
2 files changed, 43 insertions(+), 14 deletions(-)
diff --git a/docs/guides/locale-arabic.md b/docs/guides/locale-arabic.md
index afbce99..a31e459 100644
--- a/docs/guides/locale-arabic.md
+++ b/docs/guides/locale-arabic.md
@@ -42,6 +42,28 @@ latter to the locale numerals, passed as option to `\babelprovide`:
* `mapdigits` does it at the engine level. This is
usually the preferred method.
+## Calendars
+
+Two calendar are defined: `islamic-civil` (arithmetical) and
+`islamic-umalqura`. Since the main aim is to provide a suitable
+`\today`, and maybe some close dates, data for `islamic-umalqura` just
+cover Hijri ~1435/~1460 (Gregorian ~2014/~2038). They can be adjusted
+with `+`, `-` after the name (and `++`, `--` in the Civil calendar), so
+that, for example, with `islamic-civil+` a day is added.
+
+The default calendar, which applies to `\today`, can be set in the
+following way:
+```tex
+\babelprovide[import, calendar=islamic-civil]{arabic}
+```
+If the default calendar is Gregorian, you can convert and print it as follows:
+```tex
+\localedate[calendar=islamic-civil, convert]{\year}{\month}{\day}
+```
+
+Following the CLDR, the default calendar is `gregorian` in all regions
+except in Saudi Arabia, where it’s `islamic-umalqura`.
+
## Transliteration
The transform `transliteration.dad` applies the transliteration system
@@ -73,19 +95,25 @@ Arabic support in `pdftex`is provided by the [external package
`arabi`](https://ctan.org/pkg/arabi), which has been devised for
documents written in Arabic.
-For a few words or sentences in a non-Arabic document, you may prefer
-to declare a language from scratch in the following way:
+For a few words or sentences (unvowelized) in a non-Arabic document,
+you may prefer to set the language on the fly as shown in the following
+example (≥3.84):
```tex
-\usepackage[bidi=default, english]{babel}
+\documentclass{article}
+
+\usepackage[bidi=default, ngerman]{babel}
\usepackage[LAE, T1]{fontenc}
-\babelprovide{arabic}
-\addto\extrasarabic{\fontencoding{LAE}\selectfont}
-\addto\noextrasarabic{\fontencoding{T1}\selectfont}
+
+\begin{document}
+
+Eine Präposition (\foreignlanguage{arabic}{حرف}) ist per Definition
+\foreignlanguage{arabic}{مبني}.
+
+\end{document}
```
-Then `\foreignlanguage` and `\selectlanguage` can be used in the usual
-manner, but very likely you will need some manual intervention (for
-example, numerals). Sadly, with this procedure text cannot be
-copy-pasted (and `cmap` works only to some extent).
+Very likely you will need some manual intervention (for example,
+numerals). Sadly, with this procedure text cannot be copy-pasted (and
+`cmap` works only to some extent).
## Useful links
diff --git a/docs/news/whats-new-in-babel-3.84.md b/docs/news/whats-new-in-babel-3.84.md
index b793006..da83b38 100644
--- a/docs/news/whats-new-in-babel-3.84.md
+++ b/docs/news/whats-new-in-babel-3.84.md
@@ -57,9 +57,10 @@ English \foreignlanguage{greek}{Ελληνικά} English.
## New option `layout=counters*`
The option `layout=counters` redefines some counters for they to be
-printed in the correct order. Sadly, the added macros are written to
-the `idx` files, which break `makeindex`. The option `counters*` attempts
-to remove the conflicting macros in the following way:
+printed in the correct order in RTL text. Sadly, the added macros are
+written to the `idx` files, which break `makeindex`. The value
+`counters*` (with a star) attempts to remove the conflicting macros in
+the following way:
* `pdftex` and `xetex` pre-expand `\thepage` just before it’s written by
the output routine, so that the expanded string doesn’t include them.
This means the modified `\thepage` is written to the `aux` file, too.
@@ -68,7 +69,7 @@ to remove the conflicting macros in the following way:
## Fixes
-* With 'select.write = omit' the main language wasn’t selected
+* With `select.write = omit` the main language wasn’t selected
in the aux file.
* Incorrect link box in end of line if it is preceded by a non-Arabic
character (#207). Note that, very often, directions in labels and the
More information about the latex3-commits
mailing list.