页眉 如何将页眉设置成包含页码 和 其它内容

发布于 2022-08-21 10:21:13

8.21-01.png
8.21-02.png
8.21-03.png
8.21-04.png

\documentclass{article}
\usepackage{fancyhdr}%导入fancyhdr包
\usepackage{ctex}%导入ctex包
\pagenumbering{arabic}%设置页码格式,大写字母标页
\pagestyle{fancy}
\fancyhead{} % 初始化页眉
\fancyfoot{} % 初始化页脚
\fancyhead[EC]{Chiral Perturbation Theory}
\fancyhead[OL]{A Pich}
\renewcommand{\headrulewidth}{0pt}%分隔线宽度4磅
\fancyhead[OL,ER]{\thepage}
%--------------------正文--------------------%
\begin{document}
    \section{xiaoyeyimier}
    I can swallow a bottle of alcohol and I'll feel like a Godzilla
    \newpage 
    Better hit the deck like the card dealer
\end{document}

我设置了页眉,但是怎么调也达不到原文的格式,不知哪里出了问题,请大佬指导。

查看更多

关注者
0
被浏览
1.1k
3 个回答
Swit
Swit 2022-08-21
LaTeX nubility!

我也是服了你这个代码块,好好整理一下不行吗!

Beatrice
Beatrice 2022-08-21
这家伙很懒,什么也没写!
\documentclass[twoside]{article}
\usepackage{showframe}
\usepackage{fancyhdr}%导入fancyhdr包
\usepackage{ctex}%导入ctex包
\pagenumbering{arabic}%设置页码格式,大写字母标页
\pagestyle{fancy}
\fancyhead{} % 初始化页眉
\fancyfoot{} % 初始化页脚
\fancyhead[EL]{\thepage\qquad\itshape Chiral Perturbation Theory}
\fancyhead[OL]{\thepage\qquad\itshape A Pich}
\renewcommand{\headrulewidth}{0pt}%分隔线宽度4磅
% \fancyhead[OL,ER]{\thepage}
%--------------------正文--------------------%
\begin{document}
\section{xiaoyeyimier}
I can swallow a bottle of alcohol and I'll feel like a Godzilla
\newpage
Better hit the deck like the card dealer
\end{document}

框是额外的加的,你可以忽略。

QQ截图20220821120643.png

土行僧
土行僧 2022-08-21
这家伙很懒,什么也没写!

8.21-05.png
documentclass[twoside]{article}
%usepackage{showframe}
usepackage{fancyhdr}%导入fancyhdr包
usepackage{ctex}%导入ctex包
pagenumbering{arabic}%设置页码格式,大写字母标页
pagestyle{fancy}
fancyhead{} % 初始化页眉
fancyfoot{} % 初始化页脚
fancyhead[OR]{ Chiral Perturbation Theoryhspace{15em}thepage}
fancyhead[EL]{thepageqquad qquaditshape A Pich}
renewcommand{headrulewidth}{0pt}%分隔线宽度4磅
% fancyhead[OL,ER]{thepage}
%--------------------正文--------------------%
begin{document}
section{xiaoyeyimier}
I can swallow a bottle of alcohol and I'll feel like a Godzilla
newpage

In the low-energy regime, all the information on the original QED dynamics is embodied in the values of the two low-energy couplings a and b. The values of these constants can be computed, by explicitly integrating out the electron 

end{document}

大佬 这两边上下没对齐,好像奇偶页 错开了一部分。请问是哪里出了问题

撰写答案

请登录后再发布答案,点击登录

发布
问题

分享
好友

手机
浏览

扫码手机浏览