1

If I use scalebox with href, (as in \scalebox{0.5}{\href{mailto:someone}{shown mail address}}), then the hyperlink is not clickable anymore (meaning I can’t click on the shown mail address to mail to someone).

I see that this is probably a misuse of \scalebox – but is there a way of resizing/scaling hyperlinks, or rather: any structure containing hyperlinks, preserving their functionality?

What I need to do is to resize a tabular containing hyperlinks which doesn’t fit the page. So just putting the \scalebox inside the second argument of \href won’t work!

I’m using TeX Live 2013 and compile with lualatex. Please tell me if you need more info.

4
  • scaling a table is so wrong, it just makes inconsistent font sizes and there are almost always better ways to achieve whatever effect is needed. Commented Nov 4, 2014 at 9:26
  • @DavidCarlisle … but how?
    – k.stm
    Commented Nov 4, 2014 at 9:29
  • You haven't given any indication of why you think you need the table scaling so I can't tell what to do instead. If you are scaling it to make it bigger, just don't scale, if you are scaling to make it smaller, fix the underlying problem that is making it too big, use \small or use a different layout that allows the text to wrap or... Commented Nov 4, 2014 at 9:39
  • @DavidCarlisle Okay, so are thinking in that line. The tabular should be smaller so it fits the page size. It is part of a not too well thought-out layout I use as a header for the exercises I need to hand in at university. The clean solution would probably to adapt the layout to the situation, yes. But I’m still interested in a solution or hack to this particular problem.
    – k.stm
    Commented Nov 4, 2014 at 9:53

1 Answer 1

1

Put \scalebox inside:

\documentclass{article}
\usepackage{graphicx}
\usepackage{hyperref}
\begin{document}
  \href{mailto:someone}{\scalebox{1}{shown mail address}}

  \href{mailto:someone}{\scalebox{0.5}{shown mail address}}

  \href{mailto:someone}{\footnotesize shown mail address}

  \href{mailto:someone}{\scriptsize shown mail address}
\end{document}

enter image description here

I would prefer changing the font size though.

2
  • The problem is that I need to rescale a whole tabular with hrefs inside. I didn’t make that clear, I think.
    – k.stm
    Commented Nov 4, 2014 at 8:21
  • @k.stm I broke my crystal ball and too lazy to type the entire code. :-)
    – user11232
    Commented Nov 4, 2014 at 9:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .