[Tex/LaTex] What does ‘missing \@ before…’ error mean in vim

errorspunctuationspacingvim

I get this strange behavior when I have capitals before a period, like so

    1 \documentclass{article}
    2 \begin{document}
>>  3 Another possible protein blah blah blah from GRIP/ABP. Blah Blah Blah
    4 \end{document}

The error I generally get in vim is:

blahblah.tex|3 error| missing `\@' before `.' in "ABP."

What does that mean? Why do I get it? How do I fix it?

Best Answer

The following hopefully answers your "abbreviated questions":

  1. vim suggests inserting \@ before . in ...GRIP/ABP. So, do it! The reason here is that GRIP/ABP or any capitalized word before a period is usually an abbreviation. And, in some instances, abbreviations have periods, while some don't. To treat the end-of-abbreviation period as an end-of-sentence period, like it is in your case, use

    Another possible protein blah blah blah from GRIP/ABP\@. Blah Blah Blah
    

    Here is a visual of the effect if you don't use it:

    enter image description here

    \documentclass{article}
    \begin{document}
    Another possible protein blah blah blah from GRIP/ABP. Blah Blah Blah \par
    Another possible protein blah blah blah from GRIP/ABP\@. Blah Blah Blah
    \end{document}​
    

    Note the difference in spacing after the period. The latter constitutes a larger-than-usual end-of-sentence period.

  2. vim is smart and suggests you use it, since it is good style to have proper puntuation.

  3. See 1.

The recursive nature of this non-art-like triptych reminds me of the acronym GNU.

Related Question