# Cite hyperlink across two pages

The problem is simple, I have a link for a cite at the end of a page, the name of the author is on the first one and the year on the second, but the link with hyperref is continuous between the two pages (so the number of the page and the fancyfoot and head is on the link).

MWE:

    \documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[authoryear,round]{natbib}
\bibliographystyle{plainnat}
\usepackage[frenchb]{babel}
\usepackage{fancyhdr}
\pagestyle{fancy}

\usepackage{lipsum}

\begin{document}
\lipsum[1-3]
\vspace*{25ex}
I just want to be able to cite a great article talking about the image processing algorithm of the watershed. For this I will cite the article of \cite{watershed}.

\lipsum[1-5]

\bibliography{totobib}
\end{document}


.bib file:

    @article{watershed,
title={The morphological approach to segmentation: the watershed transformation},
author={Beucher, S. and Meyer, F.},
journal={OPTICAL ENGINEERING-NEW YORK-MARCEL DEKKER INCORPORATED-},
volume={34},
pages={433--433},
year={1992},
publisher={Marcel Dekker AG}
}


The cite at the end of the line gives:

How to break the link or forces the cite to be on a single line?

• Welcome to TeX.SX! Please provide the code of a small complete LaTeX document that shows the problem. Add it to your question using the editbutton left below your post. This will help us to analyze and solve the problem. – gernot Sep 21 '16 at 17:05
• Are you committed to having the hyperlink being displayed as a colored rectangle? If you can set the option colorlinks=true, the problem you've encountered goes away automatically. – Mico Mar 28 '17 at 23:59
• This issue has been reported to the maintainer on github.com/ho-tex/hyperref/issues/54 – genodeftest Apr 6 '18 at 13:39

The answers to this question suggested to me a workaround: you can put the citation that generates the anomaly in a \mbox{...}.

\begin{filecontents}{totobib.bib}
@article{watershed,
title={The morphological approach to segmentation: the watershed transformation},
author={Beucher, S. and Meyer, F.},
journal={OPTICAL ENGINEERING-NEW YORK-MARCEL DEKKER INCORPORATED-},
volume={34},
pages={433--433},
year={1992},
publisher={Marcel Dekker AG}
}
\end{filecontents}

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[authoryear,round]{natbib}
\bibliographystyle{plainnat}
\usepackage[frenchb]{babel}
\usepackage{fancyhdr}
\pagestyle{fancy}

\usepackage{lipsum}

\begin{document}
\lipsum[1-3]
\vspace*{25ex}

I just want to be able to cite a great article talking about the image processing algorithm of the watershed. For this I will cite the article of \mbox{\cite{watershed}}.

\lipsum[1-5]

\bibliography{totobib}
\end{document}


This is the output .pdf:

• I can't get the same result, I'm using TeXLive 2019 updated... – Pablo González L Jan 17 '20 at 21:20
• @PabloGonzálezL Try now – CarLaTeX Jan 17 '20 at 22:45
• Thank you very much, now it works perfectly :) – Pablo González L Jan 17 '20 at 22:57
• @PabloGonzálezL You're welcome! – CarLaTeX Jan 18 '20 at 6:24