You can find out what syntax item applies by positioning the cursor and using something like:
:echo synIDattr(synID(line("."), col("."), 1), "name")
Because that's quite a mouthful it might be useful to map that to a command:
command! SynName echo synIDattr(synID(line("."), col("."), 1), "name")
For TeX files, this gives texLength as a result. You can remove this with:
:syn clear texLength
In your vimrc, you'd put that in an autocmd, to make sure it gets loaded after the tex syntax file is loaded:
autocmd Syntax tex syn clear texLength
Also see How can I add additional syntax highlighting rules in my local vimrc? for more details on adding local syntax rules.
As for why that is highlighted, I'm not familiar with (La)TeX, but judging from the syntax file it's used for some length measurements:
" TeX Lengths:
syn match texLength "\<\d\+\([.,]\d\+\)\=\s*\(true\)\=\s*\(bp\|cc\|cm\|dd\|em\|ex\|in\|mm\|pc\|pt\|sp\)\>"
This matches any number followed by a unit measurement such as "cm", "pt", and "in" (presumably for "inch"), with optional spaces between the number and unit.
I think this may be a bug in the syntax file that it matches anywhere in the document, and that it should have contained in the definition to make it only match in some places, but like I said: I'm not familiar with TeX at all so I don't know the syntax.
autocmd Syntax, use~/.vim/after/syntax/tex.vim– D. Ben Knoble Jul 13 '22 at 13:56