latex3 / latex3/hyperref

add hook to \NR@setref

Open
#250 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TeX
Stars
205
Forks
41
PR merge metrics
No merged PRs in 30d

Description

Could you define a new command \def\ref@name{#1} and add a new hook to ref the same like it is done in \label:

\def\NR@setref#1{%
    \def\ref@name{#1}%
    \setref@hook    
    \begingroup
      \@safe@activestrue
      \expandafter
    \endgroup
    \expandafter\NR@@setref\csname r@#1\endcsname
    }%

\def\label#1{%
  \@bsphack
  \begingroup
    \def\label@name{#1}%
    \label@hook

Thanks

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The entry point is \NR@setref, with \label and its \label@hook example providing the comparison. Trace the existing reference path and verify that the new hook is available with the reference name before \NR@@setref; done means the hook can observe that name during reference handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
latex, tex
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.