AtomLinter / linter-spell-latex

Provider for Atom linter-spell package to enable LaTeX spell checking.
MIT License
8 stars 7 forks source link

LaTeX measurements are flagged as spelling errors #38

Open ChristopherBull opened 5 years ago

ChristopherBull commented 5 years ago

Measurement values are flagged as spelling errors, even though they are not. They can't be added to a dictionary, as they are obviously dynamic values used frequently throught a LaTeX document.

For example, .25em, .1pt, and .5em are flagged as spelling errors. E.g:

\renewcommand{\section}[1]{
  {\enspace\headingfont\noindent\Large{\textbf{#1}}}\\[.25em] % Header section name
  \noindent\rule{\textwidth}{.1pt}\\[.5em] % Rule under the header
  % \noindent\hrulefill
}

This is challenging as they are dynamic values. I would usually default to using something like Regex to detect these.

Is it possible to update the grammar provider to skip numbers that end in pt, em, cm etc.

Luthaf commented 5 years ago

There is already code for this in this package, which was just not used. You can fix it locally by editing your own copy of the package, see #39 for the one line change!

agrossfield commented 5 years ago

I installed today, bug is still present. Will this get merged?