2

As many people suggest to use BibLatex instead of BibTex, but I cannot get it working in Lyx 2.1.4 with MikTex. I have seen many webpages, but still confused.

I followed the instruction in lyx wiki (http://wiki.lyx.org/BibTeX/Biblatex), but lyx got five errors and cannot output correct PDF file.

\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage[english,ngerman,frenchb]{babel}
\usepackage{csquotes}
\usepackage[style=authoryear,backend=biber]{biblatex}
\addbibresource{biblatex-examples.bib}

\makeatother

\usepackage{babel}
\begin{document}
This is a test of biblatex. \cite{aksin,almendro,aristotle:anima,aristotle:poetics}

\printbibliography[title=References]

\bibliographystyle{plain}
\bibliography{biblatex-examples}

\end{document}

And it is strange that if I delete the

\bibliographystyle{plain}
\bibliography{biblatex-examples}

in TeXworks, it works fine.

I really do not know what the problem is in Lyx.

WZhao
  • 263
  • You will really have to delete the two lines \bibliographystyle{plain} \bibliography{biblatex-examples} to use biblatex regardless your editor. AFAIK there is no "native" biblatex support in LyX (there wasn't a while ago, at least), have a look at http://wiki.lyx.org/BibTeX/Biblatex – moewe Sep 15 '15 at 19:27
  • See also http://tex.stackexchange.com/q/144959/35864, http://tex.stackexchange.com/q/184022/35864, http://tex.stackexchange.com/q/86482/35864 – moewe Sep 15 '15 at 20:21

1 Answers1

4

The problem, as the manual says, is that you haven't put the bibtex button in a comment. This is to trick LyX into using its citation infrastructure without exporting \bibliographystyle and \bibliography to LaTeX. Note that these two are bibtex commands, they can't be used with biblatex. Check if the examples from http://wiki.lyx.org/BibTeX/Biblatex work for you.

PhilipPirrip
  • 1,443
  • I think you are right. Putting the bibtex button which shows like "BibTex Generated Bibliography" in a comment corrects my problem. Thank you!! – WZhao Sep 15 '15 at 22:26