summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-03-26 22:56:01 +0000
committerKarl Berry <karl@freefriends.org>2016-03-26 22:56:01 +0000
commitacbc4b3c1d3629ae290305ff7c6056eb83d1151c (patch)
tree59c4ad13167b9bad138b2c231cbd6bc9f2c9c311 /Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty
parent473c539aefe98fc932ea0ed651464b9f91482938 (diff)
l3 (26mar16)
git-svn-id: svn://tug.org/texlive/trunk@40146 c570f23f-e606-0410-a88d-b1316a301751
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.sty59
1 files changed, 27 insertions, 32 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 ab454bf1ad2..961ff91b149 100644
--- a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty
+++ b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty
@@ -46,7 +46,7 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{expl3}
-\GetIdInfo$Id: l3str-format.dtx 6009 2015-09-18 08:09:21Z joseph $
+\GetIdInfo$Id: l3str-format.dtx 6439 2016-03-23 12:03:41Z joseph $
{L3 Experimental string formatting}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -371,42 +371,37 @@
}
\cs_new:Npn \__str_format_fp_round:wn #1 ; #2
{ \__fp_parse:n { round ( #1; , #2 - \__fp_exponent:w #1; ) } }
-\group_begin:
-\char_set_catcode_other:N E
-\tl_to_lowercase:n
+\cs_new:Npn \__str_format_fp_e:wn \s__fp \__fp_chk:w #1#2#3 ; #4
{
- \group_end:
- \cs_new:Npn \__str_format_fp_e:wn \s__fp \__fp_chk:w #1#2#3 ; #4
+ \int_case:nnF {#1}
{
- \int_case:nnF {#1}
- {
- {0} { \use:nf { 0 . } { \prg_replicate:nn {#4} { 0 } } e 0 }
- {2} { inf }
- {3} { nan }
- }
- {
- \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 }
- {#4}
- }
+ { 0 } { \use:nf { 0 . } { \prg_replicate:nn {#4} { 0 } } e 0 }
+ { 2 } { inf }
+ { 3 } { nan }
}
- \cs_new:Npn \__str_format_fp_e_aux:wn
- \s__fp \__fp_chk:w #1#2 #3 #4#5#6#7 ; #8
{
- \__str_format_put:fw { \int_eval:n { #3 - 1 } }
- \__str_format_put:nw { e }
- \int_compare:nNnTF {#8} > \c_sixteen
- {
- \__str_format_put:fw { \prg_replicate:nn { #8 - \c_fifteen } {0} }
- \__str_format_put:fw { \use_none:n #4#5#6#7 }
- }
- {
- \__str_format_put:fw
- { \str_range:nnn { #4#5#6#7 0 } { 2 } { #8 + 1 } }
- }
- \__str_format_put:fw { \use_i:nnnn #4 . }
- \use_none:n \s__stop
+ \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 }
+ {#4}
+ }
+ }
+\cs_new:Npn \__str_format_fp_e_aux:wn
+ \s__fp \__fp_chk:w #1#2 #3 #4#5#6#7 ; #8
+ {
+ \__str_format_put:fw { \int_eval:n { #3 - 1 } }
+ \__str_format_put:nw { e }
+ \int_compare:nNnTF {#8} > \c_sixteen
+ {
+ \__str_format_put:fw { \prg_replicate:nn { #8 - \c_fifteen } {0} }
+ \__str_format_put:fw { \use_none:n #4#5#6#7 }
+ }
+ {
+ \__str_format_put:fw
+ { \str_range:nnn { #4#5#6#7 0 } { 2 } { #8 + 1 } }
}
+ \__str_format_put:fw { \use_i:nnnn #4 . }
+ \use_none:n \s__stop
+ }
}
\cs_new:Npn \__str_format_fp_f:wn \s__fp \__fp_chk:w #1#2#3 ; #4
{