1

I am using classicthesis package version 4.1. The following is an example of the problem that I have with back-referencing. The resulted document does not have back-referencing in the bibliography although I enabled it by setting: \setboolean{enable-backrefs}{true}.

enter image description here

I used the bibliography style, abbrvunsrtnat.bst, that has been posted in here.

\documentclass[
                openright,
                titlepage, numbers=noenddot, headinclude,%1headlines,
                footinclude=true, cleardoublepage=empty,
                BCOR=30mm, paper=letter, fontsize=11pt, % Binding correction, paper type and font size
                ngerman, american, % Languages
                ]{scrreprt}


\PassOptionsToPackage{%
                    eulerchapternumbers,
                    listings,
                    pdfspacing,
                    subfig,
                    beramono,
                    parts}{classicthesis}


\PassOptionsToPackage{square,numbers,sort&compress}{natbib}
 \usepackage{natbib}


\usepackage[position=t,singlelinecheck=off,font={it}]{subfig}

\usepackage{ifthen} % Allows the user of the \ifthenelse command
\newboolean{enable-backrefs} % Variable to enable backrefs in the bibliography
\setboolean{enable-backrefs}{true} % Variable value: true or false

% ---------------------------------------------------------------------------------------
\newcommand{\backrefnotcitedstring}{\relax} % (Not cited.)
\newcommand{\backrefcitedsinglestring}[1]{(Cited on page~#1.)}
\newcommand{\backrefcitedmultistring}[1]{(Cited on pages~#1.)}
\ifthenelse{\boolean{enable-backrefs}} % If backrefs were enabled
{
        \PassOptionsToPackage{hyperpageref}{backref}
        \usepackage{backref} % to be loaded after hyperref package 
                \renewcommand{\backreftwosep}{ and~} % separate 2 pages
                \renewcommand{\backreflastsep}{, and~} % separate last of longer list
                \renewcommand*{\backref}[1]{}  % disable standard
                \renewcommand*{\backrefalt}[4]{% detailed backref
                \ifcase #1 
                    \backrefnotcitedstring
                \or
                    \backrefcitedsinglestring{#2}
                \else
                    \backrefcitedmultistring{#2}
                \fi}
}{\relax} 

\PassOptionsToPackage{pdftex,hyperfootnotes=false,pdfpagelabels}{hyperref}
\usepackage{hyperref}  % backref linktocpage pagebackref
\pdfcompresslevel=9
\pdfadjustspacing=1

\hypersetup{
            colorlinks=true, linktocpage=true, pdfstartpage=1, pdfstartview=FitV,
            breaklinks=true, pdfpagemode=UseNone, pageanchor=true, pdfpagemode=UseOutlines,
            plainpages=false, bookmarksnumbered, bookmarksopen=true, bookmarksopenlevel=1,
            hypertexnames=true, pdfhighlight=/O, %
}   

\usepackage{classicthesis}

\begin{document}
This is test for back-referencing. \citep{knuth:1976}. 


\bibliographystyle{abbrvunsrtnat}

\bibliography{Bibliography}

\end{document}
3
  • You even have it in your code: backref should be loaded after hyperref, but you do it the other way round.
    – mafp
    May 23 '13 at 21:23
  • 1
    @@mafp: Thanks a lot. I loaded backref after hyperref and it worked perfectly.
    – user578
    May 23 '13 at 21:28
  • @Ahmad thanks! It fixed my problem. But on my case, I needed to load \usepackage[hyperpageref]{backref} before my citation package \usepackage[alf]{abntex2cite}. That package explicitly only enables the back references when the package backref is loaded: https://github.com/abntex/abntex2/blob/master/tex/latex/abntex2/abntex2cite.sty#L298-L302
    – user
    Aug 25 '17 at 18:16
1

You even have it in your code: backref should be loaded after hyperref, but you do it the other way round.

It fixed my problem, but on my case, I needed to load \usepackage[hyperpageref]{backref} before my citation package \usepackage[alf]{abntex2cite}. That package explicitly only enables the back references when the package backref is loaded:

  1. https://github.com/abntex/abntex2/blob/master/tex/latex/abnt‌​ex2/abntex2cite.sty#‌​L298-L302

Not the answer you're looking for? Browse other questions tagged or ask your own question.