TeX Live 版本更新後(2019 年至 2022 年)頁尾/vspace 呈現不同

TeX Live 版本更新後(2019 年至 2022 年)頁尾/vspace 呈現不同

從舊版的 pdfTeX 升級後,我的 PDF 輸出中遇到了意外的渲染變化。以前我用的是pdfTeX 3.14159265-2.6-1.40.19 (TeX Live 2019/dev/Debian),現在我用的是pdfTeX 3.141592653-2.6-1.40.24 (TeX Live 2022/Debian)

這個問題體現在我的頁腳中,它由兩條紅線組成。自更新以來,儘管 LaTeX 程式碼沒有發生任何變化,但這些行已向下移動,並且「Page X of Y」頁腳文字已略微向上移動。

前:

在此輸入影像描述

後:

在此輸入影像描述

報告了類似的問題(,,)。但是,建議的解決方案似乎都無法解決我的問題。

我還在 Overleaf 上進行了測試,發現從 2022 年開始的 pdfTeX 版本存在該問題(2021 年之前的版本(舊版)可以正確渲染 PDF)。

如何才能像以前一樣產生 PDF?

這是我的 LaTeX 程式碼的範例:

\documentclass[10pt]{report}

\usepackage[top=3.2cm, bottom=3.5cm, left=1.5cm, right=1.5cm, foot=1.7cm, head=2.6cm, heightrounded, portrait, a4paper]{geometry}
\usepackage{stackengine}
\usepackage{fancyhdr}
\usepackage{tikz}


\newcommand\FooterRedLine{\vspace*{-6.8mm}\textcolor{red}{\rule{0.5\textwidth-1.2cm}{2pt}}}

\newcommand{\SetupHeaderAndFooter}{
  \fancypagestyle{plain}{
    \fancyhf{}
    \renewcommand{\headrulewidth}{1.2pt}
    \setlength{\tabcolsep}{1pt}
    \renewcommand{\arraystretch}{1}
    \setlength\arrayrulewidth{0.2pt}
    
    \fancyfoot[L]{
      \FooterRedLine \hfill \FooterRedLine
    }
    \fancyfoot[C]{
      \includegraphics[width=2.2cm, keepaspectratio=true]{example-image-a} \\
      \small{ABC\texttrademark} \\[1mm]
      \scriptsize{\textit{ABC}}
    }
    \fancyfoot[R]{
      \vspace{3mm}
      \small{Page X of Y}
    }
  }
  
}


\SetupHeaderAndFooter
\pagestyle{plain}


\begin{document}
Hello
\end{document}

看來改變vspace沒有效果

  • \FooterRedLine: 刪除\vspace沒有任何作用。

  • Page X of Y頁尾文字:將虛擬空間改為\vspace*{3mm}\vspace{30mm}、 或\vspace*{30mm},沒有任何作用。

相關內容