文件中出現額外的空白頁

文件中出現額外的空白頁

以下程式碼在我的文件中插入了一個額外的空白首頁,儘管我甚至沒有提到任何標題或任何內容。請指導我哪裡出錯了。提前致謝。

\documentclass[oneside]{book}
\usepackage[left=1in, right=1in, top=1in, bottom=1in]{geometry}
\begin{document}
\begin{center}
\chapter*{TITLE}
\section*{\texttt{NAME and ID}}
\section*{ \emph{Supervisor}}
\textbf{\textsf{DISSERTATION INITIAL DRAFT}}
\end{center}
\section*{Description}
\section*{Summary}
\begin{thebibliography}{x}
\bibitem{easley} David Easley, Jon Kleinberg. \emph{Networks, Crowds and Markets: Reasoning about a Highly Connected World}, Cambridge University Press, 2010
\bibitem{macy} Damon Centola, Michael Macy. \emph{Complex Contagion and the Weakness of Long Ties}, American Journal of Sociology, 2007
\end{thebibliography}
\end{document} 

如果有幫助的話我正在使用 TexMaker :)

答案1

\chapter在環境內部使用center會產生額外的頁面。如果要建立標題,最好不要使用截面單位命令。您可以自行手動完成或使用專用包,例如titling;一個小例子:

\documentclass[oneside]{book}
\usepackage[left=1in, right=1in, top=1in, bottom=1in]{geometry}
\begin{document}

\begin{center}
{\Huge\bfseries TITLE\par\bigskip}
{\Large\ttfamily NAME and ID\par\medskip}
{\Large\itshape\bfseries Supervisor\par\medskip}
{\bfseries\sffamily DISSERTATION INITIAL DRAFT\par\bigskip}
\end{center}

\section*{Description}
\section*{Summary}
\begin{thebibliography}{x}
\bibitem{easley} David Easley, Jon Kleinberg. \emph{Networks, Crowds and Markets: Reasoning about a Highly Connected World}, Cambridge University Press, 2010
\bibitem{macy} Damon Centola, Michael Macy. \emph{Complex Contagion and the Weakness of Long Ties}, American Journal of Sociology, 2007
\end{thebibliography}

\end{document} 

在此輸入影像描述

顯然,由於不需要主要的部分單元(即文件不需要從自己的頁面開始章節),因此最好切換到文件article類;這是一個使用article套件titling來產生標題的範例:

\documentclass{article}
\usepackage[left=1in, right=1in, top=1in, bottom=1in]{geometry}
\usepackage{titling}

\pretitle{\begin{center}\Huge\bfseries}
\posttitle{\par\end{center}\vskip 0.5em}
\preauthor{\begin{center}\Large\ttfamily}
\postauthor{\par{\Large\itshape\bfseries
Supervisor\par\medskip}{\bfseries\sffamily DISSERTATION INITIAL DRAFT}\end{center}}
\predate{\par\large}
\postdate{\par}

\title{TITLE}
\author{NAME and ID}
\date{}

\begin{document}

\maketitle

\section*{Description}
\section*{Summary}
\begin{thebibliography}{x}
\bibitem{easley} David Easley, Jon Kleinberg. \emph{Networks, Crowds and Markets: Reasoning about a Highly Connected World}, Cambridge University Press, 2010
\bibitem{macy} Damon Centola, Michael Macy. \emph{Complex Contagion and the Weakness of Long Ties}, American Journal of Sociology, 2007
\end{thebibliography}

\end{document}

在此輸入影像描述

可以看出,手動建立標題更經濟(在這個簡單的情況下)。

答案2

由於您正在使用該類book,因此您可能希望文件的第一頁成為封面。

為此,該類別book提供了一個titlepage環境,​​您可以在其中插入必須放入封面頁的所有內容。在該環境結束時,將開始一個新頁面。

微量元素:

\documentclass[oneside]{book}
\usepackage[left=1in, right=1in, top=1in, bottom=1in]{geometry}
\begin{document}

\begin{titlepage}
\centering
\vspace*{1in}
{\Huge\bfseries TITLE\par}
\vspace*{0.75in}
{\Large\ttfamily NAME and ID\par}
\medskip
{\Large\itshape\bfseries Supervisor\par}
\medskip
{\bfseries\sffamily DISSERTATION INITIAL DRAFT\par}
\end{titlepage}

\section*{Description}
\section*{Summary}
\begin{thebibliography}{x}
\bibitem{easley} David Easley, Jon Kleinberg. \emph{Networks, Crowds and Markets: Reasoning about a Highly Connected World}, Cambridge University Press, 2010
\bibitem{macy} Damon Centola, Michael Macy. \emph{Complex Contagion and the Weakness of Long Ties}, American Journal of Sociology, 2007
\end{thebibliography}

\end{document} 

輸出:

在此輸入影像描述

相關內容