我浏览了这些问题,并没有找到能够解决我的疑虑的确切答案。
我需要每章第一页的顶部有 2 英寸的边距,而其余章节的边距只有 1 英寸。
请查看以下代码:
\documentclass[12pt]{article}
\usepackage{amsfonts, amsmath, amssymb, bm}
\usepackage{dcolumn, multirow}
\usepackage{pdfpages}
\usepackage{subfigure, subfloat, graphicx, float}
\usepackage{anysize, setspace}
\usepackage{verbatim, rotating, paralist}
\usepackage[format=hang]{caption}[2006/03/21]
\usepackage{natbib,url}
\usepackage{indentfirst}
\usepackage{biblatex}
\AtBeginEnvironment{quote}{\smaller}
\usepackage[T2A,T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[russian,english]{babel}
\newtheorem{hyp}{Hypothesis}
\usepackage{xcolor}
\usepackage[colorlinks = true,
linkcolor = black,
urlcolor = black,
citecolor = black,
anchorcolor = black]{hyperref}
\newcommand{\MYhref}[3][blue]{\href{#2}{\color{#1}{#3}}}%
\usepackage{bbding}
\setdefaultenum{I)}{A)}{i.}{a.}
\singlespace
\bibpunct[, ]{(}{)}{,}{a}{}{,}
\newcommand{\mc}[1]{\multicolumn{1}{c}{#1}}
\newcommand{\R}{\textbf{R }}
\pagestyle{plain}
\newcolumntype{d}[1]{D{.}{.}{#1}}
\usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}
\renewcommand{\contentsname}{\centerline{TABLE OF CONTENTS}}
\renewcommand{\listfigurename}{\centerline{LIST OF FIGURES}}
\renewcommand{\listtablename}{\centerline{LIST OF TABLES}}
\makeatletter
\renewcommand\section{\@startsection {section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\normalfont\scshape\bfseries}}
\makeatother
\begin{document}
% The command below sets the bibliography style as American
Political Science Review (APSR) style.
\bibliographystyle{apsr}
\singlespace
\thispagestyle{empty}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%% START OF SECTIONS %%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
\doublespacing
\newgeometry{top=2in, bottom=1in, left=1in, right=1in}
% The command below enters the chapter name into the "table of
contents."
\addcontentsline{toc}{section}{Chapter 1-TITLE. }
\begin{center}
\section*{Chapter 1: \\
\\
CHAPTER 1.
\end{center}}
% The two command below sets the page numbering to Arabic and sets
the current page to page 1.
\renewcommand{\thepage}{\arabic{page}}
\setcounter{page}{1}
%The space command sets the space between the text above and the
text below..
\vspace{2cm}
\doublespacing
\input{Chapter1}
\lipsum[1-20]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%% Chapter 2 %%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\clearpage
\newpage
\doublespacing
\addcontentsline{toc}{section}{Chapter 2 - Literature.}
\begin{center}
\section*{Chapter 2: \\
\\
Literature.
\end{center}}
\vspace{2cm}
\doublespacing
\input{Chapter2}
\lipsum[1-20]
\end{document}
答案1
我所作的修改处内有评论。
% I assume you want A4 mot US-letter, and you want chapters so report not article
\documentclass[12pt,a4paper]{report}
% just for the example
\usepackage{lipsum}
\usepackage{amsfonts, amsmath, amssymb, bm}
\usepackage{dcolumn, multirow}
\usepackage{pdfpages}
\usepackage{subfigure, subfloat, graphicx, float}
\usepackage{setspace}
% no\usepackage{anysize}
\usepackage{verbatim, rotating, paralist}
\usepackage[format=hang]{caption}[2006/03/21]
\usepackage{natbib,url}
\usepackage{indentfirst}
% no if you are using natbib \usepackage{biblatex}
% \AtBeginEnvironment{quote}{\smaller}
\usepackage[T2A,T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[russian,english]{babel}
\newtheorem{hyp}{Hypothesis}
\usepackage{xcolor}
\usepackage[colorlinks = true,
linkcolor = black,
urlcolor = black,
citecolor = black,
anchorcolor = black]{hyperref}
\newcommand{\MYhref}[3][blue]{\href{#2}{\color{#1}{#3}}}%
\usepackage{bbding}
\setdefaultenum{I)}{A)}{i.}{a.}
\singlespace
\bibpunct[, ]{(}{)}{,}{a}{}{,}
\newcommand{\mc}[1]{\multicolumn{1}{c}{#1}}
\newcommand{\R}{\textbf{R }}
\pagestyle{plain}
\newcolumntype{d}[1]{D{.}{.}{#1}}
% I left this but 1in margins on single column A4 makes unreadably long text lines
\usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}
% No! \ceneterline is not a latex command and \...name nacros should just have text
% to allow language translation, the whole pointof them is that they do not have formatting
% \renewcommand{\contentsname}{\centerline{TABLE OF CONTENTS}}
% \renewcommand{\listfigurename}{\centerline{LIST OF FIGURES}}
% \renewcommand{\listtablename}{\centerline{LIST OF TABLES}}
\makeatletter
\renewcommand\section{\@startsection {section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\normalfont\scshape\bfseries}}
\renewcommand\@makechapterhead[1]{%
\vspace*{50pt}% increase this if you need more space above the heading
{\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
\centering % I added centering
\huge\bfseries \@chapapp\space \thechapter
\par\nobreak
\vskip 20\p@
\fi
\interlinepenalty\@M
\Huge \bfseries #1\par\nobreak
\vskip 40\p@
}}
\makeatother
\begin{document}
% The command below sets the bibliography style as American
Political Science Review (APSR) style.
\bibliographystyle{apsr}
\singlespace
\thispagestyle{empty}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%% START OF SECTIONS %%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
\doublespacing
% no \newgeometry{top=2in, bottom=1in, left=1in, right=1in}
% % The command below enters the chapter name into the "table of
% contents."
% \addcontentsline{toc}{section}{Chapter 1-TITLE. }
% \begin{center}
% \section*{Chapter 1: \\
% \\
% CHAPTER 1.
% \end{center}}
% The two command below sets the page numbering to Arabic and sets
% the current page to page 1.
% enewcommand{\thepage}{\arabic{page}}
% \setcounter{page}{1}
%The space command sets the space between the text above and the
% text below..
% \vspace{2cm}
\doublespacing
\chapter{TITLE}
%\input{Chapter1}
\lipsum[1-20]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%% Chapter 2 %%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% not needed \chapter does that \clearpage
% \newpage
% done above already \doublespacing
% not needed \addcontentsline{toc}{section}{Chapter 2 - Literature.}
% no!! \begin{center}
% \section*{Chapter 2: \\
% \\
% Literature.
% \end{center}}
% \vspace{2cm}
% \doublespacing
\chapter{Literature}
%\input{Chapter2}
\lipsum[1-20]
\end{document}