[latex3-commits] [git/LaTeX3-latex3-babel] docs: Better example for attribute in transforms. (48696d4)

Javier email at dante.de
Tue Nov 16 18:12:00 CET 2021


Repository : https://github.com/latex3/babel
On branch  : docs
Link       : https://github.com/latex3/babel/commit/48696d47b484ca27cdea06c602eb6b9305d84978

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

commit 48696d47b484ca27cdea06c602eb6b9305d84978
Author: Javier <email at localhost>
Date:   Tue Nov 16 18:12:00 2021 +0100

    Better example for attribute in transforms.


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

48696d47b484ca27cdea06c602eb6b9305d84978
 docs/guides/locale-greek.md          |  7 +++++--
 docs/news/whats-new-in-babel-3.67.md | 30 +++++++++++++++++++++---------
 2 files changed, 26 insertions(+), 11 deletions(-)

diff --git a/docs/guides/locale-greek.md b/docs/guides/locale-greek.md
index 74901dc..3795a9b 100644
--- a/docs/guides/locale-greek.md
+++ b/docs/guides/locale-greek.md
@@ -5,8 +5,9 @@ needs you may prefer the `ldf` file, currently supported by Günter
 Milde, or the `ini` files.
 
 The support for `pdftex` is based on the non-standard `LGR` encoding,
-which may be a source of issues. It’s strongly recommended to use
-`xetex`  or `luatex`.
+which may be a source of issues (see for example
+[here](https://tex.stackexchange.com/questions/548584/ascii-text-set-in-greek-script-when-using-usepackagegreekbabel)).
+It’s strongly recommended to use `xetex`  or `luatex`.
 
 ## As `ldf`
 
@@ -111,3 +112,5 @@ preserve the default meaning in other languages, you can write:
 * [Can one combine ancient and modern Greek with Babel?](https://tex.stackexchange.com/questions/294828/can-one-combine-ancient-and-modern-greek-with-babel/614278#614278)
 * [Use of Greek language without \textlatin{} \textgreek{} each word](https://tex.stackexchange.com/questions/579780/use-of-greek-language-without-textlatin-textgreek-each-word/579813#579813)
 * [Fontspec / Babel support to some .otf features](https://tex.stackexchange.com/questions/544773/fontspec-babel-support-to-some-otf-features)
+* [Writing in Ancient Greek with babel](https://tex.stackexchange.com/questions/584397/writing-in-ancient-greek-with-babel)
+
diff --git a/docs/news/whats-new-in-babel-3.67.md b/docs/news/whats-new-in-babel-3.67.md
index 5f54567..0fad67e 100644
--- a/docs/news/whats-new-in-babel-3.67.md
+++ b/docs/news/whats-new-in-babel-3.67.md
@@ -26,24 +26,36 @@ an example of how to use this feature:
 
 \usepackage[english]{babel}
 
-\newattribute{\uppervowels}
+\newattribute{\spcexclam} % Unset by default
 
-\babelprehyphenation[attribute=\uppervowels]{english}
-  { ([aeiou]) }
-  { string = {1|aeiou|AEIOU} }
+\babelprehyphenation[attribute=\spcexclam]{english}{ {a}! }{
+  {},
+  { insert, penalty = 10000 },
+  { insert, space=.3 .05 0, data = 1 },
+  {}
+}
+
+\newcommand\withspc[1]{{\setattribute{\spcexclam}{1}#1}}
+\newcommand\withoutspc[1]{{\unsetattribute{\spcexclam}#1}}
 
 \begin{document}
 
-A short text. {\setattribute{\uppervowels}{1}Another short text.} A short text.
+Hello! \withspc{Hello!} Hol\withspc{a!} Hello\withspc{!} Hello!
+
+\setattribute{\spcexclam}{1}
+
+Hello! \withoutspc{Hello!} Hol\withoutspc{a!} Hello\withoutspc{!} Hello!
 
 \end{document}
 ```
-This will print ‘A short text. AnOthEr shOrt tExt. A short text.’
+It will print:
+> Hello! Hello ! Hello ! Hello! Hello!<br>
+> Hello ! Hello! Hello! Hello! Hello !
 
 The transform is applied when the corresponding attribute is set in all
-nodes to be transformed. The ‘context’ in the pattern, that is, the
-characters outside the group `()..()`, when used, are not taken into
-account.
+nodes to be transformed, which explains why there is no space in the
+4th ‘Hello’. The ‘context’ in the pattern, that is, the characters
+outside the group `()..()`, when used, are not taken into account.
 
 
 





More information about the latex3-commits mailing list.