Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend firstaid for cleveref for gh1560 #1562

Merged
merged 2 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion base/testfiles-lthooks/ltcmdhooks-001.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ All initialized (non-empty) hooks:
package/acro/after -> \__hook_toplevel package/acro/after \FirstAidNeededT {acro}{sty}{....-..-.. v... typeset acronyms and other abbreviations (CN)} {\UseName {prop_new:c}{l__acro_tmpa_prop}\acsetup {patch/longtable=false}}\__hook_next package/acro/after
package/chemformula/before -> \RequirePackage {l3keys2e}\__hook_toplevel package/chemformula/before \__hook_next package/chemformula/before
package/chemnum/after -> \__hook_toplevel package/chemnum/after \FirstAidNeededT {chemnum}{sty}{....-..-.. v... a comprehensive approach for the numbering of chemical compounds (CN)} {\UseName {prop_new:c}{l__chemnum_tmpa_prop}}\__hook_next package/chemnum/after
package/cleveref/after -> \__hook_toplevel package/cleveref/after \FirstAidNeededT {cleveref}{sty}{....-..-.. v... Intelligent cross-referencing} {\def \cref@getref ##1##2{\expandafter \let \expandafter ##2\csname r@##1@cref\endcsname \expandafter \expandafter \expandafter \def \expandafter \expandafter \expandafter ##2\expandafter \expandafter \expandafter {\expandafter \@firstoffive ##2}}\def \cpageref@getref ##1##2{\expandafter \let \expandafter ##2\csname r@##1@cref\endcsname \expandafter \expandafter \expandafter \def \expandafter \expandafter \expandafter ##2\expandafter \expandafter \expandafter {\expandafter \@secondoffive ##2}}\AddToHook {begindocument}[cleveref]{\def \label@noarg ##1{\cref@old@label {##1}\@bsphack \edef \@tempa {{page}{\the \c@page }}\setcounter {page}{1}\edef \@tempb {\thepage }\expandafter \setcounter \@tempa \cref@constructprefix {page}{\cref@result }\protected@write \@auxout {}{\string \newlabel {##1@cref}{{\cref@currentlabel }{[\@tempb ][\arabic {page}][\cref@result ]\thepage }{}{}{}}}\@esphack }\def \label@optarg [##1]##2{\cref@old@label {##2}\@bsphack \edef \@tempa {{page}{\the \c@page }}\setcounter {page}{1}\edef \@tempb {\thepage }\expandafter \setcounter \@tempa \cref@constructprefix {page}{\cref@result }\protected@edef \cref@currentlabel {\expandafter \cref@override@label@type \cref@currentlabel \@nil {##1}}\protected@write \@auxout {}{\string \newlabel {##2@cref}{{\cref@currentlabel }{[\@tempb ][\arabic {page}][\cref@result ]\thepage }{}{}{}}}\@esphack }} \newcommand \firstaid@cref@smugglelabel {\let \cref@currentlabel \cref@gcurrentlabel@temp } \newcommand \firstaid@cref@updatelabeldata [1]{\cref@constructprefix {##1}{\cref@result }\@ifundefined {cref@##1@alias}{\def \@tempa {##1}}{\def \@tempa {\csname cref@##1@alias\endcsname }}\protected@xdef \cref@gcurrentlabel@temp {[\@tempa ][\arabic {##1}][\cref@result ]\csname p@##1\expandafter \endcsname \csname the##1\endcsname }\aftergroup \firstaid@cref@smugglelabel } \AddToHook {label}[firstaid/cleveref] {\ifx \@currentcounter \@empty \else \firstaid@cref@updatelabeldata {\@currentcounter }\fi } }\__hook_next package/cleveref/after
package/cleveref/after -> \__hook_toplevel package/cleveref/after \FirstAidNeededT {cleveref}{sty}{....-..-.. v... Intelligent cross-referencing} {\def \cref@getref ##1##2{\expandafter \let \expandafter ##2\csname r@##1@cref\endcsname \expandafter \expandafter \expandafter \def \expandafter \expandafter \expandafter ##2\expandafter \expandafter \expandafter {\expandafter \@firstoffive ##2}}\def \cpageref@getref ##1##2{\expandafter \let \expandafter ##2\csname r@##1@cref\endcsname \expandafter \expandafter \expandafter \def \expandafter \expandafter \expandafter ##2\expandafter \expandafter \expandafter {\expandafter \@secondoffive ##2}}\AddToHook {begindocument}[cleveref]{\def \label@noarg ##1{\cref@old@label {##1}\@bsphack \edef \@tempa {{page}{\the \c@page }}\setcounter {page}{1}\edef \@tempb {\thepage }\expandafter \setcounter \@tempa \cref@constructprefix {page}{\cref@result }\protected@write \@auxout {}{\string \newlabel {##1@cref}{{\cref@currentlabel }{[\@tempb ][\arabic {page}][\cref@result ]\thepage }{}{}{}}}\@esphack }\def \label@optarg [##1]##2{\cref@old@label {##2}\@bsphack \edef \@tempa {{page}{\the \c@page }}\setcounter {page}{1}\edef \@tempb {\thepage }\expandafter \setcounter \@tempa \cref@constructprefix {page}{\cref@result }\protected@edef \cref@currentlabel {\expandafter \cref@override@label@type \cref@currentlabel \@nil {##1}}\protected@write \@auxout {}{\string \newlabel {##2@cref}{{\cref@currentlabel }{[\@tempb ][\arabic {page}][\cref@result ]\thepage }{}{}{}}}\@esphack }} \newcommand \firstaid@cref@smugglelabel {\let \cref@currentlabel \cref@gcurrentlabel@temp } \newcommand \firstaid@cref@updatelabeldata [1]{\cref@constructprefix {##1}{\cref@result }\@ifundefined {cref@##1@alias}{\def \@tempa {##1}}{\def \@tempa {\csname cref@##1@alias\endcsname }}\protected@xdef \cref@gcurrentlabel@temp {[\@tempa ][\arabic {##1}][\cref@result ]\csname p@##1\expandafter \endcsname \csname the##1\endcsname }\aftergroup \firstaid@cref@smugglelabel } \newif \iftag@ \AddToHook {label}[firstaid/cleveref] {\ifx \@currentcounter \@empty \else \iftag@ \else \firstaid@cref@updatelabeldata {\@currentcounter }\fi \fi } }\__hook_next package/cleveref/after
package/arydshln/after -> \__hook_toplevel package/arydshln/after \FirstAidNeededT {arydshln}{sty}{....-..-.. v... } {\protected \def \adl@@vlineL ##1##2##3##4{\adl@ivline ##4\@nil {##1}{##2}\xdef \adl@colsL {\adl@colsL \@elt {##3}{\number \@tempcnta }{\number \@tempcntb }{\adl@dashcolor }{\adl@gapcolor }}}\protected \def \adl@@vlineR ##1##2##3##4{\adl@ivline ##4\@nil {##1}{##2}\xdef \adl@colsR {\@elt {##3}{\number \@tempcnta }{\number \@tempcntb }{\adl@dashcolor }{\adl@gapcolor }\adl@colsR }}\let \adl@act@@vlineL \adl@@vlineL \let \adl@act@@vlineR \adl@@vlineR }\__hook_next package/arydshln/after
package/l3graphics/after -> \__hook_toplevel package/l3graphics/after \seq_set_from_clist:Nn \l_graphics_search_ext_seq {.pdf,.eps,.ps,.png,.jpg,.jpeg}\__hook_next package/l3graphics/after
cmd/foo/before -> before 1 before 2 \__hook_toplevel cmd/foo/before {#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}{#9}\__hook_next cmd/foo/before {#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}{#9}
Expand Down
2 changes: 1 addition & 1 deletion base/testfiles-lthooks/lthooks-000.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ All initialized (non-empty) hooks:
package/acro/after -> \__hook_toplevel package/acro/after \FirstAidNeededT {acro}{sty}{....-..-.. v... typeset acronyms and other abbreviations (CN)} {\UseName {prop_new:c}{l__acro_tmpa_prop}\acsetup {patch/longtable=false}}\__hook_next package/acro/after
package/chemformula/before -> \RequirePackage {l3keys2e}\__hook_toplevel package/chemformula/before \__hook_next package/chemformula/before
package/chemnum/after -> \__hook_toplevel package/chemnum/after \FirstAidNeededT {chemnum}{sty}{....-..-.. v... a comprehensive approach for the numbering of chemical compounds (CN)} {\UseName {prop_new:c}{l__chemnum_tmpa_prop}}\__hook_next package/chemnum/after
package/cleveref/after -> \__hook_toplevel package/cleveref/after \FirstAidNeededT {cleveref}{sty}{....-..-.. v... Intelligent cross-referencing} {\def \cref@getref ##1##2{\expandafter \let \expandafter ##2\csname r@##1@cref\endcsname \expandafter \expandafter \expandafter \def \expandafter \expandafter \expandafter ##2\expandafter \expandafter \expandafter {\expandafter \@firstoffive ##2}}\def \cpageref@getref ##1##2{\expandafter \let \expandafter ##2\csname r@##1@cref\endcsname \expandafter \expandafter \expandafter \def \expandafter \expandafter \expandafter ##2\expandafter \expandafter \expandafter {\expandafter \@secondoffive ##2}}\AddToHook {begindocument}[cleveref]{\def \label@noarg ##1{\cref@old@label {##1}\@bsphack \edef \@tempa {{page}{\the \c@page }}\setcounter {page}{1}\edef \@tempb {\thepage }\expandafter \setcounter \@tempa \cref@constructprefix {page}{\cref@result }\protected@write \@auxout {}{\string \newlabel {##1@cref}{{\cref@currentlabel }{[\@tempb ][\arabic {page}][\cref@result ]\thepage }{}{}{}}}\@esphack }\def \label@optarg [##1]##2{\cref@old@label {##2}\@bsphack \edef \@tempa {{page}{\the \c@page }}\setcounter {page}{1}\edef \@tempb {\thepage }\expandafter \setcounter \@tempa \cref@constructprefix {page}{\cref@result }\protected@edef \cref@currentlabel {\expandafter \cref@override@label@type \cref@currentlabel \@nil {##1}}\protected@write \@auxout {}{\string \newlabel {##2@cref}{{\cref@currentlabel }{[\@tempb ][\arabic {page}][\cref@result ]\thepage }{}{}{}}}\@esphack }} \newcommand \firstaid@cref@smugglelabel {\let \cref@currentlabel \cref@gcurrentlabel@temp } \newcommand \firstaid@cref@updatelabeldata [1]{\cref@constructprefix {##1}{\cref@result }\@ifundefined {cref@##1@alias}{\def \@tempa {##1}}{\def \@tempa {\csname cref@##1@alias\endcsname }}\protected@xdef \cref@gcurrentlabel@temp {[\@tempa ][\arabic {##1}][\cref@result ]\csname p@##1\expandafter \endcsname \csname the##1\endcsname }\aftergroup \firstaid@cref@smugglelabel } \AddToHook {label}[firstaid/cleveref] {\ifx \@currentcounter \@empty \else \firstaid@cref@updatelabeldata {\@currentcounter }\fi } }\__hook_next package/cleveref/after
package/cleveref/after -> \__hook_toplevel package/cleveref/after \FirstAidNeededT {cleveref}{sty}{....-..-.. v... Intelligent cross-referencing} {\def \cref@getref ##1##2{\expandafter \let \expandafter ##2\csname r@##1@cref\endcsname \expandafter \expandafter \expandafter \def \expandafter \expandafter \expandafter ##2\expandafter \expandafter \expandafter {\expandafter \@firstoffive ##2}}\def \cpageref@getref ##1##2{\expandafter \let \expandafter ##2\csname r@##1@cref\endcsname \expandafter \expandafter \expandafter \def \expandafter \expandafter \expandafter ##2\expandafter \expandafter \expandafter {\expandafter \@secondoffive ##2}}\AddToHook {begindocument}[cleveref]{\def \label@noarg ##1{\cref@old@label {##1}\@bsphack \edef \@tempa {{page}{\the \c@page }}\setcounter {page}{1}\edef \@tempb {\thepage }\expandafter \setcounter \@tempa \cref@constructprefix {page}{\cref@result }\protected@write \@auxout {}{\string \newlabel {##1@cref}{{\cref@currentlabel }{[\@tempb ][\arabic {page}][\cref@result ]\thepage }{}{}{}}}\@esphack }\def \label@optarg [##1]##2{\cref@old@label {##2}\@bsphack \edef \@tempa {{page}{\the \c@page }}\setcounter {page}{1}\edef \@tempb {\thepage }\expandafter \setcounter \@tempa \cref@constructprefix {page}{\cref@result }\protected@edef \cref@currentlabel {\expandafter \cref@override@label@type \cref@currentlabel \@nil {##1}}\protected@write \@auxout {}{\string \newlabel {##2@cref}{{\cref@currentlabel }{[\@tempb ][\arabic {page}][\cref@result ]\thepage }{}{}{}}}\@esphack }} \newcommand \firstaid@cref@smugglelabel {\let \cref@currentlabel \cref@gcurrentlabel@temp } \newcommand \firstaid@cref@updatelabeldata [1]{\cref@constructprefix {##1}{\cref@result }\@ifundefined {cref@##1@alias}{\def \@tempa {##1}}{\def \@tempa {\csname cref@##1@alias\endcsname }}\protected@xdef \cref@gcurrentlabel@temp {[\@tempa ][\arabic {##1}][\cref@result ]\csname p@##1\expandafter \endcsname \csname the##1\endcsname }\aftergroup \firstaid@cref@smugglelabel } \newif \iftag@ \AddToHook {label}[firstaid/cleveref] {\ifx \@currentcounter \@empty \else \iftag@ \else \firstaid@cref@updatelabeldata {\@currentcounter }\fi \fi } }\__hook_next package/cleveref/after
package/arydshln/after -> \__hook_toplevel package/arydshln/after \FirstAidNeededT {arydshln}{sty}{....-..-.. v... } {\protected \def \adl@@vlineL ##1##2##3##4{\adl@ivline ##4\@nil {##1}{##2}\xdef \adl@colsL {\adl@colsL \@elt {##3}{\number \@tempcnta }{\number \@tempcntb }{\adl@dashcolor }{\adl@gapcolor }}}\protected \def \adl@@vlineR ##1##2##3##4{\adl@ivline ##4\@nil {##1}{##2}\xdef \adl@colsR {\@elt {##3}{\number \@tempcnta }{\number \@tempcntb }{\adl@dashcolor }{\adl@gapcolor }\adl@colsR }}\let \adl@act@@vlineL \adl@@vlineL \let \adl@act@@vlineR \adl@@vlineR }\__hook_next package/arydshln/after
package/l3graphics/after -> \__hook_toplevel package/l3graphics/after \seq_set_from_clist:Nn \l_graphics_search_ext_seq {.pdf,.eps,.ps,.png,.jpg,.jpeg}\__hook_next package/l3graphics/after
No file lthooks-000.aux.
Expand Down
Loading