includepdf 包含有點的文件

includepdf 包含有點的文件

我想合併一些 pdf,同時在每個 pdf 的目錄中新增一個條目。我正在嘗試使用腳本來執行此操作,因此我不想更改任何檔案名稱。我的 LaTeX 程式碼簡化後如下所示:

\documentclass{article}
\usepackage{pdfpages}
\usepackage{hyperref}
\usepackage[utf8]{inputenc}
\usepackage{bookmark}
\usepackage{graphicx}
\usepackage[multidot]{grffile}

\title{Graph Theory}
\date{}
\author{}

\begin{document}

\cleardoublepage
\phantomsection
\addcontentsline{toc}{section}{Basics of Graph Theory}
\includepdf[pages=-]{Basics of Graph Theory}

\cleardoublepage
\phantomsection
\addcontentsline{toc}{section}{Spectral Graph Theory 2: Theorems on Matrices. The Laplacian}
\includepdf[pages=-]{"Spectral Graph Theory 2: Theorems on Matrices. The Laplacian"}

\cleardoublepage
\phantomsection
\addcontentsline{toc}{section}{Random walks in graphs. The probabilistic method}
\includepdf[pages=-]{"Random walks in graphs. The probabilistic method"}

\end{document}

第一個案例運作正常,接下來的兩個案例則不然,顯然是因為文件中有一個點。我嘗試了在此頁面中找到的許多方法,但沒有一個起作用。我要怎麼解決這個問題?

答案1

在 Windows 上,我不允許保存名稱中帶有冒號的文件,如果您希望文件名可移植,我強烈建議避免這種情況。

沒有冒號和使用目前的乳膠(我有 texlive 2019 和LaTeX2e <2019-10-01> patch level 3)以下內容應該有效。這種乳膠不再需要grffile\usepackage[utf8]{inputenc}

\documentclass{article}
\usepackage{pdfpages}
\usepackage{bookmark}

\begin{document}
\includepdf[pages=-]{Spectral Graph Theory 2 Theorems on Matrices. The Laplacian}
\end{document}

相關內容