BibTeX, biblatex and biberhyperref | Abnormal Behavior of References

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
leinad
Posts: 3
Joined: Mon Jul 11, 2011 9:00 pm

hyperref | Abnormal Behavior of References

Post by leinad »

Hi,

I am using the natbib and hyperref packages for my references and encounter the following abnormal behavior:

Normally, only the citations are hyperlinked. However,
when there is a page break in a citation and the page has footnotes, then the footnotes will be hyperlinked to the citation, as well.

So let's say the pages look like this:

[page 1, bottom]
Lorem ipsum (Smith 1990,
[automatic pagebreak]

[page 1 footnotes]

[Page 2, top]
Miller 2003)

then all page 1 footnotes will be hyperlinked to the last citation on page 1 (here, Smith 1990). This should obviously not happen. I would greatly appreciate any hints how to fix this.

Thanks,
Daniel

The preamble:

Code: Select all

\documentclass[12pt,abstractoff]{article}
%\usepackage[german]{babel}
\usepackage[ansinew]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{times}
\usepackage{fancyhdr}
\usepackage{fancyref}
\usepackage{mathptmx}
\usepackage[sumlimits]{amsmath}
\usepackage{amssymb}
\usepackage{setspace}
\usepackage{sectsty}
\usepackage{titlesec}
\usepackage{titletoc}
\usepackage{tocloft}
\usepackage{graphicx}
\usepackage{keyval}
\usepackage{booktabs}
\usepackage{ccaption}
\usepackage{multirow}
\usepackage{threeparttable}
\usepackage{hyperref}
\usepackage{lscape}
\usepackage{natbib}
Last edited by Stefan Kottwitz on Sun Jul 24, 2011 12:09 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

5gon12eder
Posts: 126
Joined: Sun Feb 13, 2011 8:36 pm

hyperref | Abnormal Behavior of References

Post by 5gon12eder »

You may either put the \cite command into an \mbox, thus preventing it from breaking across pages, and forget about the issue or make a MWE so we can try to answer it.
I'm using pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian).
leinad
Posts: 3
Joined: Mon Jul 11, 2011 9:00 pm

hyperref | Abnormal Behavior of References

Post by leinad »

Hi,

Thanks for your response. Here is an MWE: Two parts. 1. Tex file (you have to adjust the bib file name and style at the end of the Tex file, 2. Bibtex entries

Code: Select all

\documentclass[12pt]{article}
%\usepackage[german]{babel}
\usepackage[ansinew]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{times}
\usepackage{fancyhdr}
\usepackage{fancyref}
\usepackage{mathptmx}
\usepackage[sumlimits]{amsmath}
\usepackage{amssymb}
\usepackage{setspace}
\usepackage{sectsty}
\usepackage{titlesec}
\usepackage{titletoc}
\usepackage{tocloft}
%%\usepackage{pstricks}
%%\usepackage{pstcol,pst-node,pst-tree}
\usepackage{graphicx}
\usepackage{keyval}
%%\usepackage[usenames]{color}
\usepackage{booktabs}
\usepackage{ccaption}
\usepackage{multirow}
\usepackage{threeparttable}
%\usepackage[gennarrow]{eurosym}
\usepackage{hyperref}
\usepackage{lscape}
\usepackage{rotating}



%\captiontitlefont{\sffamily\footnotesize}
\captionnamefont{\bfseries\centering}
\captiondelim{} 
\captionstyle{\linebreak} 
\captiontitlefont{\scshape\centering}
\setlength{\belowcaptionskip}{0pt} 
\postcaption{}

%%Referenzen
%%\renewcommand{\harvardand}{und}

%%\pagestyle{fancy}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%Anleitung siehe fancyhdr%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\renewcommand{\abstract}{\rmfamily\quote}

%%Inhaltsverzeichnis
%%\renewcommand{\contentsname}{Inhalt}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%linker Seitenrand = 25mm + hoffset %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%Horizontalabstand zum linken Seitenrand (0=25mm)
\hoffset=0mm

%%zus�tzlicher linker Seitenrand bei ungeraden Seiten
\oddsidemargin=0mm

%%zus�tzlicher linker Seitenrand bei geraden Seiten
\evensidemargin=0mm

%%Breite des Textfeldes, nur Text, ohne Randbemerkungen
\textwidth=160mm

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%margins, Randbemerkungen, sind in der Regel centered%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%Abstand des Randnotizfeldes links vom Textk�rper (0=-5mm)
\marginparsep=5mm

%%Breite der Randnotiz, beginnend links vom Textk�rper+marginparsep
\marginparwidth=25mm

%%Vertikalabstand zum oberen Blattrand 0=25mm. Hier f�ngt fr�hestens der Text an
\voffset=-20mm

%%Abstand der Kopfzeile vom oberen Seitenrand (von 25mm+voffset)
\topmargin=6mm

%%H�he der Kopfzeile (nach 25mm+voffset+topmargin)
\headheight=12mm

%%Abstand des normalen Textes von der Kopfzeile (nach 25mm+voffset+topmargin+headheight)
\headsep=6mm
%%-- hier f�ngt der Flie�text an (nach 25mm+voffset+topmargin+headheight+headsep)

%%H�he des Textfeldes, nur Text, ohne Kopf- und Fu�zeile und deren Abst�nde
\textheight=225mm

%%Gesamtbstand des Fu�es vom Textk�rper, inklusive des Fu�textes, 0mm = Fu� direkt unter dem Text
\footskip=9mm


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%Formatierung der Standardschriften f�r Roman und serifenlose Schrift%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\renewcommand{\encodingdefault}{T1}
%\renewcommand{\rmdefault}{uca}
%\renewcommand{\sfdefault}{ucs}
%\renewcommand{\ttdefault}{aett}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%Nummerierungstiefe der �berschriften%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setcounter{secnumdepth}{0}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%Listungstiefe des Inhaltsverzeichnisses%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setcounter{tocdepth}{4}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%Formatierung der Zeileneinz�ge und Zeilenabst�nde bei Abs�tzen%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\parindent=0pt %%Einschub der ersten Zeile%%
\parskip=6pt %%Vertikalabstand zwischen den Abs�tzen%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%Linienformatierung in Tabellen%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%\heavyrulewidth=1.25pt \lightrulewidth=1pt \cmidrulewidth=1pt

%%%%%%%%%%%%%
%%%Margins%%%
%%%%%%%%%%%%%
%%\marginpar{\footnotesize{\textsf{\hspace{0pt}{TEXT}}}}

% Natbib setup for author-year style
\usepackage{natbib}
 \bibpunct[, ]{(}{)}{;}{a}{}{;}%
 \def\bibfont{\small}%

 \def\bibsep{\smallskipamount}%
 \def\bibhang{24pt}%
 \def\newblock{\ }%
 \def\BIBand{and}%




%%%%%%%%%%%%%%%%
\begin{document}
%%%%%%%%%%%%%%%%


\vspace*{560pt}

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\footnote{This is Cicero Jibberish.} Ut enim ad minim veniam \citep{Rawson_1983,Bett_1994,Dyck_1996}, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

\clearpage
\pagebreak[4]

\bibliography{name} % if more than one, comma separated
\bibliographystyle{style} % outcomment this and next line

%%%%%%%%%%%%%%%%
\end{document}
%%%%%%%%%%%%%%%%

Code: Select all

%%%%%%%%%%%%%%%%
Bibtex entries
%%%%%%%%%%%%%%%%
@book{Rawson_1983,
  title={Cicero: a portrait},
  author={Rawson, E.},
  year={1983},
  publisher={Duckbacks}
}

@book{Dyck_1996,
  title={A commentary on Cicero, De officiis},
  author={Dyck, A.R. and Cicero, M.T.},
  year={1996},
  publisher={Univ of Michigan Pr}
}

@article{Bett_1994,
  title={Cicero Academicus: Recherches sur les Acad{\'e}miques et sur la Philosophie Cic{\'e}ronienne.},
  author={Bett, R.},
  journal={The Philosophical Review},
  volume={103},
  number={3},
  pages={572--574},
  year={1994},
  publisher={JSTOR}
}
Last edited by Stefan Kottwitz on Sun Jul 24, 2011 12:08 pm, edited 1 time in total.
paul
Posts: 49
Joined: Thu Apr 08, 2010 5:56 am

hyperref | Abnormal Behavior of References

Post by paul »

leinad wrote:Hi,

I am using the natbib and hyperref packages for my references and encounter the following abnormal behavior:

Normally, only the citations are hyperlinked. However,
when there is a page break in a citation and the page has footnotes, then the footnotes will be hyperlinked to the citation, as well.
And the header and footer of the pages concerned. Try

Code: Select all

\hypersetup{breaklinks}
(Usually my solution is to get the final layout right and then manually split any links that break across pages.)
leinad
Posts: 3
Joined: Mon Jul 11, 2011 9:00 pm

Re: hyperref | Abnormal Behavior of References

Post by leinad »

Maybe I am putting the \hypersetup command in the wrong place (I was not quite sure where after reading your post), but this does not seem to work for me.

I also typically do the "final" thing and then try to avoid page breaks over citations, but this gets ever more annoying the more often you have to do it---in particular since nothing is ever final.

Daniel
Post Reply