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

texlab reports dublicate and unused label in macro definition #1119

Closed
MajoranaOedipus opened this issue May 11, 2024 · 0 comments · Fixed by #1120
Closed

texlab reports dublicate and unused label in macro definition #1119

MajoranaOedipus opened this issue May 11, 2024 · 0 comments · Fixed by #1120

Comments

@MajoranaOedipus
Copy link

Issue

Consider defining some macros in the preamble:

\documentclass{article}
\newcommand\mylabel[1]{\label{#1}}			% (1)
\newcommand\myanotherlabel[1]{\label{#1}}	% (2)

\begin{document}
Hey! \mylabel{there}
\end{document}

Texlab reports both in (1) and (2) that the label #1 is unused and dublicate.

Expected Behaviours

Texlab should either

  • ignore \label and alike commands in macro definition
  • if the parametre (#1, ...) is passed directly to the \label (or with a little concatenate) in the bulk of the definition of the newcommand, newly defined command shall be considered as a new `label' and can be recognised by the texlab's label-ref analysis system (not sure if I have used the right words for it...)

Maybe related links

#1093

Version info

texlab 5.12.4

Confermed both in VS Code with texlab extension and Vim with coc-texlab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant