1

I am writing a thesis on Overleaf, but I have been struggling with this error. This error occurs in the first 5 lines.

\documentclass[fleqn,10pt]{wlscirep}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[backend=biber, style=nature]{biblatex}
\addbibresource{sample.bib}

I don't get why this incompatibility problem occurs though I am not using 'cite package' like (\usepackage{cite}).

cabohah
  • 11,455
  • 3
    Does the wlscirep document class load the cite package? (You should be able to tell by examining the log file.) I'm not familiar with that document class and it's not on CTAN so I can't test. (It infuriates me that Overleaf normalizes new document classes without putting them on CTAN.) – frabjous Aug 21 '22 at 14:32
  • 2
    If it's the same as this version of wlscirep.cls here, then yes, it's what's loading cite. Either switch to a different document class or use bibtex instead. – frabjous Aug 21 '22 at 14:36
  • Thank you very much for your comments. These help me a lot. Just in case, is there a way to unload "cite" package while using the wlscirep document class? It seems that wlscirep is recommended to use for submitting this paper. – quolityoflife Aug 22 '22 at 16:31
  • You could copy wlscirep.cls into your document's folder, and edit it by removing the line that loads cite, but using a modified version of the class almost certainly defeats the purpose. Is there a reason you can't use Bibtex? – frabjous Aug 22 '22 at 18:58

1 Answers1

3

wlscirep.cls is not a class that is available on CTAN, but it can be obtained from Overleaf (https://www.overleaf.com/latex/templates/template-for-submissions-to-scientific-reports/xyrztqvdccns) if one has an Overleaf account, see also How to download an Overleaf template?.

The wlscirep.cls that can be obtained from that link identifies itself as

\ProvidesClass{wlscirep}[08/08/2020, v1.4]

The class loads

\RequirePackage[superscript,biblabel,nomove]{cite}
%% Nov 3, 2016: Support DOI
\bibliographystyle{naturemag-doi}

That is to say, the class hard-codes the cite package. The class is therefore incompatible with biblatex.

If you have to use the class for submission to your publisher, I would assume that the class already does the right thing for the bibliography and would not try to load biblatex instead.

Get rid of biblatex in your document and use the classical BibTeX approach. That is to say, cite using \cite and place \bibliography{<your file name without .bib extension>} in the document body where you want the bibliography list to appear.

moewe
  • 175,683