8

Still new to LaTex and found this question appearing many times here (link, link, link), but still couldn't figure out a solution. It seems like the other SO questions had pagebackref or hyperref packages but I got neither.

\documentclass[research]{letinbiom} 

\usepackage{graphicx}
\usepackage{float}
\usepackage{listings}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{siunitx}
\usepackage{booktabs}
\usepackage{makecell}
\usepackage{diagbox}
\usepackage{rotating}
\usepackage{geometry}
\usepackage{amsmath}
\usepackage[backend=biber,style=numeric, sorting=none]{biblatex}

\begin{document}

\end{document}

The only other thing I could think of is the fact that I had this code before:

\usepackage[hidelinks,colorlinks=true,linkcolor=blue,citecolor=blue]{hyperref}

But I removed it. I also removed any reference for \href with it.

I did find this line in a .cls file in the Latex folder from the publisher:

\RequirePackage[
%  pdfusetitle,
  pagebackref,
  colorlinks,
  allcolors=mainBlue
%  linkcolor=mainBlue,
%  citecolor=mainBlue,
%  filecolor=mainBlue,
%  urlcolor=mainBlue,
  ]{hyperref}
1
  • Where can we find the class letinbiom.cls that you are using?
    – moewe
    Commented Aug 24, 2022 at 5:54

1 Answer 1

8

I couldn't find your class letinbiom.cls online, but the snippet

\RequirePackage[
%  pdfusetitle,
  pagebackref,
  colorlinks,
  allcolors=mainBlue
%  linkcolor=mainBlue,
%  citecolor=mainBlue,
%  filecolor=mainBlue,
%  urlcolor=mainBlue,
  ]{hyperref}

from that file you pointed out in the question can definitely produce the error you are asking about as the following MWE shows

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[backend=biber, style=authoryear]{biblatex}

\RequirePackage[
%  pdfusetitle,
  pagebackref,
  colorlinks,
  allcolors=mainBlue
%  linkcolor=mainBlue,
%  citecolor=mainBlue,
%  filecolor=mainBlue,
%  urlcolor=mainBlue,
  ]{hyperref}

\addbibresource{biblatex-examples.bib}

\begin{document}
Lorem \autocite{sigfridsson}

\printbibliography
\end{document}

Specifically, the culprit is the pagebackref, option.

You could simply remove that option from the hyperref call in the .cls file. but that does not seem to be a good idea. I'm assuming that you are using this specific class for a reason, namely that you want to publish with this particular publisher. In absence of evidence to the contrary we should also assume that the publisher has coded the class in the way it is coded for some reason. If we change the class we could be breaking the desired output or the publisher's workflow.

The fact that the class is strictly incompatible with biblatex is a pretty strong reason not to use biblatex for your submission. Many publishers have author guidelines or example documents explaining how you should generate your bibliography. Follow those hints and do not assume you can use biblatex unless you are explicitly told to use biblatex. biblatex requires a very different workflow than standard thebibliography/classic BibTeX.

5
  • 2
    +1 for "The fact that the class is strictly incompatible with biblatex is a pretty strong reason not to use biblatex for your submission." :-)
    – Mico
    Commented Aug 24, 2022 at 7:15
  • Thanks a lot for the help and for finding the problem! Removing the pagebackref removed the error. To simplify things, this doesn't actually go to the publisher. The publisher shared these LaTex files with us (hence why you probably can't find the .cls class online) and has their own latex files that they apparently can't share. Anyway, this submission is going to an online free resource (arxiv) so the public can easily access it. I couldn't find any problems after removing the pagebackref option, but I'm also not sure what specifically to look for. Any suggestions? Not familiar with it
    – Penguin
    Commented Aug 24, 2022 at 14:26
  • @Penguin arXiv uploads with biblatex have their own issues (see e.g. tex.stackexchange.com/q/358831/35864), so even if this instance of the document is not to be typeset by the publisher you may still want to consider going for BibTeX. (I'm assuming the article is still going to be published with this publisher, otherwise it makes little sense to use their custom class. In that case for consistency reasons it is probably better to use the same bibliography settings in all cases.) ....
    – moewe
    Commented Aug 24, 2022 at 15:43
  • ... Apart from that it is hard to say what to look out for. It is possible that the pagebackref option was the only thing that made your class incompatible with biblatex. But at the same time it is also possible that there is more. If there are no warnings or errors when you try to load biblatex and the citations and bibliography come out OK, you should be fine though.
    – moewe
    Commented Aug 24, 2022 at 15:44
  • @moewe Thanks a lot for all the help! Seems like the pagebackref was the only problem. Submitted successfully : )
    – Penguin
    Commented Aug 24, 2022 at 18:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .