diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp-float.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/lwarp/lwarp-float.sty | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-float.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-float.sty index eed8100ed1f..bcb14753da4 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-float.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-float.sty @@ -23,17 +23,21 @@ \newcommand*{\LWR@floatstyle}{plain} \NewDocumentCommand{\newfloat}{m m m o}{% -\IfValueTF{#4}% -{\DeclareFloatingEnvironment[fileext=#3,within=#4]{#1}}% -{\DeclareFloatingEnvironment[fileext=#3]{#1}}% -\csedef{LWR@floatstyle@#1}{\LWR@floatstyle}% -\cslet{listof#1s}\relax% -\cslet{listof#1es}\relax% -\cslet{l@#1}\relax% + \IfValueTF{#4}% + {\DeclareFloatingEnvironment[fileext=#3,within=#4]{#1}}% + {\DeclareFloatingEnvironment[fileext=#3]{#1}}% + \csedef{LWR@floatstyle@#1}{\LWR@floatstyle}% + \cslet{listof#1s}\relax% + \cslet{listof#1es}\relax% + \cslet{l@#1}\relax% } \NewDocumentCommand{\floatname}{m +m}{% - \SetupFloatingEnvironment{#1}{name=#2}% + \def\LWR@tempone{#2}% + \def\LWR@temptwo{\@nameuse{#1name}}% + \ifdefequal{\LWR@tempone}{\LWR@temptwo}{}{% + \SetupFloatingEnvironment{#1}{name=#2}% + }% } \newcommand*{\floatplacement}[2]{% |