页码位于页面顶部

页码位于页面顶部

可能重复:
如何自定义页眉和页脚?

我该如何像下图一样将我的姓名和页码放在我的简历上?我想从第 2 页开始像下图一样。即从第 2 页开始,它会显示我的姓名和页码。

另外,我该如何去掉简历中每页底部的页码(请参阅下面的乳胶代码)。

在此处输入图片描述

\documentclass[10pt]{article}
\usepackage{array, xcolor, lipsum, bibentry}
\usepackage[margin=3cm]{geometry}

\title{\bfseries\Huge John Doe}
\author{}
\date{}

\definecolor{lightgray}{gray}{0.8}
\newcolumntype{L}{>{\raggedleft}p{0.14\textwidth}}
\newcolumntype{R}{p{0.8\textwidth}}
\newcommand\VRule{\color{lightgray}\vrule width 0.5pt}


\begin{document}
\maketitle
\vspace{1em}
\begin{minipage}[ht]{0.48\textwidth}
Address Line 1\\
Address Line 2\\
Address Line 3\\
Address Line 4\\
Address Line 5
\end{minipage}
\begin{minipage}[ht]{0.48\textwidth}
Mobile: 123-456789\\
Email: [email protected]\\
Date of Birth: 01/01/2012\\
Citizenship: My citizenship
\end{minipage}
\vspace{20pt}

\section*{Education}
\begin{tabular}{L!{\VRule}R}
2008--2012&MSc in Computer Science, Great University, Country.\vspace{5pt}\\
2006--2008&BSc in Life Science, Great University, Country.\\
\end{tabular}

\section*{Employment}
\begin{tabular}{L!{\VRule}R}
2011--today&{\bf Company Name.} Head of Department. Add my job description here. Add my job description here. Add my job description here. Add my job description here.\\
&\begin{itemize}
\item Add my job description here.
\item Add my job description here.Add my job description here.Add my job description here.
\item Add my job description here.Add my job description here.Add my job description here.Add my job description here.
\item Add my job description here.Add my job description here.Add my job description here.Add my job description here.Add my job description here.Add my job description here.Add my job description here.Add my job description here.Add my job description here.
\end{itemize} 
\end{tabular}

\section*{Awards and Achievements}
\begin{tabular}{L!{\VRule}R}
2008&Gold medal.\vspace{5pt}\\
2006&Silver medal.\\
\end{tabular}

\section*{Organisational Experience}
\begin{tabular}{L!{\VRule}R}
2008&This event.\vspace{5pt}\\
\end{tabular}


\section*{Languages}
English, Spanish, French, German


\end{document} 

答案1

您可以scrpage2koma-脚本包.\maketitle已硬编码为\thispagestyle{plain},这将使您的页码居中显示在底部。要删除第一页的页码,请放置\thispagestyle{empty} 命令\maketitle

scrpage2记录在英文手册第 196 页(第 5 章)。

MWE:

\documentclass[10pt]{article}
\usepackage{array, xcolor, lipsum, bibentry}
\usepackage[margin=3cm]{geometry}
\usepackage{scrbase,scrpage2}
\pagestyle{scrheadings} % pagestyle with page number

\title{\bfseries\Huge John Doe}
\author{}
\date{}

\definecolor{lightgray}{gray}{0.8}
\newcolumntype{L}{>{\raggedleft}p{0.14\textwidth}}
\newcolumntype{R}{p{0.8\textwidth}}
\newcommand\VRule{\color{lightgray}\vrule width 0.5pt}


\begin{document}
\maketitle
\thispagestyle{empty} % place this after \maketitle
\vspace{1em}
\begin{minipage}[ht]{0.48\textwidth}
Address Line 1\\
Address Line 2\\
Address Line 3\\
Address Line 4\\
Address Line 5
\end{minipage}
\begin{minipage}[ht]{0.48\textwidth}
Mobile: 123-456789\\
Email: [email protected]\\
Date of Birth: 01/01/2012\\
Citizenship: My citizenship
\end{minipage}
\vspace{20pt}

\section*{Education}
\begin{tabular}{L!{\VRule}R}
2008--2012&MSc in Computer Science, Great University, Country.\vspace{5pt}\\
2006--2008&BSc in Life Science, Great University, Country.\\
\end{tabular}

\section*{Employment}
\begin{tabular}{L!{\VRule}R}
2011--today&{\bf Company Name.} Head of Department. Add my job description here. Add my job description here. Add my job description here. Add my job description here.\\
&\begin{itemize}
\item Add my job description here.
\item Add my job description here.Add my job description here.Add my job description here.
\item Add my job description here.Add my job description here.Add my job description here.Add my job description here.
\item Add my job description here.Add my job description here.Add my job description here.Add my job description here.Add my job description here.Add my job description here.Add my job description here.Add my job description here.Add my job description here.
\end{itemize} 
\end{tabular}

\section*{Awards and Achievements}
\begin{tabular}{L!{\VRule}R}
2008&Gold medal.\vspace{5pt}\\
2006&Silver medal.\\
\end{tabular}

\section*{Organisational Experience}
\begin{tabular}{L!{\VRule}R}
2008&This event.\vspace{5pt}\\
\end{tabular}

\newpage

\section*{Languages}
English, Spanish, French, German


\end{document} 

答案2

看看花式高清包。您可以在那里根据需要定义标题。

尝试这个:

\documentclass[a4paper,10pt]{article}

\usepackage{blindtext}
\usepackage{fancyhdr}

\pagestyle{fancy}
\lhead{john doe}
\chead{}
\rhead{\thepage} % set the page number to the haed line
%clean the foot line
\lfoot{}
\cfoot{}
\rfoot{}

\begin{document}
\blindtext
\newpage
\blindtext
\newpage
\end{document}

相关内容