1

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:

\usepackage{natbib}

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

6
  • 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, 2017 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? Oct 14, 2017 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, 2017 at 3:47
  • Doing in the numerical way I get the same error, but the referer is: $T=\sum T_{i}$ \citet Oct 14, 2017 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, 2017 at 3:54

2 Answers 2

0

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:

\usepackage[style=numeric,natbib=true]{biblatex}
\bibliography{/home/my_user/test_bib}
\bibliographystyle{unsrt}

in preamble.

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

1
  • 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! Oct 14, 2017 at 4:41
0

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .