Skip to content

Incorrect warning about "a" versus "an" when using digits as adjective #226

@neil-lindquist

Description

@neil-lindquist

Textidote gives a warning that "an" should be used instead of "a" when preceding math mode.

With the following latex file,

\documentclass{article}
\begin{document}
This gives a \(30\times\) improvement.
\end{document}

I get

$ java -jar textidote.jar-0.9.jar --check en --no-color textidote-mwe.tex                                                                                                                                         
TeXtidote v0.9 - A linter for LaTeX documents and others                                                                                                                                                          
(C) 2018-2021 Sylvain Hall▒ - All rights reserved                                                                                                                                                                 
                                                                                                                                                                                                                  
Found 1 warning(s)                                                                                                                                                                                                
Total analysis time: 3 second(s)                                                                                                                                                                                  
                                                                                                                                                                                                                  
* L3C12-L3C12 Use 'an' instead of 'a' if the following                                                                                                                                                            
  word starts with a vowel sound, e.g. 'an article', 'an hour'.. Suggestions:                                                                                                                                     
  [an] (11) [lt:en:EN_A_VS_AN]                                                                                                                                                                                    
  This gives a \(30\times\) improvement.                                                                                                                                                                          
             ^                                                                                                                                                                                                    

Using $30\times$ instead of \(30\times\) gives the same warning, but 30\times (without math mode) doesn't result in any warnings. So, it looks like this is an issue with how math mode is detexified.

I've reproduced this with both the 0.9 draft and the 0.8.2 release.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions