0

I am trying to get the hyperref package to display the default green boxes around the citation but when typesetted, there is no such formatting. Here is the preamble that I have currently in my TeX file:

\documentclass[11pt,a4paper]{article}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[
 % authoryear,
round, numbers, comma, sort&compress]{natbib}
\usepackage{hyperref}

\begin{document}
\cite{foo}

\begin{thebibliography}{foo}
\bibitem{foo} Foo.

\end{thebibliography}
\end{document}  

I have tried adding the following at different times to try to add the cite borders to no avail:

\usepackage[citebordercolor=green]{hyperref}
\usepackage[citebordercolor=red]{hyperref}
\usepackage[pdfborder=0 0 1]{hyperref}

I'm not sure if there is a conflict between packages in the existing preamble above but I have tried all suggestions I have came across in this forum and others but have not yet been successful. Can you offer any suggestions?

(P.S. I am compiling with XeLaTeX)

lockstep
  • 250,273

1 Answers1

1

Maybe something has fixed after all !! But ..

When compiling the above code using xelatex I get the green boxes, in the TexStudio pdf viewer BUT NOT in SUMATRA!

Acrobat and other readers were fine.

For reference I include is my current configuration.

The green boxes can be seen with the same original code

% !TeX TS-program = xelatex

\documentclass[11pt,a4paper]{article} \usepackage[english]{babel} \usepackage[utf8]{inputenc} \usepackage[ % authoryear, round, numbers, comma, sort&compress]{natbib} \usepackage{hyperref}

\begin{document} \cite{foo}

\begin{thebibliography}{foo} \bibitem{foo} Foo.

\end{thebibliography} \end{document}

This is XeTeX, Version 3.14159265-2.6-0.999992 (MiKTeX 20.7) (preloaded format=xelatex 2020.10.10) 26 OCT 2020 18:49 entering extended mode **"./green boxes xelatex.tex" ("green boxes xelatex.tex" LaTeX2e <2020-02-02> patch level 5

output

Related to

no border around hyperlinks with hyperref

Simon Dispa
  • 39,141