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

Hook in \@setref #1195

Closed
lstonys opened this issue Dec 4, 2023 · 5 comments
Closed

Hook in \@setref #1195

lstonys opened this issue Dec 4, 2023 · 5 comments
Labels
enhancement wont fix/change/enhance something that might be desirable but ...

Comments

@lstonys
Copy link

lstonys commented Dec 4, 2023

Now \label has a hook so could \@setref have a hook as well? With the ref name argument.

\def\@setref#1#2#3{%
  \ifx#1\relax
   \protect\G@refundefinedtrue
   \nfss@text{\reset@font\bfseries ??}%
   \@latex@warning{Reference `#3' on page \thepage \space
             undefined}%
  \else
   \begingroup
   \somehook{#3}%
   \expandafter#2#1\@empty\@empty\@empty\null
   \endgroup
  \fi}
@u-fischer
Copy link
Member

What is the use case?

@lstonys
Copy link
Author

lstonys commented Dec 4, 2023

  1. store \ref information
  2. some styles requires refs to be in upper shape

@FrankMittelbach
Copy link
Member

\@setref is a very general command while your two suggestion would only fit very specific kind of references which to me indicate that this would be the wrong level. So I'm not convinced that there should be a hook. Furthermore, the \@setref is legacy and there is a good chance that it is eventually replaced by using the new property handling methods throughout.

@lstonys
Copy link
Author

lstonys commented Dec 4, 2023

Ok, I see that I already asked about such a hook in hyperref project latex3/hyperref#250. I usually redefine both @setref macros (from kernel and from hyperref). If you think that this hook is worthless that's fine just close this issue. It is not a big macro to copy and redefine it in the style.

Copy link

This issue has been automatically marked as stale because it has not had recent activity.

@github-actions github-actions bot added the stale label Mar 15, 2024
@josephwright josephwright added the wont fix/change/enhance something that might be desirable but ... label Oct 22, 2024
@josephwright josephwright closed this as not planned Won't fix, can't repro, duplicate, stale Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement wont fix/change/enhance something that might be desirable but ...
Projects
None yet
Development

No branches or pull requests

4 participants