LaTeX 中 fancyheader 包的問題

LaTeX 中 fancyheader 包的問題

這裡是相對較新的 LaTeX 用戶。我在使用 fancyhdr 包時遇到了很多問題。 fancyhdr 指令看起來完全沒有註冊,但程式碼沒有出錯。除此之外,我對標題等文字或文件中其他任何位置所做的更改也不會顯示。然而,當我省略導入 fancyhdr 的行時,我對頁面標題(Yolo 的範例標題)所做的更改突然出現,並且一切再次正常運行(除了我仍然沒有標題 D': )。

我附上了下面的確切代碼,其中沒有任何更改(標題不會更改為“Yolo”,並且標題不會與 fancyhdr 包一起出現)。我正在尋找某種方法讓 fancyhdr 工作,但我一直無法解決它。在線搜索,我覺得這可能是 \pagestyle 問題,但我不確定如何重新排列我的程式碼以完全解決此問題。

我目前正在使用 Texmaker 在 LaTeX 中進行編輯和編碼。

    \documentclass[11pt]{article}
    \usepackage[margin=1in]{geometry}
    \usepackage{amsfonts,amsmath,amssymb}
    \usepackage{graphicx}
    \usepackage{float}
    \righthyphenmin12
    \lefthyphenmin12
    \usepackage{fancyhdr}
    \pagestyle{fancy}
    \fancyhead{}
    \fancyfoot{}
    \fancyhead[L]{\MakeUppercase{title should go here}}

    \begin{document}
    \begin{titlepage}
    \begin{center}
    \Huge\textbf{Yolo}\\
    \Large\textbf{sample subtitle}\\[4mm]
    \vfill

    \line(1,0){400}\\
    \Huge\textbf{sample title}\\[3mm]
    \Large\textbf{- sample subtitle -}\\[4mm]
    \line(1,0){400}\\
    \vfill
    Professor: Chuck E Cheese\\
    University of Potatoes\\
    September 12, Fall 2020\\
    \end{center}
    \end{titlepage}




  [1]: https://i.stack.imgur.com/p3tEW.png

相關內容