当我使用 LaTeX 编译以下 mwe 时,引导我观看视频的可点击表面仅在蓝色图像周围。当我使用 XeLaTeX 编译时,单击页面上的任意位置都会引导我观看视频。
我怎样才能使 XeLaTeX 输出表现得像 LaTeX 输出?
\documentclass{article}
\usepackage{pstricks}
\usepackage{hyperref}
\newcommand{\mypic}{
\psset{unit=0.055}
\begin{pspicture}(-5,-5)(5,5)
\pscircle[linewidth=1.2, linecolor=blue](0,0){4.3}
\rput{-90}(-1.4,2.5){\pspolygon[linearc=0.4, fillstyle=solid, fillcolor=blue, linecolor=blue](0,0)(5,0)(5;60)}
\end{pspicture}
}
\begin{document}
Some text
\begin{center}
\href{https://www.youtube.com/watch?v=mxI9ba6Rexc}{\mypic}
\end{center}
More text
\end{document}
答案1
首先将其创建为图像。仅需要xelatex --shell-escape <file>
:
\documentclass{article}
\usepackage{fontspec}
\usepackage{fancyvrb}
\usepackage{graphicx}
\usepackage{hyperref}
\begin{document}
\begin{VerbatimOut}{HR.tex}
\documentclass[pstricks]{standalone}
\begin{document}
\psset{unit=0.055cm}
\begin{pspicture}(-5,-5)(5,5)
\pscircle[linewidth=1.2, linecolor=blue](0,0){4.3}
\rput{-90}(-1.4,2.5){\pspolygon*[linearc=0.4,linecolor=blue](0,0)(5,0)(5;60)}
\end{pspicture}
\end{document}
\end{VerbatimOut}
\immediate\write18{xelatex HR}%%
Some text
\begin{center}
\href{https://www.youtube.com/watch?v=mxI9ba6Rexc}{\includegraphics{HR}}
\end{center}
More text
\end{document}