我怎样才能让 \rhead 超越顶部和 \chead 下来?
How can I get the \rhead superiorly to the top and \chead down?
MWE
\documentclass[12pt,a4paper]{article}
\usepackage{enumitem}
\usepackage{fancyhdr}
\usepackage[margin=3cm]{geometry}
\usepackage{pgfplots}
\newlength{\tabcont}
\setlength{\parindent}{0.0in}
\setlength{\parskip}{0.05in}
\title{Assignment 4}
\newcommand{\course}{lipsum}
\newcommand{\coursen}{lipsum}
\newcommand{\semester}{lipsum}
\newcommand{\TDAG}{lipsum}
\newcommand{\campus}{lipsum}
\newcommand{\dept}{lipsum}
\pagestyle{fancyplain}
\headheight 56.2pt
\chead{\campus \ \dept \ \course \ \coursen }
\lhead{\TDAG}
\rfoot{\thepage}
\begin{document}
\maketitle
Submit the following problems which are given in the tutorial 4 as your Assignment 4.
\begin{enumerate}
\item In question 19 ,part (d).
\end{enumerate}
\end{document}
我想要的解决方案
编译上述文件后,\rhead
和\chead
的高度位置相似。我希望 \rhead
启动并且 \chead
成为 down/after \rhead
.
我查看了 post,其中包含 \header[C]
之类的内容,但没有用。我正在使用 Miktex + texMaker。但是 如果您知道如何使用 \header[C]
:)
,请提供示例
截图
当前的
What I get when I compile the above code
我需要的解决方案
I need code to get this look
您可以将中央 header 包裹在 minipage
中:
\documentclass[12pt,a4paper]{article}
\usepackage{enumitem}
\usepackage{fancyhdr}
\usepackage[margin=3cm]{geometry}
\usepackage{pgfplots}
\newlength{\tabcont}
\setlength{\parindent}{0.0in}
\setlength{\parskip}{0.05in}
\title{Assignment 4}
\newcommand{\course}{lipsum}
\newcommand{\coursen}{lipsum}
\newcommand{\semester}{lipsum}
\newcommand{\TDAG}{lipsum}
\newcommand{\campus}{lipsum}
\newcommand{\dept}{lipsum}
\pagestyle{fancyplain}
\headheight 56.2pt
\chead{\begin{minipage}[t]{.3\textwidth}
\centering
\campus \ \dept \ \course \ \coursen
\end{minipage}}
\lhead{\TDAG}
\rfoot{\thepage}
\begin{document}
\maketitle
Submit the following problems which are given in the tutorial 4 as your Assignment 4.
\begin{enumerate}
\item In question 19 ,part (d).
\end{enumerate}
\end{document}
MWE
\documentclass[12pt,a4paper]{article}
\usepackage{enumitem}
\usepackage{fancyhdr}
\usepackage[margin=3cm]{geometry}
\usepackage{pgfplots}
\newlength{\tabcont}
\setlength{\parindent}{0.0in}
\setlength{\parskip}{0.05in}
\title{Assignment 4}
\newcommand{\course}{lipsum}
\newcommand{\coursen}{lipsum}
\newcommand{\semester}{lipsum}
\newcommand{\TDAG}{lipsum}
\newcommand{\campus}{lipsum}
\newcommand{\dept}{lipsum}
\pagestyle{fancyplain}
\headheight 56.2pt
\chead{\campus \ \dept \ \course \ \coursen }
\lhead{\TDAG}
\rfoot{\thepage}
\begin{document}
\maketitle
Submit the following problems which are given in the tutorial 4 as your Assignment 4.
\begin{enumerate}
\item In question 19 ,part (d).
\end{enumerate}
\end{document}
我想要的解决方案
编译上述文件后,\rhead
和\chead
的高度位置相似。我希望 \rhead
启动并且 \chead
成为 down/after \rhead
.
我查看了 post,其中包含 \header[C]
之类的内容,但没有用。我正在使用 Miktex + texMaker。但是 如果您知道如何使用 \header[C]
:)
截图
当前的
What I get when I compile the above code
我需要的解决方案
I need code to get this look
您可以将中央 header 包裹在 minipage
中:
\documentclass[12pt,a4paper]{article}
\usepackage{enumitem}
\usepackage{fancyhdr}
\usepackage[margin=3cm]{geometry}
\usepackage{pgfplots}
\newlength{\tabcont}
\setlength{\parindent}{0.0in}
\setlength{\parskip}{0.05in}
\title{Assignment 4}
\newcommand{\course}{lipsum}
\newcommand{\coursen}{lipsum}
\newcommand{\semester}{lipsum}
\newcommand{\TDAG}{lipsum}
\newcommand{\campus}{lipsum}
\newcommand{\dept}{lipsum}
\pagestyle{fancyplain}
\headheight 56.2pt
\chead{\begin{minipage}[t]{.3\textwidth}
\centering
\campus \ \dept \ \course \ \coursen
\end{minipage}}
\lhead{\TDAG}
\rfoot{\thepage}
\begin{document}
\maketitle
Submit the following problems which are given in the tutorial 4 as your Assignment 4.
\begin{enumerate}
\item In question 19 ,part (d).
\end{enumerate}
\end{document}