Is it possible to prevent citations from being shown out of the page margin?
Example:
Code: Select all
Code, edit and compile here:
\documentclass{article}\usepackage[a4paper, showframe]{geometry}\usepackage{filecontents}\usepackage{natbib}\bibliographystyle{abbrvnat}\setcitestyle{authoryear}\begin{filecontents}{bibl.bib}@book{book1,author = {Primeiro Ultimo},title = {Example without special characters},year = {2016}}@book{book2,author = {Primeiro \'Ultimo},title = {Example with accent},year = {2016}}\end{filecontents}\begin{document}bbbbbbbbbbbb bbbbbbbbbbb bbbbbbbbb bbbbbbbbb bbbbbbbbbbbb bbbbbbbbbbbbb \cite{book1}% hyphenatedbbbbbbbbbbbb bbbbbbbbbbb bbbbbbbbb bbbbbbbbb bbbbbbbbbbbb bbbbbbbbbbbbb \cite{book2}% out of marginbbbbbbbbbbbb bbbbbbbbbbb bbbbbbbbb bbbbbbbbb bbbbbbbbbb bbbbbbbbbb \cite{book1}% out of marginbbbbbbbbbbbb bbbbbbbbbbb bbbbbbbbb bbbbbbbbb bbbbbbbbbb bbbbbbbbbb \cite{book2}% out of margin\bibliography{bibl}\end{document}
I have tried to solve this by loading the packages


Thank you.