We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Reference command have currently two problems regarding tagging:
\eqref
Lbl
The following resolves both (when hyperref it will replace the references with links, that is ok, but can be adjusted if needed)
\DocumentMetadata{uncompress,testphase={phase-III,math}} \documentclass{article} \usepackage{amsmath} \ExplSyntaxOn\makeatletter \def\@kernel@target@exp#1{\cs_if_exist:cT {r@#1}{\tl_item:cn{r@#1}{4}}} \NewSocket{tagsupport/ref/begin}{1} \NewSocket{tagsupport/ref/end}{0} \NewSocket{tagsupport/inlineinsert/begin}{1} \NewSocket{tagsupport/inlineinsert/end}{0} \NewSocketPlug{tagsupport/ref/begin}{kernel} { \leavevmode\tagmcend \tagstructbegin{tag=Reference} \tag_struct_gput:nne {\g__tag_struct_stack_current_tl} {ref_dest}{\@kernel@target@exp{#1}} \tagmcbegin{} } \NewSocketPlug{tagsupport/ref/end}{kernel} {\tagmcend \tagstructend \tagmcbegin{}} \AssignSocketPlug{tagsupport/ref/begin}{kernel} \AssignSocketPlug{tagsupport/ref/end}{kernel} \NewSocketPlug{tagsupport/inlineinsert/begin}{kernel} {\tagmcend \tagstructbegin{#1}\tagmcbegin{}} \NewSocketPlug{tagsupport/inlineinsert/end}{kernel} {\tagmcend \tagstructend \tagmcbegin{}} \AssignSocketPlug{tagsupport/inlineinsert/begin}{kernel} \AssignSocketPlug{tagsupport/inlineinsert/end}{kernel} \RenewDocumentCommand\ref{sm} { \UseTaggingSocket{ref/begin}{#2} \IfBooleanTF{#1}{\@kernel@sref{#2}}{\@kernel@ref{#2}} \UseTaggingSocket{ref/end} } \DeclareRobustCommand{\eqref}[1] { \textup{% \AssignSocketPlug{tagsupport/inlineinsert/begin}{noop}% \AssignSocketPlug{tagsupport/inlineinsert/end}{noop}% \tagform@{\ref{#1}}} } \AtBeginDocument { \@namedef{maketag@@@}#1{% \ifmeasuring@ \hbox{\m@th\normalfont#1}% \else \UseTaggingSocket{inlineinsert/begin}{tag=Lbl}% \hbox{\m@th\normalfont#1}% \UseTaggingSocket{inlineinsert/end}% \fi } } \ExplSyntaxOff\makeatother \begin{document} \section{section}\label{sec} \ref{sec} \begin{align} x \label{eq} \end{align} \eqref{eq} \end{document}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Reference command have currently two problems regarding tagging:
\eqref
is tagged asLbl
as it inherits tagging from the label in the equation.The following resolves both (when hyperref it will replace the references with links, that is ok, but can be adjusted if needed)
The text was updated successfully, but these errors were encountered: