Texmaker and TeXstudioSpell check does not work with \cite{}

Information and discussion about Texmaker, an integrated LaTeX environment for several platforms, and the related TeXstudio
Post Reply
Nabla94
Posts: 4
Joined: Sun Dec 03, 2017 10:02 pm

Spell check does not work with \cite{}

Post by Nabla94 »

Hi,

I use Texmaker and would like to have my text spell checked.
If I enter the following text, the mistake is correctly recognized:

This sentence contains a misstake

Even when continuing with a citation, Texmaker still recognizes it:

This sentence contains a misstake \cite{bib

But upon closing the citation bracket, the red underlining disappears!?

This sentence contains a misstake \cite{bib}

I don't have this problem with \ref, \citep or any other command.
The \cite command disturbs the whole paragraph before, not just one sentence, and not the part after it.
The paragraph before is fine, if it does not contain a \cite...

This is really dangerous, since mistakes are not recognized.

Hope you can help me,
I would like to have my thesis checked ;)

Cheers,
Clemens

edit:
https://tex.stackexchange.com/questions ... -and-paste seemed to be the same issue...
https://tex.stackexchange.com/questions ... as-a-label seems to be similar for \label

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Spell check does not work with \cite{}

Post by kaiserkarl13 »

This seems to happen for any command ending in "cite"; includes \cite, \nocite \footcite, \mycite, \overcite, and it happens for any word in the sentence.

You can get around this problem by putting all your \cite commands on a line by themselves, with the previous line ending with [cmd]~%[/cmd]. Example:

Code: Select all

Thiss lline ccontaiins missspelled woords~\cite{someone}
will look the same in print as

Code: Select all

Thiss lline ccontaiins missspelled woords~%
\cite{someone}
but the second form will fake out TeXmaker into not assuming everything on a line with \...cite{.*} in it.
Post Reply