I have a LyX (version 2.2.3) project that uses a .bib file (created using JabRef), in my project I can make citations of all the files included in my .bib file, but when I try to make a PDF preview the citations appear as ?, and when I try to compile the master file it gives these errors on each citation:

Undefined control sequence

Argument of \@citex has an extra }

Paragraph ended before \@citex was complete

Paragraph ended before \NAT@split was complete

I've tried to install manually the natbib package and reconfiguring LyX, but it keeps giving the same error, as if it can't find the natbib package. I've also tried to manually force the inclusion by adding this line in the preamble:


If someone can please shed some light for me on this, I really don't know what I can do anymore, thanks in advance!

  • Do you use cite package? If yes... try to remove it and test it again... (natbib combined with cite package causes such problems... try to use only one of them -I have no idea on how to do it on lyx-) – koleygr Oct 14 '17 at 2:58
  • The cite package was indeed installed, I removed it and reconfigured LyX, but I get the same errors still. Any other ideas? – Felipe Vargas Oct 14 '17 at 3:38
  • If you remove natbib and use just simple bibliography (I thing numerical or something like this is another option...) Do you have the same problem? – koleygr Oct 14 '17 at 3:47
  • Doing in the numerical way I get the same error, but the referer is: $T=\sum T_{i}$ \citet – Felipe Vargas Oct 14 '17 at 3:50
  • Can you place the cite comand inside {} and check again with both ways? I found something like this earlier. I don't know if can be done in lyx. But if it can be done test it – koleygr Oct 14 '17 at 3:54

We did not really found a way to solve the problem with natbib, but numerical way worked fine for the OP's needs.

Failed: We tried to include the \cite command in {} but didn't worked.

Didn't try:


in preamble.

If someone has the same problem and find other solution, please post it!

| improve this answer | |
  • I understand that we actually didn't solve the natbib problem in LyX, but you solved my problem, so I think is enought to accept the anwser. If anyone else knows how to solve this, post an anwser please! – Felipe Vargas Oct 14 '17 at 4:41

I had a similar problem and fixed it by setting the Language Encoding from Unicode(ucs-extended)(utf8x) to Unicode(utf8).

My error probably occurred due to a very fancy name (Žliobaitė).

You can find this option in:

Document -> Settings... -> Language -> Encoding - Other

LyX Version 2.2.4 on Linux

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.