如何修复 TeX 2020 上 fancyfoot 和 fancyhead 的不规则间距

如何修复 TeX 2020 上 fancyfoot 和 fancyhead 的不规则间距

我使用 TeXLive 2017 没有任何问题,但是当我使用 TeXLive 2019 和 2020 时从第 2 页开始出现错误。

有人能帮我修复这个错误吗?

问候,

洪尤特

https://www.overleaf.com/read/spqhwhpyqgyx

第 2 页间距不规则

\documentclass[a4paper,12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{a4wide,epsfig,latexsym,array,hhline,fancyhdr}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{multicol,longtable,amscd}
\usepackage{diagbox}    %Make diagonal lines in tables
\usepackage[framemethod=tikz]{mdframed}     %For highlighting paragraph backgrounds
\usepackage{caption,subcaption}
\usepackage{lastpage}
\usepackage{enumerate}
\usepackage{enumitem}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage[unicode]{hyperref}
\hypersetup{urlcolor=blue,linkcolor=black,citecolor=black,linkbordercolor={1 0 0}}
\setlength{\headheight}{8pt}
\pagestyle{fancy}
\fancyhead{} % clear all header fields
\fancyhead[L]{
    \begin{tabular}{rl}
        \begin{picture}(32,12)(0,0)
            \put(0,-8){\includegraphics[width=16mm, height=8mm]{MIT.png}}
        \end{picture} &
        \begin{tabular}{l}
            \textbf{\bf \ttfamily Massachusetts Institute of Technology (MIT)} \\
            \textbf{\bf \ttfamily \href{https://mit.edu/}{https://mit.edu/}}
        \end{tabular}
    \end{tabular}}
\fancyhead[R]{
    \begin{tabular}{l}
        \tiny \bf \\
        \tiny \bf
    \end{tabular}}
\fancyfoot{} % clear all footer fields
\fancyfoot[L]{\scriptsize \ttfamily Example - Semester \the\year}
\fancyfoot[R]{\scriptsize \ttfamily Page {\thepage}/\pageref{LastPage}}
\renewcommand{\headrulewidth}{0.3pt}
\renewcommand{\footrulewidth}{0.3pt}
\begin{document}
    \tableofcontents{}
    \newpage
    \section{Example Section}
\begin{enumerate}[label=\roman*.]
        \item $\displaystyle $
        \item $\displaystyle $
        \item $\displaystyle $
        \item $\displaystyle $
    \end{enumerate}
    \begin{center}
        \Huge \textcolor{green}{\TeX~2019 \& \TeX~2020}
    \end{center}
\end{document}

相关内容