Oblique / inclined / rotated / slanted hyperlinks are possible!
The PDF specification defines the /QuadPoints
entry in the /Link
annotation dictionary, which defines the corner coordinates of any number of quadrangles that only need be entirely inscribed within the usual, horizontal link rectangle and which further determine the mouse sensitive area of the hyperlink.
In principle, arbitrarly shaped regions in a document page may be turned into hyperlinks using this method, simply by superposition of multiple quadrangles. Individual quadrangles do not need be rectangular nor be horizontally aligned.
Alas, as usual, such advanced PDF features require Acrobat Reader.
Example (NB: for Acrobat Reader):
\documentclass{article}
\usepackage{hyperref}
\usepackage{tikz}
\usepackage{graphicx}
\usetikzlibrary{calc}
\makeatletter
% patch hyperref to also include the /QuadPoints array
\let\Hy@setpdfborderOrig\Hy@setpdfborder
\def\Hy@setpdfborder{
\QuadPoints
\Hy@setpdfborderOrig
}
\def\writeAux{\protected@write\@mainaux}
\def\QuadPoints{}
\makeatother
\newcounter{srcnd}
\begin{document}
\tikzset{
hyperlink node/.style={
alias=sourcenode,
append after command={
let \p1 = (sourcenode.south west),
\p2 = (sourcenode.south east),
\p3 = (sourcenode.north east),
\p4 = (sourcenode.north west),
\p5 = (sourcenode.center)
in
node [inner sep=0pt, outer sep=0pt,at=(\p1)] {\pdfsavepos%
\writeAux{}{%
\string\expandafter\string\xdef\string\csname\space srcnd\thesrcnd.x1\string\endcsname{%
\noexpand\hypercalcbp{\noexpand\number\pdflastxpos sp}}%
\string\expandafter\string\xdef\string\csname\space srcnd\thesrcnd.y1\string\endcsname{%
\noexpand\hypercalcbp{\noexpand\number\pdflastypos sp}}}%
}
node [inner sep=0pt, outer sep=0pt,at=(\p2)] {\pdfsavepos%
\writeAux{}{%
\string\expandafter\string\xdef\string\csname\space srcnd\thesrcnd.x2\string\endcsname{%
\noexpand\hypercalcbp{\noexpand\number\pdflastxpos sp}}%
\string\expandafter\string\xdef\string\csname\space srcnd\thesrcnd.y2\string\endcsname{%
\noexpand\hypercalcbp{\noexpand\number\pdflastypos sp}}}%
}
node [inner sep=0pt, outer sep=0pt,at=(\p3)] {\pdfsavepos%
\writeAux{}{%
\string\expandafter\string\xdef\string\csname\space srcnd\thesrcnd.x3\string\endcsname{%
\noexpand\hypercalcbp{\noexpand\number\pdflastxpos sp}}%
\string\expandafter\string\xdef\string\csname\space srcnd\thesrcnd.y3\string\endcsname{%
\noexpand\hypercalcbp{\noexpand\number\pdflastypos sp}}}%
}
node [inner sep=0pt, outer sep=0pt,at=(\p4)] {\pdfsavepos%
\writeAux{}{%
\string\expandafter\string\xdef\string\csname\space srcnd\thesrcnd.x4\string\endcsname{%
\noexpand\hypercalcbp{\noexpand\number\pdflastxpos sp}}%
\string\expandafter\string\xdef\string\csname\space srcnd\thesrcnd.y4\string\endcsname{%
\noexpand\hypercalcbp{\noexpand\number\pdflastypos sp}}}%
}
node [inner sep=0pt, outer sep=0pt,at=(\p5)] {%
\makebox[0pt][c]{{%
\edef\QuadPoints{/QuadPoints [
\csname srcnd\thesrcnd.x1\endcsname\space\csname srcnd\thesrcnd.y1\endcsname\space
\csname srcnd\thesrcnd.x2\endcsname\space\csname srcnd\thesrcnd.y2\endcsname\space
\csname srcnd\thesrcnd.x3\endcsname\space\csname srcnd\thesrcnd.y3\endcsname\space
\csname srcnd\thesrcnd.x4\endcsname\space\csname srcnd\thesrcnd.y4\endcsname\space
]}%
\hyperlink{#1}{%
\raisebox{-\height}{%
\tikz \useasboundingbox (\p1) -- (\p2) -- (\p3) -- (\p4) -- cycle;
}%
}%
}}%
\stepcounter{srcnd}%
}
}
}
}
\tikz \node [draw, inner sep=2ex,hyperlink node=pagetwo,rotate=0] {Go to Page Two};
\bigskip
\tikz \node [draw, inner sep=2ex,hyperlink node=pagetwo,rotate=60] {Go to Page Two};
\bigskip
\tikz \node [draw, inner sep=2ex,hyperlink node=pagetwo,rotate=40] {Go to Page Two};
\bigskip
\tikz \node [draw, inner sep=2ex,hyperlink node=pagetwo,rotate=135] {I said, Page Two};
\clearpage
\hypertarget{pagetwo}{Page Two}
\end{document}
\hyperlink{pagetwo}{ \tikz \node [draw, inner sep=2ex, rotate=60] {Go to Page Two}; }