diff options
author | Karl Berry <karl@freefriends.org> | 2024-11-01 21:23:08 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-11-01 21:23:08 +0000 |
commit | 7c1ef55261d9d318083e5bb7b51f216a2fc62eba (patch) | |
tree | 9c65da88deb765787dc89b11356b9e66b6c464fa /Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-firstaid.dtx | |
parent | 98a2515429596389ba8b1c7bff761316a53eda7c (diff) |
latex-dev (1nov24)
git-svn-id: svn://tug.org/texlive/trunk@72738 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-firstaid.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-firstaid.dtx | 49 |
1 files changed, 24 insertions, 25 deletions
diff --git a/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-firstaid.dtx b/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-firstaid.dtx index 083cfcdc40b..118baccd797 100644 --- a/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-firstaid.dtx +++ b/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-firstaid.dtx @@ -16,8 +16,8 @@ % % for those people who are interested or want to report an issue. % -\def\ltlabfirstaiddate{2024-10-04} -\def\ltlabfirstaidversion{0.85g} +\def\ltlabfirstaiddate{2024-10-16} +\def\ltlabfirstaidversion{0.85h} %<*driver> \documentclass{l3doc} \EnableCrossrefs @@ -125,6 +125,7 @@ \AddToHook{package/amsthm/after}[latex-lab-testphase-firstaid/amsthm] {\tag_if_active:T{\@@_firstaid_amsthm:}} % \end{macrocode} +% \changes{v0.85h}{2024/10/16}{moved Caption tag into \@begintheorem, tagging issue\#733} % \begin{macrocode} \cs_new_protected:Npn \@@_firstaid_amsthm: { @@ -166,17 +167,27 @@ \def\@begintheorem##1##2[##3]{% % \end{macrocode} % We use the theorem instance. +% \changes{v0.85h}{2024/10/16}{Added pre and post skips tagging/733} % \begin{macrocode} - \UseInstance{blockenv}{theorem}{} + \UseInstance{blockenv}{theorem}{beginsep=\thm@preskip} +% \end{macrocode} +% There is no working key to set the endskip, so we set the skip directly +% similar to what amsthm is doing after the \cs{trivlist}. +% \begin{macrocode} + \skip_set:Nn\l__block_topsepadd_skip { \thm@postskip } % \end{macrocode} % While create the caption/label we disable para-tagging. % \begin{macrocode} \tagpdfparaOff \mode_leave_vertical: % \end{macrocode} -% The anchor for links +% The anchor for links. amsthm allows for unnumbered theorems so we have to test +% for an empty counter. +% \changes{v0.85h}{2024/10/16}{add test if counter is empty tagging/736} % \begin{macrocode} - \MakeLinkTarget{\l__block_thm_current_counter_tl} + \tl_if_empty:NTF \l__block_thm_current_counter_tl + {\MakeLinkTarget[theorem]{}} + {\MakeLinkTarget{\l__block_thm_current_counter_tl}} \group_begin: \normalfont \the\thm@headfont \thm@indent @@ -197,7 +208,10 @@ \@ifempty{##3} {\let\thmnote\@gobble} {\def\thmnote####1{\tag_mc_begin:n{}####1\tag_mc_end:}}% - \thm@swap\swappedhead\thmhead{##1}{##2}{##3}% + \tag_struct_begin:n{tag=Caption} + \thm@swap\swappedhead\thmhead{##1}{##2}{##3}% + \tag_mc_begin:n{}\the\thm@headpunct\tag_mc_end: + \tag_struct_end: \thmheadnl % possibly a newline. \hskip\thm@headsep \group_end: @@ -215,24 +229,17 @@ % to make tagging more easier. % \begin{macrocode} \def\thmhead@plain##1##2##3{% - \tag_struct_begin:n{tag=Caption} \thmname{##1} \thmnumber{ \@ifnotempty{##1}{~}\@upn{##2} }% - \thmnote{\pdffakespace\space{\the\thm@notefont(##3)}} - %moved for easier tagging - \tag_mc_begin:n{}\the\thm@headpunct\tag_mc_end: - \tag_struct_end: + \thmnote{\pdffakespace\space{\the\thm@notefont(##3)}} } \let\thmhead\thmhead@plain \def\swappedhead##1##2##3{% - \tag_struct_begin:n{tag=Caption} \thmnumber{##2} \thmname{\@ifnotempty{##2}{\nobreakspace}##1} \thmnote{\pdffakespace\space{\the\thm@notefont(##3)}} - \tag_mc_begin:n{}\the\thm@headpunct\tag_mc_end: - \tag_struct_end: } \let\swappedhead@plain=\swappedhead % \end{macrocode} @@ -377,7 +384,9 @@ % \subsection{cleveref} % % The cleveref package redefines \cs{@makefntext} and this means that the patches in -% the new footnote code fails. We use a hook instead +% the new footnote code fails. We use a hook instead. +% \changes{v0.85h}{2024/10/16}{Remove redefinition of refstepcounter. It no longer uses +% the hook.} % \begin{macrocode} \AddToHook{package/cleveref/after} { @@ -387,16 +396,6 @@ \protected@edef\cref@currentlabel{% [footnote][\arabic{footnote}][\cref@result]% \p@footnote\@thefnmark}} -% \end{macrocode} -% The second problem is that it redefines \cs{refstepcounter} to use an argument. -% In itself this isn't a problem but as the new definition doesn't grab the arguments -% directly it fails over the generic hook inserted at the end of the definition -% \begin{macrocode} - \RenewDocumentCommand\refstepcounter{om}{% - \IfNoValueTF{#1}% - {\refstepcounter@noarg{#2}}% - {\refstepcounter@optarg[#1]{#2}}% - }% } % \end{macrocode} % |