![如何在第一页上创建没有页眉的页脚](https://linux22.com/image/301514/%E5%A6%82%E4%BD%95%E5%9C%A8%E7%AC%AC%E4%B8%80%E9%A1%B5%E4%B8%8A%E5%88%9B%E5%BB%BA%E6%B2%A1%E6%9C%89%E9%A1%B5%E7%9C%89%E7%9A%84%E9%A1%B5%E8%84%9A.png)
我只需要写一份小报告。所以我不需要标题页,我只需要从标题、姓名、摘要开始写。但我希望页脚在第一页,没有页眉。页眉和页脚都应该在后续页面上。如何实现?
这是我的一个简单示例。谨致问候!在此先行致谢。
\documentclass[12pt,a4paper,oneside, twocolumn]{memoir}
\usepackage{lastpage}
\usepackage[utf8]{inputenc}
\usepackage[danish]{babel}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\thispagestyle{empty}
\usepackage{lipsum}
%Header/footer
\nouppercaseheads
\makepagestyle{mystyle}
\makeevenhead{mystyle}{\underline{Name Name}}{}{\underline{\today}}
\makeoddhead{mystyle}{\underline{Name Name}}{}{\underline{\today}}
\makeevenfoot{mystyle}{}{Page \thepage\ of \pageref{LastPage}}{}
\makeoddfoot{mystyle}{}{Page \thepage\ of \pageref{LastPage}}{}
\makepsmarks{mystyle}{%
\createmark{chapter}{left}{nonumber}{}{}}
\pagestyle{mystyle}
\begin{document}
\twocolumn[
\begin{@twocolumnfalse}
\begin{center}
{\fontsize{40}{48} \bfseries \textsc{Hirshfeld surfaces}}\linebreak
\vspace{5pt}
Name\\
Name
\vspace{5pt}
\end{center}
\begin{abstract}
...
\end{abstract}
\leavevmode
\vspace{20pt}
\end{@twocolumnfalse}
]
\section{something something}
\lipsum[1-20]
\end{document}
答案1
由于您使用自定义页眉和页脚(mystyle
),您可以定义一个类似的仅页脚样式mytitlestyle
,然后告诉第一页使用命令使用该样式\thispagestyle{mytitlestyle}
。
代码:
\documentclass[12pt,a4paper,oneside, twocolumn]{memoir}
\usepackage{lastpage}
\usepackage[utf8]{inputenc}
\usepackage[danish]{babel}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage{lipsum}
%Header/footer
\nouppercaseheads
\makepagestyle{mystyle}
\makeevenhead{mystyle}{\underline{Name Name}}{}{\underline{\today}}
\makeoddhead{mystyle}{\underline{Name Name}}{}{\underline{\today}}
\makeevenfoot{mystyle}{}{Page \thepage\ of \pageref{LastPage}}{}
\makeoddfoot{mystyle}{}{Page \thepage\ of \pageref{LastPage}}{}
\makepsmarks{mystyle}{%
\createmark{chapter}{left}{nonumber}{}{}}
\makepagestyle{mytitlestyle}
\makeevenfoot{mytitlestyle}{}{Page \thepage\ of \pageref{LastPage}}{}
\makeoddfoot{mytitlestyle}{}{Page \thepage\ of \pageref{LastPage}}{}
\pagestyle{mystyle}
\begin{document}
\thispagestyle{mytitlestyle}
\twocolumn[
\begin{@twocolumnfalse}
\begin{center}
{\fontsize{40}{48} \bfseries \textsc{Hirshfeld surfaces}}\linebreak
\vspace{5pt}
Name\\
Name
\vspace{5pt}
\end{center}
\begin{abstract}
...
\end{abstract}
\leavevmode
\vspace{20pt}
\end{@twocolumnfalse}
]
\section{something something}
\lipsum[1-20]
\end{document}
注意:您可以使用 获取默认页码\thispagestyle{plain}
。