hyperref 和 beamer:元資料 | “pdftitle”不工作

hyperref 和 beamer:元資料 | “pdftitle”不工作
  • 我想要產生一個beamer演示文稿,並且想要 PDF 文件中的一些元資料。
  • 因此,我使用基本模板,但pdftitle無法識別標籤(未顯示在 PDF 屬性中,請參閱螢幕截圖中的德語“Titel”)。
  • 這看起來很簡單 - 恐怕我沒有看到明顯的情況。

\documentclass{beamer}

\usepackage{hyperref}
\hypersetup{
    pdftitle = {pdftitle}, % <-- Missing in PDF
    pdfauthor = {pdfauthor},
    pdfsubject = {pdfsubject},
    pdfkeywords = {keyword1 keyword2},
}

\begin{document}

\begin{frame}
    \frametitle{Test}
    Test
\end{frame}

\end{document}

在此輸入影像描述

答案1

預設情況下,嘗試從命令中自動beamer計算出(類似地,從命令中設定)。在範例中沒有和。pdftitle\titlepdfauthor\author\title\author

自動執行的方式總是被來自at 的pdftitle資訊(或缺少資訊)覆蓋。如果此時尚未設置,則將為空。特別是,這意味著需要在對元資料產生任何影響之前進行設定。如果稍後發布,元資料不會改變。的實作略有不同,它在執行點被覆蓋。特別是,如果沒有命令,則不會被覆蓋。\title\begin{document}\titlepdftitle\title\begin{document}pdfauthor\authorpdfauthor\author

選項1之前提供\title和資訊。\author\begin{document}

\title{pdftitle}
\author{pdfauthor}
% before \begin{document}!

選項2\title透過\author設定 class 選項停用自動產生 PDF 元數據

usepdftitle=false

並自行管理元資料。

相關內容