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

wrong colors #253

Open
Dario-Rosa85 opened this issue Jun 26, 2020 · 5 comments
Open

wrong colors #253

Dario-Rosa85 opened this issue Jun 26, 2020 · 5 comments
Labels

Comments

@Dario-Rosa85
Copy link

Could you help me in detecting why, after the following command

\newcommand{\be}{\begin{equation}}

the color palette becomes wrong, with the plain text becoming green? I attach a screenshot to show what I mean.

2020-06-26

@ashthespy
Copy link
Owner

ashthespy commented Jun 26, 2020

The current syntax highlighting is accomplished using a set of regex rules

So when you define your \begin{equation} as it doesn't find a corresponding \end{equation} it highlights the rest of the document as an "equation" - hence green.
If I were you, I wouldn't use such commands, and use the autocomplete functionality baked into the package to do this.

@Dario-Rosa85
Copy link
Author

Thank you! now it works

@Dario-Rosa85
Copy link
Author

Dario-Rosa85 commented Jun 29, 2020

sorry. I have another example of weird highlighting: why after $\hat \gamma^i$ it remains in equation mode until the end of the period?

2020-06-30 (1)

@Dario-Rosa85 Dario-Rosa85 reopened this Jun 29, 2020
@Aerijo
Copy link

Aerijo commented Jun 30, 2020

That is unrelated; for this kind of grammar Atom limits the number of syntax tokens per line, as well as the parsed line length for performance reasons. These limits can be changed (see grammar-token-limit package), or you can split the content across multiple source lines.

@Dario-Rosa85
Copy link
Author

Thank you, @Aerijo. I did not know. I will split the lines.

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

No branches or pull requests

3 participants