![通过点击链接/按钮来更改图像/情节?](https://linux22.com/image/452594/%E9%80%9A%E8%BF%87%E7%82%B9%E5%87%BB%E9%93%BE%E6%8E%A5%2F%E6%8C%89%E9%92%AE%E6%9D%A5%E6%9B%B4%E6%94%B9%E5%9B%BE%E5%83%8F%2F%E6%83%85%E8%8A%82%EF%BC%9F.png)
答案1
这可以通过 PDF Layers 包实现ocgx2
。请注意使用 common 选项radiobtngrp
使分组图层的可见性相互排斥。
\documentclass{article}
\usepackage{hyperref}
\usepackage{ocgx2}
\usepackage{graphicx}
\begin{document}
\begin{center}
\makebox[0pt][l]{%
\begin{ocg}[radiobtngrp=letters]{A}{A}{on}
\includegraphics[width=\linewidth]{example-image-a}
\end{ocg}
}%
\makebox[0pt][l]{%
\begin{ocg}[radiobtngrp=letters]{B}{B}{off}
\includegraphics[width=\linewidth]{example-image-b}
\end{ocg}
}%
\begin{ocg}[radiobtngrp=letters]{C}{C}{off}
\includegraphics[width=\linewidth]{example-image-c}
\end{ocg}
\showocg{A}{Letter ``A''}\quad
\showocg{B}{Letter ``B''}\quad
\showocg{C}{Letter ``C''}
\end{center}
\end{document}