\attachfile 在最終 PDF 中添加註釋而不是附件 2024-6-18 • pdf attachfile 我想將文件附加到 XeLaTeX 生成的最終 PDF 中,因此我使用了以下 MWE: \documentclass{article} \usepackage{attachfile2} \begin{document} \attachfile{foo.txt}{bar} \end{document} 但是,編譯後,我得到的不是附件而是註解: 如您所見,我的命令產生註釋,但文件內容不存在。 那麼,如何在attachfile2包中添加附件而不是註釋呢? 答案1 使用嵌入檔案包: \documentclass{article} \usepackage{embedfile} \begin{document} \embedfile{test-ansi.tex} text \end{document} 相關內容