类似问题这。
从顶部到章节标题开头的空间太大了。我该如何解决这个问题,让它和其他页面一样。我使用我的大学论文样式表。我没有在样式表中找到任何用于调整章节标题上方的下沉(垂直距离)的 topskip。
- 我不知道在哪里可以改变这一点
- 如何改变章节号和章节名称之间的距离
- 我怎么知道我的边距值设置为多少?有人能指出这些是否都在我的样式表中定义吗?
样式表模板:uhthesis11.sty
% University of Houston PhD/MS thesis style -- modifications to the report style
% For LaTeX version 2.09
%
% Author: Dimitrios Georgakopoulos ([email protected])
% Modified by: Kyle Strom ([email protected]) August, 2009 (initials KS)
% Modified by: Abhilash Sukumari ([email protected]) August, 2012
% The float and footnote macros bellow are stolen from the Stanfford University thesis style.
\typeout{Document Style Option `uhthesis' <31 Aug 90>.}
\long\def\comment#1{}
\comment{
Example of use:
\documentstyle[12pt,uhthesis]{report}
\begin{document}
\title{Transaction Management in\\ Multidatabase Systems}
\author{Dimitrios Georgakopoulos}
\adviser{Dr. Marek Rusinkiewicz, Chairman}
\firstreader{Dr. Farok Bastani}
\secondreader{Dr. Paulina Markenscoff\\Computer Engineering Department}
\makecoverpages
\begin{abstract}
This thesis tells you all you need to know about the concepts and methods involved in this research ...
\end{abstract}
\begin{acknowledgements}
I would like to thank etc etc etc ...
\end{acknowledgements}
\makecontentspages
\chapterpages
\chapter{Introduction}
...
\chapter{Conclusions}
...
\appendix
\chapter{A Long Proof}
...
\bibliographystyle{ascelike}
\bibliography{mybib}
\end{document}
Documentation:
This style file modifies the standard report style to follow the
Dean's Office "Preparing your Thesis/Dissertation for Submission
to the college of Natural Sciences and Mathematics: A Guideline".
The \makecoverpages command creates a copyright page (optionally),
the title page and, and the signature page. The \begin{abstact}
command creates the abstract page. The abstract itself should be
included between a \begin{abstact} and an \end{abstact} command,
as usual. Your (optional) acknowledgments should be included in the
(optional) \begin{acknowledments} ...\end{acknowledments} section.
The \makecontentspages command produces the table of contents, the
list of tables (optional) and the list of figures (optional). Finally,
the \chapterpages command sets the page style of the main body of
your thesis.
The following commands can control what goes in the front matter
material:
\title{thesis title}
\author{author's name}
\degree{author's degree}{type of thesis}
- e.g. \degree{Masters of Science}{Thesis}
- if \degree is omitted,
\degree{Doctor of Philosophy}{Dissertation} is assumed
\department{author's department}
- Computer Science if omitted
\college{the college or school the thesis is submitted to}
- College of Natural Sciences and Mathematics if omitted
\adviser{the adviser's name}
\firstreader{the first reader's name}
\secondreader{the second reader's name}
\thirdreader{the third reader's name}
\fourthreader{the fourth reader's name}
\fifthreader{the fifth reader's name}
\chair{Department chair}
\assocdean{Associate Dean of College}
\threereaderstrue or \threereadersfalse
- print or don't print a third reader in the
signature page (true by default)
\fourreaderstrue or \fourreadersfalse
- print or don't print a fourth reader in the
signature page (true by default)
\fivereaderstrue or \fivereadersfalse
- print or don't print a fifth reader in the
signature page (true by default)
\submitdate{month year in which the thesis is submitted}
- date LaTeX'd if omitted
\copyrighttrue or \copyrightfalse
- produce or don't produce a copyright page (true by default)
\figurelisttrue or \figurelistfalse
- produce or don't produce a List of Figures page
(true by default)
\tablelisttrue or \tablelistfalse
- produce or don't produce a List of Tables page
(true by default)
This style uses interline spacing that is 1.6 times normal, except
in the figure and table environments where normal spacing is used.
That can be changed by doing:
\renewcommand{\baselinestretch}{1.6}
(or whatever you want instead of 1.6)
Unfortunately, that command probably won't take effect unless it comes
before the \begin{document} or after something like \small \normalsize.
The example above shows the 12pt substyle being used. This seems to give
acceptable looking results, but it may be omitted to get smaller print.
}
% First thing we do is make sure that report has been loaded. A
% common error is to try to use uhthesis as a documentstyle.
\@ifundefined{chapter}{\@latexerr{The `uhthesis' option should be used
with the `report' document style}}{}
% New page margins setup KS 2009
%%--------------------------------
\textheight 9in
\textwidth 6in
\oddsidemargin 0.5in
\evensidemargin 0in
\topmargin 0in
\headheight 0in
\headsep 0.0in
\parskip = 0.0in
\parindent = 5ex
%%--------------------------------
% Disallow page breaks at hyphens (this will give some underfull vbox's,
% so an alternative is to use \brokenpenalty=100 and manually search
% for and fix such page breaks)
\brokenpenalty=10000
%--- use package ``setspace'' instead KS 2009
% Use 1.6 times the normal baseline-to-baseline skip
\renewcommand{\baselinestretch}{1.7}
% Roman page numbers in cover pages
\pagenumbering{roman}
% Redefine the macro used for footnotes to use single spacing
\long\def\@footnotetext#1{\insert\footins{\def\baselinestretch{1}\footnotesize
\interlinepenalty\interfootnotelinepenalty
\splittopskip\footnotesep
\splitmaxdepth \dp\strutbox \floatingpenalty \@MM
\hsize\columnwidth \@parboxrestore
\edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext
{\rule{\z@}{\footnotesep}\ignorespaces
#1\strut}}}
\def\degree#1#2{
\gdef\@degree{#1}
\gdef\@thesistype{#2}}
\def\@degree{\rm Doctor of Philosophy}
\def\@thesistype{\rm Dissertation}
%modify to engineering college (KS 8/09)
% Define college/school -- default Cullen College of Engineering
\def\college#1{\gdef\@college{#1}}
\def\@college{\rm Cullen College of Engineering}
% modify to Electrical and Computer engineering (KS 8/09)
% Define department -- default Electrical and Computer and Environmental Engineering
\def\department#1{\gdef\@department{#1}}
\def\@department{\rm Electrical and Computer Engineering}
% modify to Electrical and Computer engineering (KS 8/09)
% Define degree -- default Electrical and Computer Engineering
\def\departdeg#1{\gdef\@ \departdeg{#1}}
\def\@departdeg{\rm Electrical and Computer Engineering}
% Thesis advisor and committee
\def\adviser#1{\gdef\@adviser{#1}}
\def\firstreader#1{\gdef\@firstreader{#1}}
\def\secondreader#1{\gdef\@secondreader{#1}}
\def\thirdreader#1{\gdef\@thirdreader{#1}}
\def\fourthreader#1{\gdef\@fourthreader{#1}}
\def\fifthreader#1{\gdef\@fifthreader{#1}}
\def\chair#1{\gdef\@chair{#1}} % KS 2009
\def\assocdean#1{\gdef\@assocdean{#1}} % KS 2009
\def\submitdate#1{\gdef\@submitdate{#1}}
% \author, \title in report
\def\@title{}
\def\@author{}
\def\@adviser{}
\def\@firstreader{}
\def\@secondreader{}
\def\@thirdreader{}
\def\@fourthreader{}
\def\@fifthreader{}
\def\@chair{} % KS 2009
\def\@assocdean{} % KS 2009
\def\@submitdate{\ifcase\the\month\or
January,\or February,\or March,\or April,\or May,\or June,\or
July,\or August,\or September,\or October,\or November,\or December,\fi
\space \number\the\year}
\newif\ifcopyright
\copyrighttrue
\newif\iffigurelist
\figurelisttrue
\newif\iftablelist
\tablelisttrue
\newif\ifthreereaders
\threereaderstrue
\newif\iffourreaders
\fourreaderstrue
\newif\iffivereaders
\fivereaderstrue
\newif\ifdoublespace
\doublespacefalse
%\def\baselinestretch{1}\@normalsize
\ifdoublespace
\def\baselinestretch{1.7}\@normalsize
\fi
%Cover pages
\def\titlep{%
\newpage
\thispagestyle{empty}%
\setcounter{page}{2}
\ifcopyright \setcounter{page}{3}
\fi
~\vskip0.5in% KS 2009
\begin{center}
\Large\uppercase\expandafter{\@title}
\end{center}
\vfill % KS 2009
\begin{center}
\rm A \expandafter{\@thesistype}\\
Presented to\\
the Faculty of the Department of
\expandafter{\@department}\\
University of Houston
\vfill % KS 2009
In Partial Fulfillment\\
of the Requirements for the Degree\\
\expandafter{\@degree}\\
in \expandafter{\@departdeg} % KS 2009
\vfill % KS 2009
\rm by\\
\@author\\
\@submitdate\\
\end{center}}
\def\copyrightpage{%
% \newpage
\thispagestyle{empty}%
\setcounter{page}{2}
\null\vskip2.5in
\begin{center}
\copyright \ Copyright by \@author, \@submitdate\\ %KS 2009
All Rights Reserved
% \vskip.5in
% \underline{\@author}\\
% \vskip.5in
% \underline{\@submitdate}
\end{center}}
% Signature page
\def\signaturepage{%
\newpage
\thispagestyle{empty} % KS 2009
\begin{center}
\Large\uppercase\expandafter{\@title}
\end{center}
\vspace{.4in}
\centerline{\shortstack[c]{\vrule width 2in height 0.4pt\\
\@author}}
\vfill
% \vspace{0.15in}
% \hspace{0in} \rm APPROVED:
\leftline{ Approved:} % KS 2009
\vspace{0.15in}
\rightline{\shortstack[l]{\vrule width 3.0in height 0.4pt\\ \@adviser}}
% \vspace{0.15in}
\vfill
\leftline{Committee Members:} % KS 2009
% \vspace{0.375in}
\vspace{0.15in}
\rightline{\shortstack[l]{\vrule width 3.0in height 0.4pt\\ \@firstreader}}
%\vspace{.375in}
\vfill
\rightline{\shortstack[l]{\vrule width 3.0in height 0.4pt\\ \@secondreader}}
% \vspace{.375in} %\hfill
\vfill
\ifthreereaders
\rightline{\shortstack[l]{\vrule width 3in height 0.4pt\\ \@thirdreader}}
\vfill
\fi
% \vspace{.375in}
\iffourreaders
\rightline{\shortstack[l]{\vrule width 3in height 0.4pt\\ \@fourthreader}}
\vfill
\fi
% \vspace{.375in}
\iffivereaders
\rightline{\shortstack[l]{\vrule width 3in height 0.4pt\\ \@fifthreader}}
\vfill
\fi
% \vspace{.4in}
% \rightline{\shortstack[l]{\vrule width 3in height
% % 0.4pt\\Dean, \expandafter{\@college}}}}
% 0.4pt\\ \@assocdean \\ \expandafter{\@college}}} %KS 2009
%-- modification KS 2009 ---------
\begin{flushleft}\begin{minipage}[h!]{2.5 in}
{\shortstack[l]{\vrule width 2.5in height
0.4pt\\ \@assocdean \\ \expandafter{\@college}}}
\end{minipage}
\hspace{0.4in}
\begin{minipage}[h!]{3 in}
{\shortstack[l]{\vrule width 3.0in height 0.4pt\\ \@chair}}
\end{minipage}
\end{flushleft}
%-----------------------
}
\def\makecoverpages{%
\ifcopyright\copyrightpage\fi
\titlep
\signaturepage}
%Abstract cover page
\def\abstractp{%
\newpage
~\vskip0.5in% KS 2009
\begin{center}
\Large\uppercase\expandafter{\@title}
\end{center}
\vfill
\begin{center}
\rm An Abstract \\
of a\\
\expandafter{\@thesistype}\\
Presented to\\
the Faculty of the Department of
\expandafter{\@department}\\
University of Houston
\vfill
In Partial Fulfillment\\
of the Requirements for the Degree\\
\expandafter{\@degree}\\
in \expandafter{\@departdeg} % KS 2009
\vfill
\rm by\\
\@author\\
\@submitdate\\
\end{center}}
%Abstract
\def\abstract{
\def\baselinestretch{1}\@normalsize
\ifdoublespace
\def\baselinestretch{1.7}\@normalsize
\fi
\abstractp
\newpage
\begin{center}
% \Huge\bf Abstract
\Large{\bf Abstract} % KS 2009 other... \uppercase{\bf Abstract}
\end{center}
\addcontentsline{toc}{chapter}{Abstract}}
\def\endabstract{
\def\baselinestretch{1.7}\@normalsize}
%Acknowledgements
\def\acknowledgements{
\newpage
\addcontentsline{toc}{chapter}{Acknowledgments}
\def\baselinestretch{1}\@normalsize
\ifdoublespace
\def\baselinestretch{1.7}\@normalsize
\fi
\begin{center}
% \Huge {\ } \bf Acknowledgements
\Large{\bf Acknowledgements} % KS 2009 other \uppercase{\bf Acknowledgements}
\end{center}
}
%\def\endacknowledgements{}
%%%%----- TOC, LOF, and LOT changes for college (KS 2009)
\def\tableofcontents{%
\newpage
\centerline{\Large\bf Table of Contents}
%\vspace{1\baselineskip}
\@mkboth{Table of Contents}{Table of Contents}
\@starttoc{toc}
}
\def\listoffigures{
\newpage
\centerline{\Large\bf List of Figures}
%\vspace{1\baselineskip}
\@mkboth{List of Figures}{List of Figures}
\@starttoc{lof}
}
\def\listoftables{%
\newpage
\centerline{\Large\bf List of Tables}
%\vspace{1\baselineskip}
\@mkboth{List of Tables}{List of Tables}
\@starttoc{lot}
}
%%%%-----
%\renewcommand{\cftchapleader}{\cftdotfill{\cftsecdotsep}}
%Table of contents
\def\makecontentspages{
\def\baselinestretch{1}\@normalsize
\ifdoublespace
\def\baselinestretch{1.7}\@normalsize
\fi
% \renewcommand{\contentsname}{Table of Contents}
\newpage\addcontentsline{toc}{chapter}{Table of Contents}
\tableofcontents
\newpage
\iffigurelist
\addcontentsline{toc}{chapter}{List of Figures}
\listoffigures
\newpage
\fi
\iftablelist
\addcontentsline{toc}{chapter}{List of Tables}
\listoftables
\newpage
\fi
\def\baselinestretch{1.7}\@normalsize}
%Chapter page definition
\def\chapterpages{
% Put the page number on the top of the page
% \def\@oddhead{\rm\hfil\thepage\hfil}
% \def\@oddfoot{}
% \let\@evenhead\@oddhead
% \let\@evenfoot\@oddfoot
\pagenumbering{arabic}}
% Redefine \thebibliography to go to a new page and put an entry in the
% table of contents
%--- Change the name and location of the Bibliography title (needs natbib).
\renewcommand{\bibname}{References}
\renewcommand\bibsection{\noindent \Large{\bf \bibname} \normalsize
\vspace{1\baselineskip}
}
%--- use package ``setspace'' instead KS 2009
% Single space for drafts
\def\singlespaces{
\def\baselinestretch{1}\@normalsize}
%modify float placement - KS 2009
\makeatletter
\setlength{\@fptop}{0pt}
\makeatother
%--- change chapter headings - KS 2009
\newcommand{\Chapter}[1]{\clearpage % put new chapters on a new page
\refstepcounter{chapter} % manually increment the chapter number
\addcontentsline{toc}{chapter}{Chapter \thechapter . #1}
\noindent \Large{\bf Chapter \thechapter . #1} \normalsize
\vspace{1\baselineskip}
}
\newcommand{\appndix}[1]{\clearpage % put new chapters on a new page
\refstepcounter{chapter} % manually increment the chapter number
\addcontentsline{toc}{chapter}{Appendix \thechapter . #1}
\noindent \Large{\bf Appendix \thechapter . #1} \normalsize
\vspace{1\baselineskip}
}
%That's all folks
包:packages.tex
% -------- Fonts ---------------------------------------------------%
\usepackage{lmodern}
\usepackage{natbib}
\usepackage[T1]{fontenc}
\usepackage{setspace}
% -------- bibliography stuff -----------------------------------%
\bibliographystyle{unsrtnat}
\usepackage{natbib}
% ---- section --------------------------------------------%
\usepackage{sectsty}
\sectionfont{\normalsize\bfseries\uppercase}
\subsectionfont{\normalsize\bfseries}
%\subsubsectionfont{\normalsize \itshape}
\subsubsectionfont{\normalsize \bfseries}
\chapterfont{\Large}
\chaptertitlefont{\Large}
\usepackage{indentfirst} % indents the first line after a section
\usepackage{tocloft}
\renewcommand{\contentsname}{Table of Contents}
\setlength{\cftbeforetoctitleskip}{-1\baselineskip}
\setlength{\cftaftertoctitleskip}{0in}
\renewcommand{\cfttoctitlefont}{\hfill\Large\bfseries}
\renewcommand{\cftaftertoctitle}{\hfill}
\renewcommand{\cftchapleader}{\cftdotfill{\cftsecdotsep}}
\setlength{\cftbeforechapskip}{0in} % no additional space between chapter entries in the table of contents
\setlength{\cftbeforeloftitleskip}{-1\baselineskip}
\setlength{\cftafterloftitleskip}{0in}
\renewcommand{\cftloftitlefont}{\hfill\Large\bfseries}
\renewcommand{\cftafterloftitle}{\hfill}
\setlength{\cftbeforelottitleskip}{-1\baselineskip}
\setlength{\cftafterlottitleskip}{0in}
\renewcommand{\cftlottitlefont}{\hfill\Large\bfseries}
\renewcommand{\cftafterlottitle}{\hfill}
\setlength{\cftfigindent}{0in}
\renewcommand{\cftfigpresnum}{Figure }
\newlength{\mylenf} % a "scratch" length
\settowidth{\mylenf}{\cftfigpresnum\cftfigaftersnum} % extra space
\addtolength{\cftfignumwidth}{\mylenf} % add the extra space
\setlength{\cfttabindent}{0in}
\renewcommand{\cfttabpresnum}{Table }
\newlength{\mylent} % a "scratch" length
\settowidth{\mylent}{\cfttabpresnum\cfttabaftersnum} % extra space
\addtolength{\cfttabnumwidth}{\mylent} % add the extra space
工作示例:Test.tex
\documentclass[12pt]{report} %font must be 10pt or larger - verify with your department rules
\input{packages}
\usepackage{uhthesis11}
\begin{document}
\title{\large Laser multi-spectral confocal microscopy for structured illumination imaging} % other modifiers \bf
\author{Abhilash Sukumari}
\submitdate{August 2013} % Month of graduation (not defense)
\degree{Master of Science}{Thesis}%Comment out for P hD thesis
\doublespacing % uncomment for double space drafts, and comment out for single (must be double spaced for final submission) %
\pagenumbering{roman}
\setcounter{page}{9} %check to make sure the page number is set properly
\pagenumbering{arabic}
\setcounter{page}{1}
\chapter{INTRODUCTION}
\label{Intro and background}
\section{Example : This is a section}
This is a section
\subsection{Example : This is a sub-section}
This is a sub-section
\subsubsection{Example : This is a sub-sub-section}
\end{document}
答案1
您的文档类使用 default\chapter
相关设置(带有少量添加)。因此,只需对标题宏进行简单的修补即可纠正间距。将以下内容添加到您的文档前言中:
\usepackage{etoolbox}% http://ctan.org/pkg/etoolbox
\makeatletter
% \patchcmd{<cmd>}{<search>}{<replace>}{<success>}{<failure>}
% --- Patch \chapter
\patchcmd{\@makechapterhead}{50\p@}{\chapheadtopskip}{}{}% Space from top of page to CHAPTER X
\patchcmd{\@makechapterhead}{20\p@}{\chapheadsep}{}{}% Space between CHAPTER X and CHAPTER TITLE
\patchcmd{\@makechapterhead}{40\p@}{\chapheadbelowskip}{}{}% Space between CHAPTER TITLE and text
% --- Patch \chapter*
\patchcmd{\@makeschapterhead}{50\p@}{\chapheadtopskip}{}{}% Space from top of page to CHAPTER TITLE
\patchcmd{\@makeschapterhead}{40\p@}{\chapheadbelowskip}{}{}% SPace between CHAPTER TITLE and text
\makeatother
% Set new lengths
\newlength{\chapheadtopskip}\setlength{\chapheadtopskip}{20pt}
\newlength{\chapheadsep}\setlength{\chapheadsep}{40pt}
\newlength{\chapheadbelowskip}\setlength{\chapheadbelowskip}{15pt}
以上更新\@makechapterhead
插入了\chapheadtopskip
定义从页面顶部到第 X 章的距离、\chapheadsep
定义从第 X 章到第 X 章标题的距离以及\chapheadbelowskip
定义从第 X 章标题到正文的距离的 。它们的原始值分别为50\p@
(50pt)、20\p@
(20pt) 和40\p@
(40pt),现已更新为20pt
、40pt
和15pt
,仅作为示例。
由于您可能正在使用\chapter*
(ToC、LoF 和 LoT 使用),因此需要修补\chapter*
相关的宏(\@makeschapterhead
),正如我上面所做的那样。