2

I am using classicthesis package version 4.1. Also I am using the bibliography style file, abbrvunsrtnat.bst, posted here.

I have a problem with using back-referencing. I have more than 70 citations in my document. Among these citations, there are three citations that don't have the Cited on page x at the end of the citation in the bibliography section of the document. The rest of the references are perfectly fine and has the back-reference correctly.

In below, please find a MWE.

\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}



\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{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} 

\usepackage{classicthesis}

\begin{document}
This is test for back-referencing. \citep{ref1,ref2,ref3,ref4}. 


\bibliographystyle{abbrvunsrtnat}

\bibliography{Bibliography}

\end{document}

The problem is in the citation in the form of \citep{ref1,ref2,ref3,ref4}. When I separate it to \citep{ref1}, \citep{ref2}, \citep{ref3}, \citep{ref4} the backreferencing starts working properly. What would be the steps to debug and find the cause of the problem?

I found this post which is for two years ago and presented a few solutions. All my packages are up-to-date. However, it seems that the patch that was given in here has not been applied to natbib.sty. Is there any reason for not applying the patch in the latest version of natbib?

4
  • 1
    natbib has not seen any development since 2010, so I assume it is no longer really maintained.
    – mafp
    May 30, 2013 at 19:52
  • @mafp: Thanks. What do you recommend to use? May 31, 2013 at 0:35
  • 1
    The patch in the answer you linked to works fine, so you can use that for now. A long term solution is to switch to biblatex.
    – mafp
    May 31, 2013 at 8:31
  • I don't know whether this is still relevant to @A2009, but are you using "sort&compress" option for natbib? See "usepackage" option in this question: tex.stackexchange.com/questions/13653/…
    – Hug
    Sep 16, 2014 at 10:01

2 Answers 2

1

Suppose you have a reference like ahm:2013 in your bib file, that does not have the back-reference as desired.

  1. Check whether you actually cite it, i.e., whether you have \cite{ahm:2013} somewhere in your document. This may sound dull, but remember that when you issue a \nocite{*} anywhere in your document, all references will end up in your bibliography chapter, even when not cited explicitly.
  2. Check whether your aux file contains those three lines:

    \citation{ahm:2013}
    \@writefile{brf}{\backcite{ahm:2013}{{1}{(document)}{Doc-Start}}}
    \bibcite{ahm:2013}{{1}{2013}{{ahm}}{{}}}
    
  3. Check whether your brf file contains

    \backcite{ahm:2013}{{1}{(document)}{Doc-Start}}
    

If any of these checks fail, you have to provide more details on how they fail.

0

Maybe you could try this...

\usepackage[hyperpageref]{backref}
\renewcommand*{\backref}[1]{}
\renewcommand*{\backrefalt}[4]{%
\ifcase #1 %
\or
    {\footnotesize Cited on page~#2.}%
\else
    {\footnotesize Cited on pages~#2.}%
\fi

You must log in to answer this question.

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