# Lyx citation problem with OSCOLA

Since the most recent release of LyX (2.10.20- Yosemite hot-fix), my citations haven't been appearing properly using the OSCOLA style and natbib. Instead of getting the full citation in the footer, I'm just getting the cite key. This is using the same settings as I got from a previous answer (to another problem with OSCOLA). The previous answer, which now doesn't work in Lyx is:

\documentclass[british]{article}
\usepackage{babel}
\usepackage[T1]{fontenc}% much better than OT1
\usepackage{mathpazo}
\usepackage[utf8]{inputenc}% much better to switch to utf8 if you can
\usepackage[style=british]{csquotes}
\usepackage[style=oscola,natbib=true]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@legislation{gorchymyn,
title          = {Gorchymyn Mesur Teithio gan Ddysgwyr (Cymru) (Cychwyn Rhif 2)\nopunct},
number         = {SI 2009\slash 2819},
pagination     = {regulation},
keywords       = {cy},
userb          = {Cy 245},
entrysubtype   = {secondary},
language       = {welsh},
}% entry from oscola documentation
\end{filecontents}

\bibliography{\jobname}
\let\citet\footcite% horrible kludge

\makeatletter
\def\@makefnmark{\hbox{\normalfont[\@thefnmark]}}% this redefines the way footnote markers are formatted. It will affect *all* footnotes - not just citations.
\makeatother

\begin{document}

THE QUICK BROWN FOX JUMPED OVER THE LAZY DOG\citet{gorchymyn} dfdasfads

\printbibliography

\end{document}


Previous question: Lyx citation problem

• The command \citet is from natbib and means a citation in the text. If you want a citation in a footnote, take \footcite or whatever. But please decide, which one you want. Nov 17 '14 at 13:13
• Even using footcite, I get the same problem. The site key appears as the footnote, not the citation. Its a very weird and frustrating error
– Jim
Nov 17 '14 at 19:37
• I've checked the Biblatex log and it says This is BibTeX, Version 0.99d (TeX Live 2014) Capacity: max_strings=35307, hash_size=35307, hash_prime=30011 The top-level auxiliary file: PBL.aux I found no \citation commands---while reading file PBL.aux I found no \bibdata command---while reading file PBL.aux I found no \bibstyle command---while reading file PBL.aux
– Jim
Nov 18 '14 at 3:25

I'm not an experienced user of Lyx or bibliographies. But I noticed several things: Lyx tries to run bibtex, not biber. So I added the option backend=biber. But find out how to convince Lyx to use biber.

And the option 'natbib=true' makes things more complicated. I'd go this way:

\documentclass[british]{article}
\usepackage{babel}
\usepackage[T1]{fontenc}% much better than OT1
\usepackage{mathpazo}
\usepackage[utf8]{inputenc}% much better to switch to utf8 if you can
\usepackage[style=british]{csquotes}
\usepackage[style=oscola, backend=biber]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@legislation{gorchymyn,
title          = {Gorchymyn Mesur Teithio gan Ddysgwyr (Cymru) (Cychwyn Rhif 2)},%\nopunct},
number         = {SI 2009\slash 2819},
pagination     = {regulation},
keywords       = {cy},
userb          = {Cy 245},
entrysubtype   = {secondary},
language       = {welsh},
}% entry from oscola documentation
\end{filecontents}

\bibliography{\jobname}
%\let\citet\footcite% horrible kludge

% \makeatletter
%   \def\@makefnmark{\hbox{\normalfont[\@thefnmark]}}% this redefines the way footnote markers are formatted. It will affect *all* footnotes - not just citations.
% \makeatother

\begin{document}

THE QUICK BROWN FOX JUMPED OVER THE LAZY DOG \parencites{gorchymyn}
dfdasfads. And now we do the same thing again \parencites{gorchymyn}.

\printbibliography

\end{document}


There are various kinds of citation commands for biblatex, please see the manual p. 83.

If you describe what you are after, perhaps somebody with a better understanding of bibliographies can give a more detailed answer.

I am in your predicament also, with no "available citations" being offered in the LyX 2.1.2 (Linux version) citation window. However I did solve part of your problem, which was to make the choice of biber appear in two places in the LyX setup under Document/Settings and Tools/Preferences, where bibier must both be made to appear, and next must be selected. To make bibier available at all as a selection, you first have to install the linux package sitting in your Linux package manager called biber.

After you have installed that, then you need to follow the instructions to "Fool LyX" into accepting Biblatex along with its separate associated bibier package, which instructions are at http://wiki.lyx.org/BibTeX/Biblatex . Don't forget to add the polyglossia line at the end of step 2. After you do this, then bibier will appear as an option to select as explained above.

Under Document/Settings/Bibliography I have chosen Citation Style/Default(numerical) and Bibliography Style/Default style: biblatex-historian

I selected (checked the box) Sectioned bibliography, and under Bibliography generation for Processor I selected biber.

Under Tools/Preferences/Output/Latex I checked the box Use LaTex front encoding, and under Bibliography generation/Processor: I selected biber

Also make sure you have selected under Document Settings/Modules the module Biblatex-citation-styles.