我正在尝试将 Beamer 演示文稿中超链接的边框从圆角改为矩形(块可以做到这一点)。我还不知道该怎么做,但似乎应该很简单。有什么想法吗?
\documentclass{beamer}
\begin{document}
\begin{frame}{The title}
\label{thelabel}
\hyperlink{thelabel}{\beamerbutton{thetext}}
\end{frame}
\end{document}
答案1
我不知道是否有内置方法可以做到这一点,但您可以简单地定义按钮以适合您的口味。
\documentclass{beamer}
\makeatletter
\setbeamertemplate{button}{%
\setbox\beamer@tempbox=\hbox{{\insertbuttontext}}%
\ht\beamer@tempbox=6pt%
\dp\beamer@tempbox=0pt%
\setbox\beamer@tempbox=\vbox{\box\beamer@tempbox\vskip2pt}%
\beamer@tempdim=\wd\beamer@tempbox%
\beamer@dima=\beamer@tempdim\advance\beamer@dima by2.2pt
\beamer@dimb=\beamer@tempdim\advance\beamer@dimb by4pt
\begin{pgfpicture}{-2pt}{0pt}{\the\beamer@tempdim}{8pt}
\usebeamercolor[bg]{button frame}
\pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\beamer@dimb}{8pt}}
\pgfusepath{fill}
\end{pgfpicture}%
\hskip2pt
\hskip-\beamer@tempdim%
\box\beamer@tempbox%
\kern4pt%
}
\makeatother
\begin{document}
\begin{frame}{The title}
\label{thelabel}
\hyperlink{thelabel}{\beamerbutton{thetext}}
\end{frame}
\end{document}