# LyX not showing biblatex \printbibliography

So I am trying biblatex in the end. Here's the issue I've got so far with LyX: \printbibliography doesn't print the bibliography, it just shows the citations.

When I test the exported code with TexWorks, however, it just works indeed. So what's wrong with my LyX setup ? I did everything the guide says on LyX wiki. Besides I've got an Undefined control sequence on \endentry when switching to Biber backend, so I am keeping the default bibtex backend for now. How come the exported code from LyX prints the bibliography whereas LyX built-in preview doesn't?

Here's the exported code by LyX, working only outside LyX...

%% LyX 2.0.6 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{verbatim}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage[style=authoryear,natbib=true,backend=bibtex]{biblatex}
%\addbibresource{path / to /file.bib}
\bibliography{file}

\makeatother

\usepackage{babel}
\begin{document}
\cite{Binet2006[1887]}

\cite{Collins1992[1985]}

\begin{comment}
\bibliographystyle{plain}
\bibliography{file}
\end{comment}

\printbibliography
\end{document}


Many thanks

• Check the .blg-file if there are errors in the bibtex run. I would also remove the backend=bibtex and try to tell lyx to use biber instead of bibtex (there is imho a wiki somewhere which describes how this is done). And make sure that you have a current biblatex + biber. – Ulrike Fischer Nov 14 '13 at 11:35
• I deleted my answer like it doesn't solve the problem (and sorry for the babel mistake). Did you try with another LaTeX editor than Lyx (like texmaker). It could show if it's a Lyx problem or not. – ppr Nov 16 '13 at 19:12
• No problem. It was in fact a path issue. With biblatex, it is not enough to have the .lyx file in the same directory as the .bib file, probably because it works in some temporary directory during the compilation or something. I had to define an absolute path: \addbibresource{C:/file.bib} made it! I do appreciate biblatex being compatible with babel. It replaces babelbib. Thanks – elge Nov 16 '13 at 20:29

## 1 Answer

Absolute path in the \addbibresource is required with LyX, as it probably works in some temporary directory to render the output. It couldn't find the bib file as it was defined with a relative path. Hope this helps, it helped myself:-)

Also make sure you are using the Unix-ish slashes even on Windows e.g. \addbibresource{C:/file.bib}. Same goes for the old way to do it with \bibliography.