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

Raise an error if variable declaration is incorrect #1321

Open
user202729 opened this issue Apr 26, 2024 · 0 comments
Open

Raise an error if variable declaration is incorrect #1321

user202729 opened this issue Apr 26, 2024 · 0 comments

Comments

@user202729
Copy link
Contributor

user202729 commented Apr 26, 2024

Brief outline of the proposed feature

Currently if the user try to do

coordinate abc;

or

real \abc=1;

then the bc or =1 will be silently gobbled.

Suggestion: raise an error that the syntax is incorrect (i.e..

We just need to change

\def\tikz@math@@process@vartypes#1#2,{%
    \def\tikz@math@var{#1}%
    \tikz@math@getvarstring{#1}\tikz@math@varstring%
    \ifx\tikz@math@var\tikz@math@stop%
        \let\tikz@math@next=\tikz@math@@@process@vartypes%
    \else%
        \expandafter\tikz@math@setvartype\tikz@math@var\tikz@math@vartype%
        \def\tikz@math@next{\tikz@math@gobblespaces\tikz@math@@process@vartypes}%
    \fi%
    \tikz@math@next%
}%

to check if #2 consist of only spaces.

Usage example

No response

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

No branches or pull requests

1 participant