diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-float.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-float.sty | 41 |
1 files changed, 26 insertions, 15 deletions
diff --git a/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-float.sty b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-float.sty index 8b38e4aedef..a944c944b20 100644 --- a/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-float.sty +++ b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-float.sty @@ -33,8 +33,8 @@ %% %% %% File: latex-lab-float.dtx (C) Copyright 2023 LaTeX Project -\def\ltlabfloatdate{2023-07-20} -\def\ltlabfloatversion{0.81a} +\def\ltlabfloatdate{2024-03-23} +\def\ltlabfloatversion{0.81e} \ProvidesExplPackage {latex-lab-testphase-float} {\ltlabfloatdate} {\ltlabfloatversion} {Code related to the tagging of floats} \prop_new:N \g__tag_float_sect_prop @@ -51,7 +51,7 @@ \seq_map_inline:Nn\g__tag_float_types_seq { \tag_struct_begin:n{tag=##1s,stash} - \prop_gput:Nnx\g__tag_float_sect_prop {##1-struct}{\int_use:N\c@g__tag_struct_abs_int} + \prop_gput:Nne\g__tag_float_sect_prop {##1-struct}{\int_use:N\c@g__tag_struct_abs_int} \tag_struct_end: } } @@ -93,7 +93,7 @@ { \__tag_float_end: \__tag_float_begin: - \MakeLinkTarget[tagstructure]{g__tag_struct_abs_int} + \MakeLinkTarget*{floatstructure.\int_use:N\c@g__tag_struct_abs_int} } } @@ -120,12 +120,12 @@ { \exp_args:Ne \tag_struct_begin:n{tag=float,parent=0\prop_item:No\g__tag_float_sect_prop{\@captype-struct}}% - \prop_gput:Nxx \g__tag_float_sect_prop {\@captype-used}{true} + \prop_gput:Nee \g__tag_float_sect_prop {\@captype-used}{true} } { \tag_struct_begin:n{tag=float} } - \tl_set:Nx\@current@float@struct{\tag_get:n{struct_num}}% + \tl_set:Ne\@current@float@struct{\tag_get:n{struct_num}}% \typeout{Float structure: \@current@float@struct} } @@ -147,7 +147,7 @@ \fi \ifhmode \@bsphack - \@nameuse{__tag_float_stoppar:} %<---end P + \@nameuse{__tag_float_stop_par:}% <---end P \@floatpenalty -\@Mii \else \@floatpenalty-\@Miii @@ -198,7 +198,7 @@ \hsize\columnwidth \@parboxrestore \@floatboxreset - \MakeLinkTarget[tagstructure]{g__tag_struct_abs_int}% + \MakeLinkTarget*{floatstructure.\number\value{g__tag_struct_abs_int}}% }% \def\end@float{% \@endfloatbox @@ -214,7 +214,7 @@ \penalty\@floatpenalty \else \vadjust{\penalty -\@Miv \vbox{}\penalty\@floatpenalty}\@Esphack - \@nameuse{__tag_float_start_par:} %restart P safe here?? + \@nameuse{__tag_float_start_par:}% restart P safe here?? \fi \fi } @@ -234,7 +234,7 @@ \penalty\@floatpenalty \else \vadjust{\penalty -\@Miv \vbox{}\penalty\@floatpenalty}\@Esphack - \@nameuse{__tag_float_start_par:} %restart P safe here?? + \@nameuse{__tag_float_start_par:}% restart P safe here?? \fi \fi \else @@ -246,10 +246,17 @@ \let\@kernel@refstepcounter\refstepcounter %as long it is not in the kernel \def\caption{% \ifx\@captype\@undefined - \@latex@error{\noexpand\caption outside float}\@ehd + \@latex@error{\noexpand\caption\c_space_tl outside~float}\@ehd \expandafter\@gobble \else - \@kernel@refstepcounter\@captype + \tl_if_empty:NTF\@current@float@struct + { + \refstepcounter\@captype + } + { + \@kernel@refstepcounter\@captype + \xdef\@currentHref{floatstructure.\@current@float@struct}% + } \expandafter\@firstofone \fi {\@dblarg{\@caption\@captype}}% @@ -260,14 +267,18 @@ { \long\def\@makecaption#1#2{% \vskip\abovecaptionskip - \xdef\@currentHref{tagstructure.\@current@float@struct}% \tag_stop:n{caption} \sbox\@tempboxa{#1:~#2}% \tag_start:n{caption} \tagtool{para=false} + \tl_if_empty:NT \@current@float@struct + { \tl_set:Ne \@current@float@struct {\tag_get:n{struct_num}} } \tag_struct_begin:n{tag=Caption,parent=\@current@float@struct} - \seq_gpop_right:cN {g__tag_struct_kids_\@current@float@struct _seq}\l__tag_tmpa_tl - \seq_gput_left:cV {g__tag_struct_kids_\@current@float@struct _seq}\l__tag_tmpa_tl + \tag_if_active:T + { + \seq_gpop_right:cN {g__tag_struct_kids_\@current@float@struct _seq}\l__tag_tmpa_tl + \seq_gput_left:cV {g__tag_struct_kids_\@current@float@struct _seq}\l__tag_tmpa_tl + } \ifdim \wd\@tempboxa >\hsize \tag_struct_begin:n{tag=Lbl} \tag_mc_begin:n{} |