修改页眉和页脚

修改页眉和页脚

我想要获取如下的标题

在此处输入图片描述

在页脚中

在此处输入图片描述

        \documentclass[12pt,a4paper]{report}

\usepackage{fancyhdr}
\pagestyle{fancy}

  \renewcommand{\headrulewidth}{1.pt}% filet en haut de page
  \renewcommand{\footrulewidth}{0.pt}% filet en bas de page

   \newcommand{\clearemptydoublepage}{%
   \newpage{\pagestyle{plain}\cleardoublepage}}

   \setlength{\headheight}{14.5pt}

   \fancyhead[L,R]{\bfseries\thepage}% Left Even, Right Odd
  \fancyhead[L]{\bfseries\rightmark} % Left Odd
   \fancyhead[R]{\bfseries\leftmark} % Right Even
   \rhead{\textbf{\thepage}} %{\textsl{\rightmark}}
   \lhead{\textsl{\nouppercase{\leftmark}}}%{\textbf{\thepage}}



\begin{document}
 \chapter{Semigroup theory and sesquilinear forms}
 \newpage
 cc

\begin{thebibliography}{999}
\newpage
\bibitem{ax}{O. Rhandi,} {...,} ....
\end{thebibliography}

\end{document} 

我不明白如何添加页脚。编译后,我进入了页眉

在此处输入图片描述

答案1

fancyhdr

schuelerHeaderFooter2

\documentclass[12pt,a4paper]{report}

\usepackage{mwe}% Just for the example
\usepackage{fancyhdr}
\pagestyle{fancy}

\renewcommand{\headrulewidth}{1.pt}% filet en haut de page
\renewcommand{\footrulewidth}{0.pt}% filet en bas de page% A line of zero width in invisible

%\newcommand{\clearemptydoublepage}{%
%\newpage{\pagestyle{plain}\cleardoublepage}}%That doesn't make any sense at all in a oneside document

\setlength{\headheight}{14.5pt}

\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\rhead{\thepage}
\lhead{\leftmark}
\lfoot{The title of the work}
\rfoot{Carl Capybara}
\cfoot{}



\begin{document}
\chapter{Manta Ray}
\blindtext
\section{Taxonomy}
\blindtext[10]
\chapter{Mobula}
\blindtext
\section{Life style}
\blindtext[10]

\end{document} 

答案2

如图scrlayer-scrpage所示维基百科

schuelerHeaderFooter

\documentclass[headsepline,footsepline]{report}
\usepackage{mwe}% just for the example

\usepackage[markcase=noupper,% remove the uppercasing
automark
]{scrlayer-scrpage}

\addtokomafont{pagehead}{\sffamily}
\addtokomafont{pagefoot}{\sffamily}

\ifoot*{Is life on Mars possible?}
\ofoot*{Walter Wombat}
\cfoot*{}
\ohead*{\pagemark}
\ihead{\leftmark}

\renewcommand{\chaptermarkformat}{}
\setlength{\footheight}{24.0pt}

\begin{document}
\chapter{Manta Ray}
\blindtext
\section{Taxonomy}
\blindtext[10]
\chapter{Mobula}
\blindtext
\section{Life style}
\blindtext[10]
\end{document}

相关内容