將 \geometry (geometry) 設定的佈局參數套用到 \includepdf[ (pdfpages)

將 \geometry (geometry) 設定的佈局參數套用到 \includepdf[ (pdfpages)

我是 LaTeX 的新手,並且已經製作了一些品質令我滿意的文檔。現在我決定用 LaTeX 寫我的論文。為此,我使用了 Overleaf 中的模板(https://www.overleaf.com/latex/templates/template-for-a-masters-slash-Doctor-thesis/mkzrzktcbzfl)為我的論文。此範本透過 \geometry 定義了幾個佈局參數:

\geometry{
paper=a4paper, % Change to letterpaper for US letter
inner=2.5cm, % Inner margin
outer=3.8cm, % Outer margin
bindingoffset=.5cm, % Binding offset
top=1.5cm, % Top margin
bottom=1.5cm, % Bottom margin
%showframe, % Uncomment to show how the type block is set on the page
}

我目前正在嘗試在文件中包含多頁 pdf 文件,這也有效。

\includepdf[pages={1-}]{example.pdf}

但是,pdf 不會像普通文字正文那樣接管最初由 \geometry 定義的參數。相反,嵌入的 pdf 居中。

我已經搜索過論壇帖子並嘗試過各種爭論,但還沒有找到解決我的問題的方法。有誰知道我如何採用嵌入 pdf 的佈局?

編輯:這是一個最小的工作範例:

\documentclass{article}
\usepackage{geometry} 
\usepackage{pdfpages}
\geometry{
    paper=a4paper, % Change to letterpaper for US letter
    inner=2.5cm, % Inner margin
    outer=3.8cm, % Outer margin
    bindingoffset=.5cm, % Binding offset
    top=1.5cm, % Top margin
    bottom=1.5cm, % Bottom margin
    %showframe, % Uncomment to show how the type block is set on the page
}
\begin{document}
\includepdf[pages={1-}]{example.pdf}
\end{document}

更新:

我現在發現「內部」、「外部」、「頂部」、「底部」的幾何參數可以透過 pdfpages 參數「offset」(帶有 2 個參數)進行控制。就我而言,我的文件使用雙面選項。在這種情況下,第一個「偏移」參數表示向「外部」方向的偏移,第二個「偏移」參數表示向「頂部」方向的偏移。據我所知,pdfpages 只允許為雙面文件的水平間距選擇一個參數。然而,在模板中,為幾何圖形定義的左右邊距的距離並不相等。此外,幾何中的「boundingoffset」參數將指定的長度加到內部邊距以用於綁定目的。我是否正確理解雙面文件的幾何格式無法傳輸到 pdfpages?如果是這樣,有誰知道 pdfpages 的替代品可以做到這一點?

更新2:

我仍在嘗試將幾何參數應用於貼上的 PDF,但我仍然找不到解決方案。難道就沒有人真正有辦法解決這個問題嗎?

相關內容