将隐形/幽灵超链接/Href 的形状与任何 Tikz 形状匹配

将隐形/幽灵超链接/Href 的形状与任何 Tikz 形状匹配

我是 LateX 的新手。我尝试使用此处的示例:使 TikZ 节点可超链接创建带有超链接的按钮。我想知道是否有人可以告诉我如何允许圆角?目前,鼠标悬停时的突出显示超出了我的 MWE 角落处的按钮边框。请在 OverLeaf 上查看我的可编辑 MWE:https://www.overleaf.com/8987688858pxfhygschhmk我想知道是否有办法使突出显示符合按钮边框?

这是另一个 MWE:


\documentclass{article}

\usepackage{tikz, pgfplots}
\pgfplotsset{compat=1.18}
\usetikzlibrary{fit, shapes, automata, backgrounds, positioning, shadows, patterns, calc, arrows.meta, shapes.geometric, decorations.shapes, decorations.fractals, decorations.markings, decorations.pathmorphing}

\usepackage[hidelinks]{hyperref}

\tikzset{
    test highlight/.style={draw=black, draw opacity=0.8},
    hyperlink node/.style={
        alias=sourcenode,
        append after command={
            let \n0={\pgfkeysvalueof{/pgf/outer xsep}},
                \n1={\pgfkeysvalueof{/pgf/outer ysep}},
                \p1=([shift={(\n0, -\n1)}] sourcenode.north west),
                \p2=([shift={(-\n0, \n1)}] sourcenode.south east),
                \n2={\x2-\x1},
                \n3={\y1-\y2} in
            node [inner sep=0pt, outer sep=0pt, anchor=north west, at=(\p1), test highlight] {\hyperlink{#1}{\XeTeXLinkBox{\phantom{\rule{\n2}{\n3}}}}}
        }
    }
}

\begin{document}

\begin{tikzpicture}[overlay, button/.style={fit={(0cm,0cm) (6.3cm,1.5cm)}, fill=blue, draw=none, drop shadow, text=white, rounded corners=.75cm, inner sep=0pt, outer sep=0pt, label=center:\textcolor{white}{\huge\textsc{Read Me}}}]
  \node[button, hyperlink node=bottom] at (0cm,0cm) {};
\end{tikzpicture}

\vfill
\hypertarget{bottom}{{Bottom of Page}}
\end{document}

相关内容