summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty')
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty22
1 files changed, 13 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty
index bbf68b78646..0cdd5c2bbcf 100644
--- a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty
+++ b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty
@@ -237,16 +237,20 @@
\cs_new:Npn \seq_format:Nn #1#2
{
\tl_to_str:f
- { \__str_format_seq:of {#1} { \__str_format_parse:n {#2} } }
+ {
+ \__str_format_seq:ff { \exp_after:wN \__str_format_seq_extract:w #1 }
+ { \__str_format_parse:n {#2} }
+ }
}
\cs_generate_variant:Nn \seq_format:Nn { c }
+\cs_new:Npn \__str_format_seq_extract:w \s__seq #1 \s_obj_end { \exp_stop_f: #1 }
\cs_new:Npn \__str_format_seq:nn #1#2
{
\__str_format_seq_loop:nnNn { } {#2}
#1
{ ? \__str_format_seq_end:w } { }
}
-\cs_generate_variant:Nn \__str_format_seq:nn { of }
+\cs_generate_variant:Nn \__str_format_seq:nn { ff }
\cs_new:Npn \__str_format_seq_loop:nnNn #1#2#3#4
{
\use_none:n #3
@@ -274,7 +278,7 @@
\int_compare:nNnTF {#7} < \c_zero
{ \__str_format_put:nw { - } }
{
- \str_case:nnn {#3}
+ \str_case:nnF {#3}
{
{ ~ } { \__str_format_put:ow { \c_catcode_other_space_tl } }
{ + } { \__str_format_put:nw { + } }
@@ -287,7 +291,7 @@
\__msg_kernel_expandable_error:nnnn
{ str } { invalid-precision-format } {#5} {int}
}
- \str_case:nnn {#6}
+ \str_case:nnF {#6}
{
{ ? } { \__str_format_int:NwnnNNn \use:n }
{ d } { \__str_format_int:NwnnNNn \use:n }
@@ -330,7 +334,7 @@
\token_if_eq_meaning:NNTF 2 #8
{ \__str_format_put:nw { - } }
{
- \str_case:nnn {#3}
+ \str_case:nnF {#3}
{
{ ~ } { \__str_format_put:ow { \c_catcode_other_space_tl } }
{ + } { \__str_format_put:nw { + } }
@@ -341,7 +345,7 @@
\tl_if_empty:nTF {#5}
{ \__str_format_put:nw { { 6} } }
{ \__str_format_put:nw { {#5} } }
- \str_case:nnn {#6}
+ \str_case:nnF {#6}
{
{ e } { \__str_format_fp:wnnnNNw \__str_format_fp_e:wn }
{ f } { \__str_format_fp:wnnnNNw \__str_format_fp_f:wn }
@@ -374,7 +378,7 @@
\group_end:
\cs_new:Npn \__str_format_fp_e:wn \s__fp \__fp_chk:w #1#2#3 ; #4
{
- \int_case:nnn {#1}
+ \int_case:nnF {#1}
{
{0} { \use:nf { 0 . } { \prg_replicate:nn {#4} { 0 } } e 0 }
{2} { inf }
@@ -406,7 +410,7 @@
}
\cs_new:Npn \__str_format_fp_f:wn \s__fp \__fp_chk:w #1#2#3 ; #4
{
- \int_case:nnn {#1}
+ \int_case:nnF {#1}
{
{0} { \use:nf { 0 . } { \prg_replicate:nn {#4} { 0 } } }
{2} { inf }
@@ -428,7 +432,7 @@
}
\cs_new:Npn \__str_format_fp_g:wn \s__fp \__fp_chk:w #1#2 ; #3
{
- \int_case:nnn {#1}
+ \int_case:nnF {#1}
{
{0} { 0 }
{2} { inf }