[latex3-commits] [git/LaTeX3-latex3-latex3] master: Fix interaction with babel (0689b2b12)
Joseph Wright
joseph.wright at morningstar2.co.uk
Thu Feb 13 22:28:16 CET 2020
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/0689b2b1267f58b04c85d47173d0fdbb3462b5b2
>---------------------------------------------------------------
commit 0689b2b1267f58b04c85d47173d0fdbb3462b5b2
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Thu Feb 13 21:28:16 2020 +0000
Fix interaction with babel
>---------------------------------------------------------------
0689b2b1267f58b04c85d47173d0fdbb3462b5b2
l3kernel/CHANGELOG.md | 3 +++
l3kernel/l3text-case.dtx | 29 ++++++++++++++++++-----------
2 files changed, 21 insertions(+), 11 deletions(-)
diff --git a/l3kernel/CHANGELOG.md b/l3kernel/CHANGELOG.md
index faf70d360..3c1fe7215 100644
--- a/l3kernel/CHANGELOG.md
+++ b/l3kernel/CHANGELOG.md
@@ -7,6 +7,9 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+### Fixed
+- Interaction with some `babel` languages at the start of the document
+
## [2020-02-13]
### Changed
diff --git a/l3kernel/l3text-case.dtx b/l3kernel/l3text-case.dtx
index 944c76da0..e385199c6 100644
--- a/l3kernel/l3text-case.dtx
+++ b/l3kernel/l3text-case.dtx
@@ -1455,22 +1455,29 @@
\AtBeginDocument
{
\group_begin:
- \cs_set_protected:Npn \@@_change_case_setup:NN #1#2
+ \cs_set_protected:Npn \@@_change_case_setup:Nn #1#2
{
\quark_if_recursion_tail_stop:N #1
- \cs_if_exist:cF { c_@@_uppercase_ \token_to_str:N #1 _tl }
+ \tl_if_single_token:nT {#2}
{
- \tl_const:cn { c_@@_uppercase_ \token_to_str:N #1 _tl }
- { #2 }
+ \cs_if_exist:cF
+ { c_@@_uppercase_ \token_to_str:N #1 _tl }
+ {
+ \tl_const:cn
+ { c_@@_uppercase_ \token_to_str:N #1 _tl }
+ { #2 }
+ }
+ \cs_if_exist:cF
+ { c_@@_lowercase_ \token_to_str:N #2 _tl }
+ {
+ \tl_const:cn
+ { c_@@_lowercase_ \token_to_str:N #2 _tl }
+ { #1 }
+ }
}
- \cs_if_exist:cF { c_@@_lowercase_ \token_to_str:N #2 _tl }
- {
- \tl_const:cn { c_@@_lowercase_ \token_to_str:N #2 _tl }
- { #1 }
- }
- \@@_change_case_setup:NN
+ \@@_change_case_setup:Nn
}
- \exp_after:wN \@@_change_case_setup:NN \@uclclist
+ \exp_after:wN \@@_change_case_setup:Nn \@uclclist
\q_recursion_tail ?
\q_recursion_stop
\group_end:
More information about the latex3-commits
mailing list.