指定外部應用程式開啟由latex產生的pdf連結中的文件

指定外部應用程式開啟由latex產生的pdf連結中的文件

在 LaTeX-beamer 套件產生的 beamer 簡報中,我通常會執行以下操作:

\documentclass{article}

\usepackage[hidelinks]{hyperref}

\begin{document}

\href{run:myjava.jar}{Open Java Application}  
\href{run:mypdf.pdf}{Open a pdf Document}  
\href{run:myfile.custom}{Open a custom filetype}

\end{document}

evince當使用或查看生成的pdf並okular單擊鏈接時,我的Linux系統使用預定義的應用程式打開相應的文件(我猜它與gnome-open,exo-open或 所使用的相同xdg-open)。

現在有什麼方法可以在我的 LaTeX 程式碼中指定對給定檔案使用系統預設值之外的另一個應用程式嗎?像這樣的東西:

\documentclass{article}

\usepackage[hidelinks]{hyperref}

\begin{document}

\open[...path to oracle java...]{run:myjava.jar}{Open Java Application with Oracles Java}  %%opens with oracle java  
\open[... path to openjdk java.. ]{run:myjava.jar}{Open Java Application with openjdk}
\open[..path to okular]{run:mypdf.pdf}{Open a pdf Document with okular}  
\open[..path to evince]{run:mypdf.pdf}{Open a pdf Document with evince}  
\open[...path to my custom helper application...]{run:myfile.custom}{Open a custom filetype}
\end{document}

相關內容