robindijkhof / overleaf-textarea

This plugin displays your tex source in a textarea so plugins like grammarly can check it.
GNU General Public License v3.0
514 stars 31 forks source link

Text after \cite ignored until end of line #64

Closed TheMrKiko closed 2 years ago

TheMrKiko commented 3 years ago

Hello, I have a paragraph in one LaTeX line with some \cite{} commands in the middle and end; and, in the textarea, everything that is after the first \cite (and until the end of line) does not appear, and is replaced with a dot (.).

I believe this only happens when there is also a command right before the closing dot of the sentence. The example Hello this is \cite{ref:a} and this is not \cite{ref:b}. appears as

Hello this is.

and the example Hello this is \cite{ref:a} and this is not \cite{ref:b}2. appears as

Hello this is and this is not 2.

jstulips commented 2 years ago

Add a ~ before \cite and that solves the problem. Example: ~\cite{ref:a}

robindijkhof commented 2 years ago

This is solved now