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

Fix go to command definition when it is a custom label referencing command #1784

Merged
merged 6 commits into from
Mar 5, 2021

Conversation

PHPirates
Copy link
Collaborator

@PHPirates PHPirates commented Feb 24, 2021

Fix #1782

Summary of additions and changes

  • There was still an old usage of LatexLabelReference which was creating such a reference for a LatexCommands, but that's moved to the ParameterText with a LatexLabelParameterReference, so it was blocking the correct reference to the command definition.
  • Include custom label referencing commands in label resolving (why wasn't that present already...)
  • Fix TEX-109 (simply missing magic information, that loadclass adds .cls extension)
  • Fix TEX-20: Make \url a verbatim command to allow using % without escaping them
  • Fix TEX-15: warn against usage of \catcode

How to test this pull request

\documentclass{article}
\usepackage{url}
\newcommand{\tablelabel}[2]{
    \ref{#1}
}

\begin{document}
    \label{argument}

    \tablelabel{argument}{another} % command resolves to definition, and argument resolves to label (both of these were not working)

    ~\ref{argument}

    \url{https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwj8qK3bgYPvAhWOxIUKHWfeBZcQFjAAegQIBxAD&url=https%3A%2F%2Ftex.stackexchange.com%2Fquestions%2F224506%2Fspecial-character-in-url&usg=AOvVaw0YtiamRY59mbdNzg4rVKOH}
    This \url|https://%.com| is not an url, but it shows verbatim.

\end{document}

@PHPirates PHPirates added this to the b0.7.5 milestone Feb 24, 2021
@PHPirates PHPirates self-assigned this Feb 24, 2021
@HannahSchellekens HannahSchellekens added bug Deficiencies in TeXiFy behaviour. enhancement New feature or (non bug related) change to the program. labels Mar 2, 2021
@PHPirates PHPirates merged commit fca2441 into master Mar 5, 2021
@PHPirates PHPirates deleted the go-to-definition branch March 5, 2021 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Deficiencies in TeXiFy behaviour. enhancement New feature or (non bug related) change to the program.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Multi-argument custom command "go to definition" does not work
2 participants