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.sty44
1 files changed, 24 insertions, 20 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 855c67ce144..d23bafdc9a2 100644
--- a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty
+++ b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty
@@ -20,7 +20,7 @@
%%
%% File: l3str-format.dtx Copyright (C) 2012-2018 The LaTeX3 Project
\RequirePackage{expl3}
-\ProvidesExplPackage{l3str-format}{2018/03/05}{}
+\ProvidesExplPackage{l3str-format}{2018-04-30}{}
{L3 Experimental string formatting}
\cs_generate_variant:Nn \use:nn { nf }
\cs_generate_variant:Nn \use:nnn { fnf }
@@ -30,26 +30,26 @@
\if_int_compare:w 9 < 1 #1 \exp_stop_f:
\prg_return_true: \else: \prg_return_false: \fi:
}
-\cs_new:Npn \__str_format_put:nw #1 #2 \s__stop { #2 \s__stop #1 }
+\cs_new:Npn \__str_format_put:nw #1 #2 \s_stop { #2 \s_stop #1 }
\cs_generate_variant:Nn \__str_format_put:nw { o , f }
\prg_new_conditional:Npnn \__str_format_if_in:nN #1#2 { TF }
{
\__str_format_if_in_aux:NN #2 #1
- { #2 \prg_return_false: \exp_after:wN \__prg_break: \else: }
- \__prg_break_point:
+ { #2 \prg_return_false: \exp_after:wN \prg_break: \else: }
+ \prg_break_point:
}
\cs_new:Npn \__str_format_if_in_aux:NN #1#2
{
\if_charcode:w #1 #2
\prg_return_true:
- \exp_after:wN \__prg_break:
+ \exp_after:wN \prg_break:
\fi:
\__str_format_if_in_aux:NN #1
}
\cs_new:Npn \__str_format_parse:n #1
{
\exp_last_unbraced:Nf \__str_format_parse_auxi:NN
- \__str_to_other:n {#1} \s__stop \s__stop {#1}
+ { \__kernel_str_to_other:n {#1} } \s_stop \s_stop {#1}
}
\cs_new:Npx \__str_format_parse_auxi:NN #1#2
{
@@ -94,11 +94,11 @@
}
\cs_new:Npn \__str_format_parse_auxvii:nN #1#2
{
- \token_if_eq_meaning:NNTF \s__stop #2
+ \token_if_eq_meaning:NNTF \s_stop #2
{ \__str_format_parse_end:nwn { #1 ? } #2 }
{ \__str_format_parse_end:nwn { #1 #2 } }
}
-\cs_new:Npn \__str_format_parse_end:nwn #1 #2 \s__stop \s__stop #3
+\cs_new:Npn \__str_format_parse_end:nwn #1 #2 \s_stop \s_stop #3
{
\tl_if_empty:nF {#2}
{ \__kernel_msg_expandable_error:nnn { str } { invalid-format } {#3} }
@@ -195,13 +195,13 @@
}
}
\__str_format_tl_s:NNnnNNn
- \s__stop
+ \s_stop
}
\cs_new:Npn \__str_format_tl_s:NNnnNNn #1#2#3#4#5#6#7
{
\exp_args:Nc \exp_args:Nf
{ __str_format_align_#6:nnnN }
- { \exp_args:Nf #2 { \__str_to_other:n {#7} } #3 }
+ { \exp_args:Nf #2 { \__kernel_str_to_other:n {#7} } #3 }
{ }
{#4} #5
}
@@ -275,9 +275,9 @@
{ str } { invalid-style-format } {#6} { int }
\__str_format_int:NwnnNNn \use:n
}
- \s__stop {#7}
+ \s_stop {#7}
}
-\cs_new:Npn \__str_format_int:NwnnNNn #1#2 \s__stop #3#4#5#6#7
+\cs_new:Npn \__str_format_int:NwnnNNn #1#2 \s_stop #3#4#5#6#7
{
\exp_args:Nc \exp_args:Nf
{ __str_format_align_#6:nnnN }
@@ -328,11 +328,11 @@
{ str } { invalid-style-format } {#6} { fp }
\__str_format_fp:wnnnNNw \__str_format_fp_g:wn
}
- \s__stop
+ \s_stop
\s__fp \__fp_chk:w #7 #8
}
\cs_new:Npn \__str_format_fp:wnnnNNw
- #1 \s__stop #2 #3 #4 #5#6 #7 ;
+ #1 \s_stop #2 #3 #4 #5#6 #7 ;
{
\exp_args:Nc \exp_args:Nf
{ __str_format_align_#6:nnnN }
@@ -352,7 +352,7 @@
}
{
\exp_last_unbraced:Nf \__str_format_fp_e_aux:wn
- \__str_format_fp_round:wn \s__fp \__fp_chk:w #1#2#3 ; { #4 + 1 }
+ { \__str_format_fp_round:wn \s__fp \__fp_chk:w #1#2#3 ; { #4 + 1 } }
{#4}
}
}
@@ -371,7 +371,7 @@
{ \str_range:nnn { #4#5#6#7 0 } { 2 } { #8 + 1 } }
}
\__str_format_put:fw { \use_i:nnnn #4 . }
- \use_none:n \s__stop
+ \use_none:n \s_stop
}
\cs_new:Npn \__str_format_fp_f:wn \s__fp \__fp_chk:w #1#2#3 ; #4
{
@@ -383,8 +383,10 @@
}
{
\exp_last_unbraced:Nf \__str_format_fp_f_aux:wwwn
- \fp_to_decimal:n
- { abs ( round ( \s__fp \__fp_chk:w #1#2#3 ; , #4 ) ) }
+ {
+ \fp_to_decimal:n
+ { abs ( round ( \s__fp \__fp_chk:w #1#2#3 ; , #4 ) ) }
+ }
. . ;
{#4}
}
@@ -405,8 +407,10 @@
}
{
\exp_last_unbraced:Nf \__str_format_fp_g_aux:wn
- \__str_format_fp_round:wn \s__fp \__fp_chk:w #1#2 ;
- { \int_max:nn {1} {#3} }
+ {
+ \__str_format_fp_round:wn \s__fp \__fp_chk:w #1#2 ;
+ { \int_max:nn {1} {#3} }
+ }
{ \int_max:nn {1} {#3} }
}
}