1

I am using elegantbook.sty to write a book.

The elegantbook.sty is using biblatex which is not compatible with backref.

Anyone knows and could help with how to enable using beackref or similar functionality in elegantbook.sty? I was trying to change biblatex to natbib in elegantbook.sty source file, but that produced many errors on things that colided with rest of the elegantbook.sty.

This is the last bit missing in my book, so help would be much appreciated.

MWE:

\documentclass[12pt,b5paper,citestyle=numeric-comp,bibstyle=numeric,color=blue]{elegantbook}

\addbibresource[location=local]{reference.bib}

\begin{document}
    
    \noindent Lorem ipsum...

    \printbibliography[heading=bibintoc, title=\ebibname]

\end{document}
4
  • biblatex has a backref option, which you can set to true, just like you set other biblatex options.
    – gusbrs
    Mar 16 at 11:54
  • Many thanks! It indeed works when I add backref=true as an option to \RequirePackage[backend=\ELEGANT@bibend,citestyle=\ELEGANT@citestyle, bibstyle=\ELEGANT@bibstyle,backref=true]{biblatex} in elegantbook.sty. Could you help me with how I can pass this option without modifying the elegantbook.sty? I tried \PassOptionsToPackage{backref=true}{biblatex} before and after \documentclass[12pt,b5paper]{elegantbook} and it didn't work.
    – Marcin
    Mar 16 at 12:11
  • I don't know elegantbook and can't seem to find it in TeX Live. But you could probably set this with biblatex's \ExecuteBibliographyOptions.
    – gusbrs
    Mar 16 at 12:17
  • Yes, I confirm it works: adding \ExecuteBibliographyOptions{backref=true} just after \documentclass[12pt,b5paper]{elegantbook} solves my problem. Many, many thanks!
    – Marcin
    Mar 16 at 12:22

1 Answer 1

2

I don't have elegantbook.cls here (it seems to be on CTAN, but only on MiKTeX, don't know why, given the license is LPPL), so I can't test it. But the class seems to load biblatex and the backref package is documented to be incompatible with it. However, biblatex itself provides comparable functionality, which can be enabled with the backref option. Since the class already loads the package, you can set it in your preamble with:

\ExecuteBibliographyOptions{backref=true}
1
  • It is fully solved now - many thanks again!
    – Marcin
    Mar 16 at 14:28

You must log in to answer this question.

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