4

How can the bluish color box for hyperlink be reduced in size to better fit line height?

  • 1
    Could you please show your code? My color box fits nearly pefectly: https://i.stack.imgur.com/5VKKJ.png – NelDav Feb 09 '20 at 00:07

1 Answers1

4

The hyperlink box will be the height of the line that it is on. You can put the link within a \mbox{} to minimize the height:

enter image description here

Code:

\documentclass{article}
\usepackage{amsmath}
\usepackage{hyperref}

\newcommand{\GoogleLink}{\href{http://www.google.com}{Google}}

\begin{document}

\GoogleLink \quad \mbox{\GoogleLink}\quad $\dfrac{1}{2}$

\end{document}

Peter Grill
  • 223,288