This is minimal (not) working example that comes from much bigger document:



    \begin{adjustbox}{max width=\textwidth}
        Programming language & \rubylink         & \rubylink, \erlanglink  & \pythonlink, \powershelllink  & \pythonlink           \\\hline
        Something            & aaaaaaaaaaaaaaaaa & bbbbbbbbbbbbb           & ccccccccccccc                 & dddddddddddddddddddd
    \caption{This is test}


When I compile it with the command latexmk -pdf it produces correct PDF:

Correct output

But when I compile with XeLaTeX, like that: latexmk -pdf -pdflatex=xelatex it produces:

enter image description here

Unfortunately I need to use XeLaTeX and the above example needs to produce correct PDF. How can I fix misplaced hyperlinks?

  • I think this has come up before (scaling pdf links is tricky) but scaling tables should only be a last resort, is there really no alternative? May 5, 2017 at 20:37
  • I have 5-columns table with comparison of some software. Unfortunately this table is (a little bit) too wide to fit \textwidth. On the one hand too wide table looks ugly, but on the other hand, as @Ulrike Fischer mentioned, scaling a tabular is bad typesetting. May 6, 2017 at 8:24
  • yes but you would not justify a paragraph of text by applying arbitrary scale so having inconsistent fonts and spacing, so why do it to the text if it is in a tabular ? It should always be possible to use \small or reduce \tabcolsep or some other way of adjusting the table. May 6, 2017 at 8:44
  • I've changed table's font to \footnotesize and it looks much better now. Thank you! May 6, 2017 at 8:53

1 Answer 1


Scaling a tabular is bad typesetting. It leads to uneven font sizes.

Your problem is due to a change in xetex.def which broke skaling of link areas. This problem affects a current texlive 2016, texlive 2017 pretest and a current miktex.

As a workaround until the problem is resolved you can try to revert to the older definition by adding to your document.

  \special{x:gsave}\special{x:scale \Gscale@x\space\Gscale@y}}

You can also use tikz instead as it scales links area when xelatex is used correctly (it doesn't with pdflatex)



abc \rubylink cde

\scalebox{2}{abc \rubylink cde}

\tikz[scale=2,transform shape]\node[inner sep=0]{abc \rubylink cde};


enter image description here

You must log in to answer this question.

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