0

I need to use the following command as part of a guideline:

\bibliographystyle{spmpsci}
\bibliography{Reference.bib}

However, I am getting the following mistake:

! Package biblatex Error: '\bibliographystyle' invalid.

Can you please help me identify how to resolve this issue? Below I attach all the packages that I use:

\documentclass[12pt]{article}

\RequirePackage{rotating} \usepackage[english]{babel} \makeatletter \setlength{@fptop}{0pt} \setlength{@fpbot}{0pt plus 1fil} \makeatother %\usepackage[utf8x]{inputenc} %\usepackage[style=chicago-authordate,backend=biber,natbib]{biblatex} %\DeclareLanguageMapping{english}{english-apa} %\DefineBibliographyStrings{english}{% % andothers = {et al.}, %} \usepackage[mincitenames=1,maxcitenames=2,authordate,giveninits=true, backend=biber, natbib,bibencoding=utf8]{biblatex-chicago}

\usepackage[symbol]{footmisc} \usepackage{calc} \usepackage{appendix} \usepackage{multirow} \usepackage{amsmath} \usepackage{cellspace} \usepackage{mathtools} \usepackage{lipsum} % package for including graphics with figure-environment \usepackage{graphicx} \usepackage[table]{xcolor} \usepackage[normalem]{ulem} %\usepackage{hyperref} \usepackage{multirow} \usepackage{setspace} \usepackage{breqn} %\usepackage{fontspec} %\setmainfont{Times New Roman} \usepackage{float} \usepackage{rotating} \usepackage[flushleft]{threeparttable} \usepackage{array} %\usepackage{fourier} \usepackage{booktabs} \usepackage{adjustbox} \usepackage{tabularx} %\usepackage{titlesec}

\usepackage[colorlinks=true,citecolor=blue, urlcolor = blue]{hyperref} \bibliographystyle{spmpsci} \bibliography{Reference.bib}

\usepackage{bm} \usepackage{blindtext} \usepackage{multicol} \usepackage{ragged2e} \usepackage{mathtools} \usepackage{fancyvrb} \usepackage{subcaption} \usepackage{supertabular} \usepackage[labelfont=bf]{caption} \captionsetup{justification = raggedright, singlelinecheck = false}

\usepackage{makecell} \usepackage{tikz} \usepackage{flexisym} \usepackage{collcell}
\usepackage{colortbl} \definecolor{aliceblue}{rgb}{0.94, 0.97, 1.0} \definecolor{beaublue}{rgb}{0.74, 0.83, 0.9}

\usetikzlibrary{arrows,positioning,decorations.pathreplacing} %\usepackage[colorlinks=true,linkcolor=blue]{hyperref} \usepackage[left=2.54cm,top=2.54cm,right=2.54cm,bottom=2.54cm]{geometry} \usepackage[automark] {scrlayer-scrpage} \pagestyle{myheadings} \cfoot[]{\pagemark} \setheadsepline[122mm]{0.3mm} \setlength{\parindent}{0pt}

\newcommand{\mc}[1]{\multicolumn{2}{>{\centering\arraybackslash}p{\widthof{0.000}}}{#1}}
% \doublespacing \makeatletter \def@xfootnote[#1]{% \protected@xdef@thefnmark{#1}% @footnotemark@footnotetext} \makeatother

\begin{document}

\end{document}

  • 1
    It seems that you are mixing bilatex and bibtex approaches to make a bibliography, what is wrong. See here to understand the basics of each approach. – Fran Aug 02 '22 at 21:31
  • Related https://tex.stackexchange.com/q/554756/35864, https://tex.stackexchange.com/q/46334/35864, https://tex.stackexchange.com/q/226137/35864, https://tex.stackexchange.com/q/420634/35864 – moewe Aug 03 '22 at 05:51

1 Answers1

2

biblatex and classical BibTeX's \bibliographystyle don't go together

In your preamble you have

\usepackage[mincitenames=1,maxcitenames=2,authordate,giveninits=true, backend=biber, natbib,bibencoding=utf8]{biblatex-chicago}

and then later on

\bibliographystyle{spmpsci}
\bibliography{Reference.bib}

This is a mix of two different approaches to generating citations and bibliographies in LaTeX: biblatex on the one hand and classical BibTeX on the other. You can find out much more about the differences at bibtex vs. biber and biblatex vs. natbib (an introduction to biblatex is at biblatex in a nutshell (for beginners)). Those two approaches are completely incompatible even if they share a few command names.

\bibliographystyle is a command from the BibTeX world and tells BibTeX about the bibliography style you want to use. biblatex has a different way to set up the bibliography style (mainly through its style option, but the wrapper package biblatex-chicago is special) and does not use \bibliographystyle. It explicitly redefines \bibliographystyle to throw an error, because use of that command indicates that part of your document is still in the classical BibTeX world.

Note that with biblatex the command \bibliography is used in the preamble (but it is preferable to use \addbibresource), whereas with classical BibTeX the command goes into the document body in the place where you want the final bibliography to appear. In any case, the argument of \bibliography should be the name of your .bib file without file extension (even though most modern systems will still find the file even if you erroneously include the extension): \bibliography{References}.

You haven't shared the document body with us, so we don't really have a chance to guess which of the two approaches you may want to use. In any case you will have to decide whether to use biblatex or classical BibTeX in your document.

Using biblatex

If you want to use biblatex or specifically biblatex-chicago, just get rid of the line \bibliographystyle{spmpsci} and change \bibliography{Reference.bib} to

\addbibresource{Reference.bib}

Then use

\printbibliography

in the document body to produce a bibliography.

Note that you need to compile your document with Biber instead of BibTeX (a full compile cycle would at least be LaTeX, Biber, LaTeX, LaTeX - where "LaTeX" can be your favourite flavour of LaTeX: pdfLaTeX, LuaLaTeX, XeLaTeX, ...). See Question mark or bold citation key instead of citation number for what Biber does (the explanations for BibTeX apply to Biber as well) and Biblatex with Biber: Configuring my editor to avoid undefined citations for help with making your editor run Biber for you.

Note further that classical BibTeX's .bst styles are incompatible with biblatex, so there is no way to use spmpsci with biblatex. (There are some biblatex implementations of popular styles and a number of other third-party styles, but generally speaking there rarely are biblatex versions of BibTeX journal styles).

Using BibTeX

If you want to use classical BibTeX (with the style spmpsci), get rid of

\usepackage[mincitenames=1,maxcitenames=2,authordate,giveninits=true, backend=biber, natbib,bibencoding=utf8]{biblatex-chicago}

Remove

\bibliography{Reference.bib}

from the preamble and add

\bibliography{Reference}

in your document body where you want the bibliography to show up.

You then compile this document with LaTeX, BibTeX, LaTeX, LaTeX (where "LaTeX" can be your favourite flavour of LaTeX: pdfLaTeX, LuaLaTeX, XeLaTeX, ...). See Question mark or bold citation key instead of citation number.

moewe
  • 175,683