哈佛论文中的页眉和页码位置

哈佛论文中的页眉和页码位置

我的第一篇帖子。:)

我正在学习使用 LaTeX。确切地说,通过撰写博士论文来学习是再好不过的机会了。

我使用Harvard论文模板(从 ShareLatex 下载;也在 GitHub 上)。因此,我有三个问题:

  1. 如何将页码位置设置在右上角而不是页脚的中心?
  2. 如何在页眉中显示章节名称?
  3. 最后,我如何重命名“参考书目”(例如文献、文章......)?

非常感谢!

我知道我必须对 LaTeX 有耐心 :)

我有两个文件:

论文.tex:

\documentclass{harvard-thesis}
\usepackage{chngcntr}
\counterwithout{figure}{chapter}
\counterwithout{table}{chapter}

\usepackage{geometry}
\geometry{
  verbose,
  tmargin=3cm,
  bmargin=3cm,
  lmargin=3cm,
  rmargin=3cm
}

\usepackage{indentfirst}
\setlength\parindent{1cm}
\usepackage{ragged2e}
\justifying
\linespread{1.3}

\begin{document}

\renewcommand{\figurename}{Slika}
\renewcommand{\tablename}{Tabela}
\renewcommand\contentsname{Sadržaj}


% the front matter
\input{frontmatter/coverpage}
\maketitle
\copyrightpage
\abstractpage
\tableofcontents
%\authorlist
\listoffigures
\dedicationpage
\acknowledgments

%\onehalfspacing
%\linespread{1.3}

% incluude each chapter...
\include{chapters/chapter1}
\include{chapters/chapter2}
\include{chapters/chapter3}

%\singlespacing
\onehalfspacing

% the back matter
\clearpage
\bibliography{literatura}
\addcontentsline{toc}{chapter}{Literatura}
\bibliographystyle{apalike-fr}


\end{document}

以及 harvard-thesis.cls:

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{harvard-thesis}
\LoadClass[12pt, oneside, a4paper]{book}

% Required packages
\RequirePackage{graphicx}
\RequirePackage{hyperref}
\hypersetup{
    linktocpage,
    colorlinks,
    citecolor=Crimson,
    filecolor=black,
    linkcolor=black,
    urlcolor=Crimson,
}

\RequirePackage[serbian, english]{babel}
%\RequirePackage[margin=3cm]{geometry}
\RequirePackage[utf8]{inputenc}
\RequirePackage[T2A]{fontenc}
\RequirePackage{graphicx}


\RequirePackage[centertags]{amsmath}
\RequirePackage{amssymb}
\RequirePackage{natbib}
\RequirePackage[small, md, sc]{titlesec}
\RequirePackage[tight,nice]{units}
\RequirePackage{verbatim}
\RequirePackage{mhchem}


% colors
\RequirePackage{color}
\definecolor{Crimson}{rgb}{0.6471, 0.1098, 0.1882}

\RequirePackage{url}
\RequirePackage[titles]{tocloft}
\setcounter{tocdepth}{2}
\renewcommand{\cftchapfont}{\normalsize \scshape}


\renewcommand\bibname{References}
\renewcommand\listfigurename{Listing of figures}
\raggedright

\RequirePackage{pdfsync} %do pdf synchronization [andy]

\usepackage[closeFloats, noSeparatorLine]{fltpage} %use the custom modified fltpage package
\RequirePackage{afterpage} 








\synctex=1 % turn synctex on automatically to sync between pdf viewer [andy]

%   list an entire bibliography entry inline. Useful for acknowledging when my paper was previously published
\RequirePackage{bibentry} 
\nobibliography*        

\RequirePackage{lettrine} % big letter at start of chapter

\RequirePackage{fancyhdr} 
\pagestyle{plain} % options: empty , plain , fancy
\RequirePackage[palatino]{quotchap}
\definecolor{chaptergrey}{rgb}{0.6,0,0}
\RequirePackage{titling}
\RequirePackage{setspace} 
\RequirePackage{booktabs} % for much better looking tables
\RequirePackage[labelfont={bf,small},textfont={small},justification=RaggedRight,margin=0pt, figurewithin=section, tablewithin=section]{caption}
\onehalfspacing
%\linespread{1.3}
%\raggedright

\parindent 12pt
\RequirePackage{mathspec}


% use Arno Pro instead of standard LaTeX fonts
\setmathsfont(Digits,Latin,Greek)[
Path = fonts/,Extension = .otf,
UprightFont=ArnoPro-Regular,
BoldFont=ArnoPro-Bold,
ItalicFont=ArnoPro-Italic,
BoldItalicFont=ArnoPro-BoldItalic,
Numbers={OldStyle,Proportional}]{ArnoPro}
\setmathrm
[Path = fonts/,Extension = .otf,
UprightFont=ArnoPro-Regular,
BoldFont=ArnoPro-Bold,
ItalicFont=ArnoPro-Italic,
BoldItalicFont=ArnoPro-BoldItalic
]{ArnoPro}


\RequirePackage{xltxtra,xunicode}
\defaultfontfeatures{Mapping=tex-text, Numbers=OldStyle}
\aliasfontfeatureoption{Ligatures}{Historic}{Historical}
\setromanfont
[Path = fonts/,
Extension = .otf,
Mapping=tex-text, 
Numbers=OldStyle, 
Ligatures={Common}, 
SizeFeatures={%
    {Size={-10}, Font=ArnoPro-RegularCaption},
    {Size={10-13.0}, Font=*},
    {Size={13.01-19.9}, Font=ArnoPro-RegularSubhead, Ligatures=Rare, Contextuals={Swash,Alternate}},
    {Size={19.91-},Font=ArnoPro-RegularDisplay, Ligatures=Rare, Contextuals={Swash,Alternate}}},
UprightFont=ArnoPro-Regular,
BoldFont=ArnoPro-Bold,
ItalicFont=ArnoPro-Italic,
BoldItalicFont=ArnoPro-BoldItalic
]{ArnoPro} %

%Set fonts for Mac Specific (Comment out on Windows XP)
%\setsansfont[Scale=MatchLowercase,Mapping=tex-text]{Helvetica Neue} 
%\setmonofont[Scale=MatchLowercase]{Consolas}

% some definitions
\def\degreeyear#1{\gdef\@degreeyear{#1}}
\def\degreemonth#1{\gdef\@degreemonth{#1}}
\def\degree#1{\gdef\@degree{#1}}
\def\advisor#1{\gdef\@advisor{#1}}
\def\department#1{\gdef\@department{#1}}
\def\field#1{\gdef\@field{#1}}
\def\university#1{\gdef\@university{#1}}
\def\universitycity#1{\gdef\@universitycity{#1}}
\def\universitystate#1{\gdef\@universitystate{#1}}


\renewcommand{\maketitle}{ 
    \singlespacing
    \thispagestyle{empty}
    \vspace*{\fill} \vspace{150pt} \begin{center}
    \Huge \textcolor{Crimson}{\textit{\thetitle}} \normalsize \\ \sc \vspace{100pt}
    a dissertation presented \\ by\\
    \theauthor\\ to\\ The \@department\\ 
    \vspace{12pt}
    in partial fulfillment of the requirements\\ 
    for the degree of\\ \@degree\\ 
    in the subject of\\ \@field\\
    \vspace{12pt}
    \@university\\ \@universitycity, \@universitystate\\ 
    \@degreemonth\ \@degreeyear
    \end{center} \vspace*{\fill}
}

% You might also consider licensing your work under Creative Commons). See: http://creativecommons.org/weblog/entry/12824 for other PhD students who have released their work under creative commons.

\newcommand{\copyrightpage}{
    \newpage \thispagestyle{empty} \vspace*{\fill}
    \sc \noindent \copyright~\textit{\@degreeyear \hspace{3pt}~- \theauthor} \\
    \noindent All rights reserved.
    \vspace*{\fill} \newpage \rm
}

\newcommand{\abstractpage}{
    \newpage
    \pagenumbering{roman}
    \setcounter{page}{3}
    \pagestyle{fancy}
    \lhead{Thesis advisor: \@advisor} \rhead{\@author}
    \renewcommand{\headrulewidth}{0.0pt} 
    \begin{center}
    \vspace*{1pt}
    \Large \textcolor{Crimson}{\textit{\@title}} \normalsize\\
    \vspace*{15pt}
    \sc Abstract \\ \rm
    \end{center}
    \doublespace %Harvard registrar requests that abstract is double spaced
    \input{frontmatter/abstract}
    \doublespace %Harvard registrar requests that abstract is double spaced 
    \newpage \lhead{} \rhead{}
    \cfoot{\thepage}
    %\onehalfspacing
    \linespread{1.3}
}

\newcommand{\dedicationpage}{
    \pagestyle{fancy}
    \newpage \thispagestyle{fancy} \vspace*{\fill}
    \sc \noindent \input{frontmatter/dedication}
    \vspace*{\fill} \newpage \rm
    }

% the list of authors
\newcommand{\authorlist}{
    \pagestyle{fancy}
    \newpage
    \thispagestyle{fancy} 
    \chapter*{Author List}
    \noindent \input{frontmatter/authorlist}
    \newpage \rm
    }

% the acknowledgments page
\newcommand{\acknowledgments}{
    \chapter*{Acknowledgments}
    \noindent
    \input{frontmatter/thanks}
    \vspace*{\fill} 
    \newpage
    \setcounter{page}{1}
    \pagenumbering{arabic}}

% An environment for paragraph-style section
\providecommand\newthought[1]{%
   \addvspace{1.0\baselineskip plus 0.5ex minus 0.2ex}%
   \noindent\textsc{#1}}

答案1

为了记录,链接到ShareLaTeX 模板

免责声明:进行这些修改很可能会导致论文被拒绝。

修改书目标题

\clearpage
\renewcommand{\bibname}{Tralalala}
\addcontentsline{toc}{chapter}{References}
\bibliography{references}
\bibliographystyle{plainnat}

清除页脚并添加页眉

\fancyhf{}
\rhead{\thepage}
\lhead{\leftmark}

相关内容