iuthesis
我正在使用基于的文档类amsbook
。我修改了分布式版本(1.2.0.23:源 dtx 可在此处获取,删除 cls 文件,下面包括了我的修改版本)一定数量,最近注意到页边距存在问题。
下面是使用修改后的类并演示问题的 MWE。
\documentclass[12pt,letterpaper,abstractsigs,final]{iuthesis}
\usepackage{fontspec}
\setmainfont{TeX Gyre Pagella}
\usepackage{parskip}
\setlength{\parindent}{15pt}
\pagestyle{jnwplain}
\usepackage{lipsum}
%%% Metadata
\author{Hope I. Passe}
\title{A dissertation that examines\\lots of interesting things}
\abstracttitle{A dissertation that examines lots of interesting things}
\advisor{Tad Vizer}
\secondreader{Yu R. Rong}
\thirdreader{Ar U. Shoer}
\fourthreader{Czech A. Ghen}
\fifthreader{Redd Marks}
\submitdate{\today}
\copyrightyear{2016}
\department{Miscellaneous Studies}
\begin{document}
\fontdimen3\font=0.2em
\begin{acknowledgements}
\lipsum[7-11]
\end{acknowledgements}
\begin{abstract}
Very abstract thoughts on the topic. \lipsum[7-9]
\end{abstract}
\frontmatter
\maketitle
\signaturepage
\copyrightpage
\makeack
\makeabstract
\tableofcontents
\mainmatter
\chapter{Hargle}
\lipsum
\end{document}
下图显示,页边距在章节中的表现符合预期,但在其他部分中的表现有所不同,例如致谢和摘要(如图所示),以及目录、图表和表格列表以及参考文献。在这些部分中,章节标题上方的垂直间距也会添加到章节每页的顶部。
我可以通过注释掉或删除创建部分标题的行来获得所需的间距行为(无顶部边距),例如
\@makeschapterhead{\MakeUppercase{Acknowledgements}}
我尝试了一下,但尚未找到一种方法来为这些部分创建合适的标题,而不会弄乱后续页面的边距。我对 的定义所做的任何调整\@makeschapterhead
(来自我当前的版本amsbook.cls
,来自 TeX Live,如下所示)似乎都没有帮助。
\def\@makeschapterhead#1{\global\topskip 7.5pc\relax
\begingroup
\fontsize{\@xivpt}{18}\bfseries\centering
#1\par \endgroup
\skip@34\p@ \advance\skip@-\normalbaselineskip
\vskip\skip@ }
我可能以某种方式把其他地方的东西搞砸了iuthesis.cls
,所以我也提供了完整的精简版本。
%%
%% This is file `iuthesis.cls',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% iuthesis.dtx (with options: `class')
%% IUThesis Document Class (jonwashi)
%% iuthesis: Document class for IU Thesis.
%% (jonwashi æʔ indiana.edu)
%% Copyright 2016
%%
%% based on original by: N. Danner ([email protected]), 1999, v1.2.0.23
%% RCS Info:
%% iuthesis.dtx,v 1.2.99 2016/07/16 jonwashi
\def\fileversion{1.2.99}
\def\filedate{2016/07/16}
\NeedsTeXFormat{LaTeX2e}[1996/12/01] \ProvidesClass{iuthesis}
\message{<< Class 'iuthesis', v\fileversion, \filedate (jonwashi) >>}
\newif\ifIUT@debugging \IUT@debuggingtrue \IUT@debuggingfalse
\def\IUT@dbgmsg#1{\ifIUT@debugging\message{#1}\fi}
\def\IUT@optionmsg#1{\message{ iuthesis option: #1}}
\def\IUTdraftmsg#1{}
\let\draftmsg\IUTdraftmsg
\def\IUT@showdraftfoot{}
\DeclareOption{draft}{
\IUT@optionmsg{draft}
\def\IUTdraftmsg#1{\gdef\IUT@showdraftfoot{#1}}
\let\draftmsg\IUTdraftmsg
\def\IUT@showdraftfoot{DRAFT: \today}
\PassOptionsToClass{draft}{amsbook}
}
\DeclareOption{final}{
\IUT@optionmsg{final}
\def\IUTdraftmsg#1{}
\let\draftmsg\IUTdraftmsg
\def\IUT@showdraftfoot{}
\PassOptionsToClass{final}{amsbook}
}
\newcount\IUT@abstype
\newcount\IUT@nmlabstract\IUT@nmlabstract=0
\newcount\IUT@umiabstract\IUT@umiabstract=1
\newcount\IUT@ugsabstract\IUT@ugsabstract=2
\IUT@abstype=\IUT@nmlabstract
\DeclareOption{umiabstract}{
\IUT@optionmsg{umiabstract}
\IUT@abstype=\IUT@umiabstract
\AtEndOfClass{\raggedbottom}
}
\newif\ifIUT@ugsabs
\IUT@ugsabsfalse
\DeclareOption{ugsabstract}{
\IUT@optionmsg{ugsabstract}
\IUT@abstype=\IUT@ugsabstract
\AtEndOfClass{\raggedbottom}
}
\newif\ifIUT@abstractsigs
\DeclareOption{abstractsigs}{
\IUT@optionmsg{abstractsigs}
\IUT@abstractsigstrue
}
\DeclareOption{noabstractsigs}{
\IUT@optionmsg{noabstractsigs}
\IUT@abstractsigsfalse
}
\newif\ifIUT@noabstract
\IUT@noabstractfalse
\DeclareOption{noabstract}{
\IUT@optionmsg{noabstract}
\IUT@noabstracttrue
}
\DeclareOption{ms}{
\AtEndOfClass{\degree{Master of Science}}
}
\DeclareOption{ma}{
\AtEndOfClass{\degree{Master of Arts}}
}
\newif\ifIUT@three
\DeclareOption{three}{\IUT@threetrue}
\DeclareOption{single}{
\AtEndOfClass{\def\IUT@blstretch{1}}
}
\DeclareOption{debug}{
\IUT@debuggingtrue
}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{amsbook}}
\ExecuteOptions{abstractsigs,draft}
\ProcessOptions
\PassOptionsToClass{oneside}{amsbook}
\LoadClass{amsbook}[1995/01/27]
\topmargin 0pt
\oddsidemargin=.5in
\evensidemargin=\oddsidemargin
\advance\headheight 2pt
\textwidth 6in
\textheight 8.9in
\advance\textheight by -\headheight
\advance\textheight by -\headsep
\advance\textheight by -\footskip
\marginparwidth 0.5in
\def\ps@chapter{
\gdef\ps@headings{
\def\@oddhead{
\normalfont\scriptsize\hfil\rightmark{}{}\hfil \llap{\thepage}
}
\def\@oddfoot{
\normalfont\ttfamily\scriptsize\rlap{\IUT@showdraftfoot\hfill}\hfill
}
\global\let\@evenfoot\@oddfoot
\global\let\@mkboth\markboth
\global\let\partmark\@gobble
\gdef\chaptermark{%
\@secmark\markboth\chapterrunhead{}}%
\global\let\sectionmark\@gobble
}
}
\def\ps@section{
\gdef\ps@headings{
\def\@oddhead{
\normalfont\scriptsize\hfil\rightmark{}{}\hfil \llap{\thepage}
}
\def\@oddfoot{
\normalfont\ttfamily\scriptsize\rlap{\IUT@showdraftfoot\hfill}\hfill
}
\global\let\@evenfoot\@oddfoot
\global\let\@mkboth\markboth
\global\let\partmark\@gobble
\gdef\chaptermark{%
\@secmark\markboth\chapterrunhead{}}%
\gdef\sectionmark{%
\@secmark\markboth\sectionrunhead{}}%
}
}
\def\ps@chapsec{
\gdef\ps@headings{
\def\@oddhead{
\normalfont\scriptsize\rlap{\leftmark{}{}}\hfill\llap{\rightmark{}{}}
}
\def\@oddfoot{
\normalfont\scriptsize\rlap{\ttfamily\IUT@showdraftfoot\hfill}%
\hfil\thepage\hfil
}
\global\let\@evenfoot\@oddfoot
\global\let\@mkboth\markboth
\global\let\partmark\@gobble
\gdef\chaptermark{%
\@secmark\markboth\chapterrunhead\chaptername}%
\gdef\sectionmark{
\@secmark\markright\IUT@sectionrunhead{}}
}
}
\def\IUT@sectionrunhead#1#2#3{%
\def\@tempa{#3}%
\ifx\@empty\@tempa\else%
\@ifnotempty{#2}{\uppercase{#1 #2}\@ifnotempty{#3}{. }}%
\ifx\@empty\@tempa\else\uppercasenonmath\@tempa\@tempa\fi%
\fi%
}
\def\ps@plain{\ps@empty
\def\@oddfoot{
\normalfont\scriptsize
\rlap{\ttfamily\IUT@showdraftfoot}\hfil\thepage\hfil
}
\let\@evenfoot\@oddfoot
}
\def\ps@jnwplain{
\gdef\ps@headings{
\def\@oddfoot{
\normalfont\ttfamily\scriptsize\rlap{\IUT@showdraftfoot\hfill}%
\hfil\thepage\hfil
}
\global\let\@evenfoot\@oddfoot
\global\let\@mkboth\markboth
\global\let\partmark\@gobble
\gdef\chaptermark{%
\@secmark\markboth\chapterrunhead{}}%
\global\let\sectionmark\@gobble
}
}
\renewcommand{\author}[1]{\gdef\@author{#1}}\let\@author\relax
\renewcommand{\title}[1]{\gdef\@title{#1}\uppercasenonmath\@title}\let\@title\relax
\def\submitdate#1{\gdef\@submitdate{#1}}\let\@submitdate\relax
\def\department#1{\gdef\@department{#1}}\let\@department\relax
\def\departmentname#1{\gdef\@departmentname{#1}}\departmentname{Department}
\def\degree#1{\gdef\@degree{#1}}\degree{Doctor of Philosophy}
\def\abstracttitle#1{\gdef\@abstracttitle{#1}\uppercasenonmath\@abstracttitle}\abstracttitle{\@title}
\def\advisor#1{\gdef\@principaladvisor{#1}}\let\@principaladvisor\relax
\def\secondreader#1{\gdef\@secondreader{#1}}\let\@secondreader\relax
\def\thirdreader#1{\gdef\@thirdreader{#1}}\let\@thirdreader\relax
\def\fourthreader#1{\gdef\@fourthreader{#1}}\let\@fourthreader\relax
\def\fifthreader#1{\gdef\@fifthreader{#1}}\let\@fifthreader\relax
\def\copyrightyear#1{\gdef\@copyrightyear{#1}}
\let\@copyrightyear\relax
\def\@makechapterhead#1{%
\vspace*{50\p@}%
{
\centering
\normalfont
\ifnum \c@secnumdepth >\m@ne
\LARGE\bfseries \MakeUppercase{\@chapapp}\space \thechapter
\par\nobreak
\vskip 20\p@
\fi
\interlinepenalty\@M
\LARGE \bfseries \MakeUppercase{#1}\par\nobreak
\vskip 40\p@
}}
\def\subsection{\@startsection{subsection}{2}%
\z@{.5\linespacing\@plus.7\linespacing}{.25\linespacing}%
{\normalfont\bfseries}}
\def\section{%
\@startsection{section}{1}
{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\centering\normalfont\normalsize\bfseries\MIA@up}%
}
\def\MIA@up{%
\def\@M##1\par{10000 \MakeUppercase{##1}\par}}
\newcommand \tocdotfill {\leavevmode \cleaders \hb@xt@ 0.75em{\hss .\hss }\hfill \kern \z@}
\newcommand{\@dotsep}{4.5}
\def\l@subsection{\@tocline{2}{0pt}{2.5pc}{5pc}{}}
\renewcommand\tocchapter[3]{%
\indentlabel{\@ifnotempty{#2}{\ignorespaces \MakeUppercase{Chapter #2.}\quad}}\MakeUppercase{#3}\tocdotfill%
}
\renewcommand{\tocsection}[3]{%
\indentlabel{\@ifnotempty{#2}{\ignorespaces#1 #2.\quad}}#3\tocdotfill%
}
\renewcommand{\tocsubsection}[3]{%
\indentlabel{\@ifnotempty{#2}{\ignorespaces#1 #2.\quad}}#3\tocdotfill%
}
\renewcommand\tocappendix[3]{%
\indentlabel{\@ifnotempty{#2}{\ignorespaces \MakeUppercase{Appendix #2.}\quad}}\MakeUppercase{#3}\tocdotfill%
}
\def\l@figure{\@dottedtocline{1}{1.5em}{2.3em}}
\def\l@table{\@dottedtocline{1}{1.5em}{2.3em}}
\newbox\dedicationbox
\newenvironment{dedication}{%
\global\let\dedication\relax%
\bgroup
\renewcommand{\baselinestretch}{1}
\normalsize
\global\setbox\dedicationbox\vbox\bgroup%
\begin{center}
}{
\end{center}
\egroup\egroup
}
\newbox\acknowledgebox
\newenvironment{acknowledgements}{%
\global\let\acknowledgements\relax%
\bgroup
\renewcommand{\baselinestretch}{\IUT@blstretch}
\normalsize
\global\setbox\acknowledgebox\vbox\bgroup
\trivlist%
\item[]\ignorespaces
}{
\endtrivlist
\egroup\egroup
}
\newbox\prefacebox
\newenvironment{preface}{%
\global\let\preface\relax%
\bgroup
\renewcommand{\baselinestretch}{\IUT@blstretch}
\normalsize
\global\setbox\prefacebox\vbox\bgroup
\trivlist%
\item[]\ignorespaces
}{
\endtrivlist
\egroup\egroup
}
\newbox\referencesbox
\newenvironment{referencesbib}{%
\global\let\referencesbib\relax%
\bgroup
\renewcommand{\baselinestretch}{\IUT@blstretch}
\normalsize
\global\setbox\referencesbox\vbox\bgroup
\trivlist%
\item[]\ignorespaces
}{
\endtrivlist
\egroup\egroup
}
\renewenvironment{abstract}{%
\global\let\abstract\relax%
\bgroup%
\renewcommand{\baselinestretch}{\IUT@blstretch}%
\normalsize%
\global\setbox\abstractbox\vbox\bgroup
\trivlist\item[]\ignorespaces
}%
{
\endtrivlist
\egroup\egroup
\global\let\endabstract\relax
}
\def\IUT@defineabstract{
\gdef\makeabstract{
\typeout{Abstract}
\bgroup
\normalfont
\ifnum\IUT@abstype>0%
\IUT@dbgmsg{makeabstract: Setting abstract pagestyle empty}%
\pagestyle{empty}\thispagestyle{empty}%
\else%
\IUT@dbgmsg{makeabstract: Setting abstract pagestlye plain}%
\fi%
\IUT@dbgmsg{makeabstract: Setting title}%
\begin{center}%
\check@val\@author \\[.5\baselineskip]
\check@val\@abstracttitle \\[.5\baselineskip]
\end{center}%
\vskip2\baselineskip
\IUT@dbgmsg{makeabstract: Done}%
\IUT@dbgmsg{makeabstract: Setting abstract}%
\unvbox\abstractbox
\ifnum\IUT@abstype=\IUT@umiabstract%
\IUT@dbgmsg{makeabstract (umi): advisor's name}%
\vskip\baselineskip%
\hbox to\hsize{\hfill\check@val\@principaladvisor, Ph.D.}%
\fi
\ifnum\IUT@abstype=\IUT@ugsabstract%
\IUT@dbgmsg{makeabstract (ugs): signature lines}%
\ifIUT@abstractsigs%
\vbox{
\hbox to\textwidth{%
\IUT@sig[2.5in]{\check@val\@principaladvisor, Ph.D.}\hfill%
\IUT@sig[2.5in]{\check@val\@thirdreader, Ph.D.}%
}%
\hbox to\textwidth{%
\IUT@sig[2.5in]{\check@val\@secondreader, Ph.D.}\hfill%
\ifIUT@three\else\IUT@sig[2.5in]{\check@val\@fourthreader, Ph.D.}\fi%
}%
\ifx\@fifthreader\relax\else%
\hbox to\textwidth{%
\hfill\IUT@sig[2.5in]{\check@val\@fifthreader, Ph.D.}%
}%
\fi%
}
\fi
\else
\ifIUT@abstractsigs%
%\vskip-.1in
\hbox to\textwidth{\hfill\IUT@shortsig{\check@val\@principaladvisor, Ph.D.}}%
\hbox to\textwidth{\hfill\IUT@shortsig{\check@val\@secondreader, Ph.D.}}%
\hbox to\textwidth{\hfill\IUT@shortsig{\check@val\@thirdreader, Ph.D.}}%
\ifIUT@three\else%
\hbox to\textwidth{\hfill\IUT@shortsig{\check@val\@fourthreader, Ph.D.}}%
\fi%
\ifx\@fifthreader\relax\else%
\hbox to\textwidth{\hfill\IUT@shortsig{\check@val\@fifthreader, Ph.D.}}%
\fi
\fi
\fi
\newpage
\egroup
\ifnum\IUT@abstype>0
\def\end@fterabstract{\end{document}}
\else
\def\end@fterabstract{}
\fi
\end@fterabstract
}
}
\ifIUT@noabstract
\ifnum\IUT@abstype>0\IUT@defineabstract\else\def\makeabstract{}\fi
\else
\IUT@defineabstract
\fi
\ifnum\IUT@abstype>1
\IUT@dbgmsg{Setting maketitle noop}
\def\maketitle{}
\else
\def\maketitle{
\bgroup
\thispagestyle{empty}
\hbox{}\vskip1in
\bgroup
\LARGE\bfseries
\begin{center}
\check@val\@title
\end{center}
\egroup
\vfill
\bgroup
\Large
\begin{center}
\check@val\@author
\end{center}
\egroup
\vfill
\begin{center}
Submitted to the faculty of the University Graduate School \\
in partial fulfillment of the requirements \\
for the degree \\
\check@val\@degree \\
in the \check@val\@departmentname\ of \check@val\@department \\
Indiana University \\
\check@val\@submitdate
\end{center}
\vskip.5in
\egroup
\newpage
}
\fi
\ifnum\IUT@abstype>0
\IUT@dbgmsg{Setting frontmatter commands noops}
\def\signaturepage{}
\def\copyrightpage{}
\newcommand{\makededication}[1][]{}
\def\makeack{}
\else
\def\signaturepage{
\typeout{Signature Page}
\bgroup
\noindent
\begin{center}
Accepted by the Graduate Faculty, Indiana University, in partial
fulfillment of the requirements for the degree of \check@val\@degree.
\end{center}
\vskip.5in
Doctoral Committee
\egroup
\vskip.1in
\hbox to\textwidth{\hfill\IUT@sig{\check@val\@principaladvisor, Ph.D.}}%
\hbox to\textwidth{\hfill\IUT@sig{\check@val\@secondreader, Ph.D.}}%
\hbox to\textwidth{\hfill\IUT@sig{\check@val\@thirdreader, Ph.D.}}%
\ifIUT@three\else%
\hbox to\textwidth{\hfill\IUT@sig{\check@val\@fourthreader, Ph.D.}}%
\fi%
\ifx\@fifthreader\relax\else%
\hbox to\textwidth{\hfill\IUT@sig{\check@val\@fifthreader, Ph.D.}}%
\fi
\vfill
\noindent\check@val\@submitdate
\vfill
\newpage
}
\def\copyrightpage{
\typeout{Copyright Page}
\hbox{}\vfill
\begin{center}
Copyright © \check@val\@copyrightyear \\
\check@val\@author %\\
\end{center}
\vfill
\newpage
}
\newcommand{\makededication}[1][1in]{
\ifvoid\dedicationbox\else
\typeout{Dedication}
\hbox{}\vskip#1\unvbox\dedicationbox\vfill%
\newpage
\fi
}
\def\makereferencesheading{
\ifvoid\referencesbox\else
\typeout{References}
\@makeschapterhead{\MakeUppercase{References}}
\unvbox\referencesbox
\newpage
\fi
}
\def\ReferenceBib{
\typeout{References}
\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{\tocchapter{}{}{References}}
\@makeschapterhead{\MakeUppercase{References}}
}
\def\makepreface{
\ifvoid\prefacebox\else
\typeout{Preface}
\@makeschapterhead{\MakeUppercase{Preface}}
\unvbox\prefacebox
\newpage
\fi
}
\def\makeack{
\ifvoid\acknowledgebox\else
\typeout{Acknowledgements}
% \@makeschapterhead{\MakeUppercase{Acknowledgements}}
\unvbox\acknowledgebox
\newpage
\fi
}
\fi
\newcommand{\IUT@sig}[2][3in]{
\vbox{%
\hrule width 0pt height 1in depth 0pt%
\hrule width #1 height .4pt depth 0pt%
\vskip2mm%
\hbox to #1{\hfill #2}%
}
}
\newcommand{\IUT@shortsig}[2][3in]{
\vbox{%
\hrule width 0pt height 0.8in depth 0pt%
\hrule width #1 height .4pt depth 0pt%
\vskip2mm%
\hbox to #1{\hfill #2}%
}
}
\def\tableofcontents{
\bgroup
\renewcommand{\baselinestretch}{\IUT@blstretch}
\normalfont
\@makeschapterhead{\MakeUppercase{\contentsname}}
\@starttoc{toc}%
\egroup
}
\def\listoffigures{
\bgroup
\renewcommand{\baselinestretch}{\IUT@blstretch}
\normalfont
\chapter*{\listfigurename}
\@starttoc{lof}
\egroup
}
\def\listoftables{
\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{\tocchapter{}{}{List of Tables}}
\bgroup
\renewcommand{\baselinestretch}{\IUT@blstretch}
\normalfont
\@makeschapterhead{\MakeUppercase{\listtablename}}
\@starttoc{lot}
\egroup
}
\def\listofmaps{
\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{\tocchapter{}{}{List of Maps}}
\bgroup
\renewcommand{\baselinestretch}{\IUT@blstretch}
\normalfont
\@makeschapterhead{\MakeUppercase{\listmapname}}
\@starttoc{lom}
\egroup
}
\def\ReferencesBib{
\cleardoublepage
\bgroup
\renewcommand{\baselinestretch}{\IUT@blstretch}
\normalfont
\@makeschapterhead{\MakeUppercase{References}}
\addcontentsline{toc}{chapter}{\normalfont REFERENCES \tocdotfill}
}
%%%%
\renewcommand \thepart {\@Roman\c@part}
\renewcommand \thechapter {\@arabic\c@chapter}
\renewcommand \thesection {\thechapter.\@arabic\c@section}
\renewcommand\thesubsection {\thesection.\@arabic\c@subsection}
\renewcommand\thesubsubsection{\thesubsection.\@arabic\c@subsubsection}
\renewcommand\theparagraph {\thesubsubsection.\@arabic\c@paragraph}
\renewcommand\thesubparagraph {\theparagraph.\@arabic\c@subparagraph}
\newcommand\@chapapp{\chaptername}
\def\frontmatter{\cleardoublepage\pagenumbering{roman}\pagestyle{plain}}
\def\mainmatter{
\cleardoublepage
\pagenumbering{arabic}
\pagestyle{headings}
\renewcommand{\baselinestretch}{\IUT@blstretch}
\normalfont
}
\def\backmatter{
\newpage
\pagestyle{empty}
\renewcommand{\baselinestretch}{1}
\normalfont
}
\def\check@val#1{%
\ifx#1\relax%
\typeout{}%
\typeout{!!!!!!!!}%
\typeout{Warning: #1 not set!}%
\typeout{!!!!!!!!}%
\hbox{???}%
\else%
#1%
\fi%
}
\renewcommand{\seename}{see}
\def\IUT@blstretch{1.67}
\ifnum\@mainsize=10\def\IUT@blstretch{1.67}\fi
\ifnum\@mainsize=11\def\IUT@blstretch{1.62}\fi
\ifnum\@mainsize=12\def\IUT@blstretch{1.66}\fi
\IUT@dbgmsg{Baseline stretch: \IUT@blstretch}
\pagestyle{chapter}
\pagenumbering{arabic}
\normalsize
\endinput
%%
%% End of file `iuthesis.cls'.
也许有人可以建议一种我还没有尝试过的方法来解决此问题,或者发现我遗漏了什么?
答案1
我花了一些时间来重现该问题,因为发布的代码没有重现该问题。请发布重现该问题的代码,以避免造成混淆和不必要的误解、复杂性和蝗虫灾害。
如果您更改\topskip
,则会更改页面的基本布局。这不是章节标题的定义方式。这并不是说人们不这样做。但不应该这样做。它毫无理由地使事情变得非常复杂。
\@makechapterhead
相反,复制的定义\makeschapterhead
并进行适当的修改。
我也尝试消除大量潜在的虚假空格,但毫无疑问还存在更多空格。
%%
%% This is file `iuthesis-jw.cls',
%% generated with the docstrip utility.
%%
%% Based on IUThesis Document Class
%% iuthesis.cls by: N. Danner ([email protected]), 1999, v1.2.0.23
%% generated from iuthesis.dtx (with options: `class')
%% Modified as iuthesis.dtx,v 1.2.99 2016/07/16 jonwashi
%% iuthesis: Document class for IU Thesis.
%% (jonwashi æʔ indiana.edu)
%% Copyright 2016
%% Renamed iuthesis-jw.cls 2027-02-04 version 1.2.99jw
\def\fileversion{1.2.99jw}
\def\filedate{2017/02/04}
\NeedsTeXFormat{LaTeX2e}[1996/12/01] \ProvidesClass{iuthesis-jw}
\message{<< Class 'iuthesis-jw', v\fileversion, \filedate (jonwashi) >>}
\newif\ifIUT@debugging \IUT@debuggingtrue \IUT@debuggingfalse
\def\IUT@dbgmsg#1{\ifIUT@debugging\message{#1}\fi}
\def\IUT@optionmsg#1{\message{ iuthesis-jw option: #1}}
\def\IUTdraftmsg#1{}
\let\draftmsg\IUTdraftmsg
\def\IUT@showdraftfoot{}
\DeclareOption{draft}{%
\IUT@optionmsg{draft}%
\def\IUTdraftmsg#1{\gdef\IUT@showdraftfoot{#1}}%
\let\draftmsg\IUTdraftmsg
\def\IUT@showdraftfoot{DRAFT: \today}%
\PassOptionsToClass{draft}{amsbook}%
}
\DeclareOption{final}{%
\IUT@optionmsg{final}%
\def\IUTdraftmsg#1{}%
\let\draftmsg\IUTdraftmsg
\def\IUT@showdraftfoot{}%
\PassOptionsToClass{final}{amsbook}%
}
\newcount\IUT@abstype
\newcount\IUT@nmlabstract\IUT@nmlabstract=0
\newcount\IUT@umiabstract\IUT@umiabstract=1
\newcount\IUT@ugsabstract\IUT@ugsabstract=2
\IUT@abstype=\IUT@nmlabstract
\DeclareOption{umiabstract}{%
\IUT@optionmsg{umiabstract}%
\IUT@abstype=\IUT@umiabstract
\AtEndOfClass{\raggedbottom}%
}
\newif\ifIUT@ugsabs
\IUT@ugsabsfalse
\DeclareOption{ugsabstract}{%
\IUT@optionmsg{ugsabstract}%
\IUT@abstype=\IUT@ugsabstract
\AtEndOfClass{\raggedbottom}%
}
\newif\ifIUT@abstractsigs
\DeclareOption{abstractsigs}{%
\IUT@optionmsg{abstractsigs}%
\IUT@abstractsigstrue
}
\DeclareOption{noabstractsigs}{%
\IUT@optionmsg{noabstractsigs}%
\IUT@abstractsigsfalse
}
\newif\ifIUT@noabstract
\IUT@noabstractfalse
\DeclareOption{noabstract}{%
\IUT@optionmsg{noabstract}%
\IUT@noabstracttrue
}
\DeclareOption{ms}{%
\AtEndOfClass{\degree{Master of Science}}%
}
\DeclareOption{ma}{%
\AtEndOfClass{\degree{Master of Arts}}%
}
\newif\ifIUT@three
\DeclareOption{three}{\IUT@threetrue}
\DeclareOption{single}{%
\AtEndOfClass{\def\IUT@blstretch{1}}%
}
\DeclareOption{debug}{%
\IUT@debuggingtrue
}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{amsbook}}
\ExecuteOptions{abstractsigs,draft}
\ProcessOptions
\PassOptionsToClass{oneside}{amsbook}
\LoadClass{amsbook}[1995/01/27]
\topmargin 0pt
\oddsidemargin=.5in
\evensidemargin=\oddsidemargin
\advance\headheight 2pt
\textwidth 6in
\textheight 8.9in
\advance\textheight by -\headheight
\advance\textheight by -\headsep
\advance\textheight by -\footskip
\marginparwidth 0.5in
\def\ps@chapter{%
\gdef\ps@headings{%
\def\@oddhead{%
\normalfont\scriptsize\hfil\rightmark{}{}\hfil \llap{\thepage}%
}%
\def\@oddfoot{%
\normalfont\ttfamily\scriptsize\rlap{\IUT@showdraftfoot\hfill}\hfill
}%
\global\let\@evenfoot\@oddfoot
\global\let\@mkboth\markboth
\global\let\partmark\@gobble
\gdef\chaptermark{%
\@secmark\markboth\chapterrunhead{}}%
\global\let\sectionmark\@gobble
}%
}
\def\ps@section{%
\gdef\ps@headings{%
\def\@oddhead{%
\normalfont\scriptsize\hfil\rightmark{}{}\hfil \llap{\thepage}
}%
\def\@oddfoot{%
\normalfont\ttfamily\scriptsize\rlap{\IUT@showdraftfoot\hfill}\hfill
}%
\global\let\@evenfoot\@oddfoot
\global\let\@mkboth\markboth
\global\let\partmark\@gobble
\gdef\chaptermark{%
\@secmark\markboth\chapterrunhead{}}%
\gdef\sectionmark{%
\@secmark\markboth\sectionrunhead{}}%
}%
}
\def\ps@chapsec{%
\gdef\ps@headings{%
\def\@oddhead{%
\normalfont\scriptsize\rlap{\leftmark{}{}}\hfill\llap{\rightmark{}{}}%
}%
\def\@oddfoot{%
\normalfont\scriptsize\rlap{\ttfamily\IUT@showdraftfoot\hfill}%
\hfil\thepage\hfil
}%
\global\let\@evenfoot\@oddfoot
\global\let\@mkboth\markboth
\global\let\partmark\@gobble
\gdef\chaptermark{%
\@secmark\markboth\chapterrunhead\chaptername}%
\gdef\sectionmark{%
\@secmark\markright\IUT@sectionrunhead{}}%
}%
}
\def\IUT@sectionrunhead#1#2#3{%
\def\@tempa{#3}%
\ifx\@empty\@tempa\else
\@ifnotempty{#2}{\uppercase{#1 #2}\@ifnotempty{#3}{. }}%
\ifx\@empty\@tempa\else\uppercasenonmath\@tempa\@tempa\fi
\fi
}
\def\ps@plain{\ps@empty
\def\@oddfoot{%
\normalfont\scriptsize
\rlap{\ttfamily\IUT@showdraftfoot}\hfil\thepage\hfil
}%
\let\@evenfoot\@oddfoot
}
\def\ps@jnwplain{%
\gdef\ps@headings{%
\def\@oddfoot{%
\normalfont\ttfamily\scriptsize\rlap{\IUT@showdraftfoot\hfill}%
\hfil\thepage\hfil
}%
\global\let\@evenfoot\@oddfoot
\global\let\@mkboth\markboth
\global\let\partmark\@gobble
\gdef\chaptermark{%
\@secmark\markboth\chapterrunhead{}}%
\global\let\sectionmark\@gobble
}%
}
\renewcommand{\author}[1]{\gdef\@author{#1}}\let\@author\relax
\renewcommand{\title}[1]{\gdef\@title{#1}\uppercasenonmath\@title}\let\@title\relax
\def\submitdate#1{\gdef\@submitdate{#1}}\let\@submitdate\relax
\def\department#1{\gdef\@department{#1}}\let\@department\relax
\def\departmentname#1{\gdef\@departmentname{#1}}\departmentname{Department}
\def\degree#1{\gdef\@degree{#1}}\degree{Doctor of Philosophy}
\def\abstracttitle#1{\gdef\@abstracttitle{#1}\uppercasenonmath\@abstracttitle}\abstracttitle{\@title}
\def\advisor#1{\gdef\@principaladvisor{#1}}\let\@principaladvisor\relax
\def\secondreader#1{\gdef\@secondreader{#1}}\let\@secondreader\relax
\def\thirdreader#1{\gdef\@thirdreader{#1}}\let\@thirdreader\relax
\def\fourthreader#1{\gdef\@fourthreader{#1}}\let\@fourthreader\relax
\def\fifthreader#1{\gdef\@fifthreader{#1}}\let\@fifthreader\relax
\def\copyrightyear#1{\gdef\@copyrightyear{#1}}
\let\@copyrightyear\relax
\def\@makechapterhead#1{%
\vspace*{50\p@}%
{%
\centering
\normalfont
\ifnum \c@secnumdepth >\m@ne
\LARGE\bfseries \MakeUppercase{\@chapapp}\space \thechapter
\par\nobreak
\vskip 20\p@
\fi
\interlinepenalty\@M
\LARGE \bfseries \MakeUppercase{#1}\par\nobreak
\vskip 40\p@
}%
}
\def\@makeschapterhead#1{%
\vspace*{50\p@}%
{%
\centering
\normalfont
\interlinepenalty\@M
\LARGE \bfseries \MakeUppercase{#1}\par\nobreak
\vskip 40\p@
}%
}
\def\subsection{\@startsection{subsection}{2}%
\z@{.5\linespacing\@plus.7\linespacing}{.25\linespacing}%
{\normalfont\bfseries}}
\def\section{%
\@startsection{section}{1}
{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\centering\normalfont\normalsize\bfseries\MIA@up}%
}
\def\MIA@up{%
\def\@M##1\par{10000 \MakeUppercase{##1}\par}}
\newcommand \tocdotfill {\leavevmode \cleaders \hb@xt@ 0.75em{\hss .\hss }\hfill \kern \z@}
\newcommand{\@dotsep}{4.5}
\def\l@subsection{\@tocline{2}{0pt}{2.5pc}{5pc}{}}
\renewcommand\tocchapter[3]{%
\indentlabel{\@ifnotempty{#2}{\ignorespaces \MakeUppercase{Chapter #2.}\quad}}\MakeUppercase{#3}\tocdotfill
}
\renewcommand{\tocsection}[3]{%
\indentlabel{\@ifnotempty{#2}{\ignorespaces#1 #2.\quad}}#3\tocdotfill
}
\renewcommand{\tocsubsection}[3]{%
\indentlabel{\@ifnotempty{#2}{\ignorespaces#1 #2.\quad}}#3\tocdotfill
}
\renewcommand\tocappendix[3]{%
\indentlabel{\@ifnotempty{#2}{\ignorespaces \MakeUppercase{Appendix #2.}\quad}}\MakeUppercase{#3}\tocdotfill
}
\def\l@figure{\@dottedtocline{1}{1.5em}{2.3em}}
\def\l@table{\@dottedtocline{1}{1.5em}{2.3em}}
\newbox\dedicationbox
\newenvironment{dedication}{%
\global\let\dedication\relax
\bgroup
\renewcommand{\baselinestretch}{1}%
\normalsize
\global\setbox\dedicationbox\vbox\bgroup
\begin{center}
}{%
\end{center}
\egroup\egroup
}
\newbox\acknowledgebox
\newenvironment{acknowledgements}{%
\global\let\acknowledgements\relax
\bgroup
\renewcommand{\baselinestretch}{\IUT@blstretch}%
\normalsize
\global\setbox\acknowledgebox\vbox\bgroup
\trivlist
\item[]\ignorespaces
}{%
\endtrivlist
\egroup\egroup
}
\newbox\prefacebox
\newenvironment{preface}{%
\global\let\preface\relax
\bgroup
\renewcommand{\baselinestretch}{\IUT@blstretch}%
\normalsize
\global\setbox\prefacebox\vbox\bgroup
\trivlist
\item[]\ignorespaces
}{%
\endtrivlist
\egroup\egroup
}
\newbox\referencesbox
\newenvironment{referencesbib}{%
\global\let\referencesbib\relax
\bgroup
\renewcommand{\baselinestretch}{\IUT@blstretch}%
\normalsize
\global\setbox\referencesbox\vbox\bgroup
\trivlist
\item[]\ignorespaces
}{%
\endtrivlist
\egroup\egroup
}
\renewenvironment{abstract}{%
\global\let\abstract\relax
\bgroup
\renewcommand{\baselinestretch}{\IUT@blstretch}%
\normalsize
\global\setbox\abstractbox\vbox\bgroup
\trivlist\item[]\ignorespaces
}%
{%
\endtrivlist
\egroup\egroup
\global\let\endabstract\relax
}
\def\IUT@defineabstract{%
\gdef\makeabstract{%
\typeout{Abstract}%
\bgroup
\normalfont
\ifnum\IUT@abstype>0%
\IUT@dbgmsg{makeabstract: Setting abstract pagestyle empty}%
\pagestyle{empty}\thispagestyle{empty}%
\else
\IUT@dbgmsg{makeabstract: Setting abstract pagestlye plain}%
\fi
\IUT@dbgmsg{makeabstract: Setting title}%
\begin{center}%
\check@val\@author \\[.5\baselineskip]
\check@val\@abstracttitle \\[.5\baselineskip]
\end{center}%
\vskip2\baselineskip
\IUT@dbgmsg{makeabstract: Done}%
\IUT@dbgmsg{makeabstract: Setting abstract}%
\unvbox\abstractbox
\ifnum\IUT@abstype=\IUT@umiabstract%
\IUT@dbgmsg{makeabstract (umi): advisor's name}%
\vskip\baselineskip%
\hbox to\hsize{\hfill\check@val\@principaladvisor, Ph.D.}%
\fi
\ifnum\IUT@abstype=\IUT@ugsabstract%
\IUT@dbgmsg{makeabstract (ugs): signature lines}%
\ifIUT@abstractsigs%
\vbox{%
\hbox to\textwidth{%
\IUT@sig[2.5in]{\check@val\@principaladvisor, Ph.D.}\hfill%
\IUT@sig[2.5in]{\check@val\@thirdreader, Ph.D.}%
}%
\hbox to\textwidth{%
\IUT@sig[2.5in]{\check@val\@secondreader, Ph.D.}\hfill%
\ifIUT@three\else\IUT@sig[2.5in]{\check@val\@fourthreader, Ph.D.}\fi%
}%
\ifx\@fifthreader\relax\else%
\hbox to\textwidth{%
\hfill\IUT@sig[2.5in]{\check@val\@fifthreader, Ph.D.}%
}%
\fi%
}%
\fi
\else
\ifIUT@abstractsigs%
%\vskip-.1in
\hbox to\textwidth{\hfill\IUT@shortsig{\check@val\@principaladvisor, Ph.D.}}%
\hbox to\textwidth{\hfill\IUT@shortsig{\check@val\@secondreader, Ph.D.}}%
\hbox to\textwidth{\hfill\IUT@shortsig{\check@val\@thirdreader, Ph.D.}}%
\ifIUT@three\else%
\hbox to\textwidth{\hfill\IUT@shortsig{\check@val\@fourthreader, Ph.D.}}%
\fi%
\ifx\@fifthreader\relax\else%
\hbox to\textwidth{\hfill\IUT@shortsig{\check@val\@fifthreader, Ph.D.}}%
\fi
\fi
\fi
\newpage
\egroup
\ifnum\IUT@abstype>0
\def\end@fterabstract{\end{document}}%
\else
\def\end@fterabstract{}%
\fi
\end@fterabstract
}%
}
\ifIUT@noabstract
\ifnum\IUT@abstype>0\IUT@defineabstract\else\def\makeabstract{}\fi
\else
\IUT@defineabstract
\fi
\ifnum\IUT@abstype>1
\IUT@dbgmsg{Setting maketitle noop}
\def\maketitle{}
\else
\def\maketitle{%
\bgroup
\thispagestyle{empty}
\hbox{}\vskip1in
\bgroup
\LARGE\bfseries
\begin{center}
\check@val\@title
\end{center}
\egroup
\vfill
\bgroup
\Large
\begin{center}
\check@val\@author
\end{center}
\egroup
\vfill
\begin{center}
Submitted to the faculty of the University Graduate School \\
in partial fulfillment of the requirements \\
for the degree \\
\check@val\@degree \\
in the \check@val\@departmentname\ of \check@val\@department \\
Indiana University \\
\check@val\@submitdate
\end{center}
\vskip.5in
\egroup
\newpage
}
\fi
\ifnum\IUT@abstype>0
\IUT@dbgmsg{Setting frontmatter commands noops}
\def\signaturepage{}
\def\copyrightpage{}
\newcommand{\makededication}[1][]{}
\def\makeack{}
\else
\def\signaturepage{%
\typeout{Signature Page}%
\bgroup
\noindent
\begin{center}
Accepted by the Graduate Faculty, Indiana University, in partial
fulfillment of the requirements for the degree of \check@val\@degree.
\end{center}
\vskip.5in
Doctoral Committee
\egroup
\vskip.1in
\hbox to\textwidth{\hfill\IUT@sig{\check@val\@principaladvisor, Ph.D.}}%
\hbox to\textwidth{\hfill\IUT@sig{\check@val\@secondreader, Ph.D.}}%
\hbox to\textwidth{\hfill\IUT@sig{\check@val\@thirdreader, Ph.D.}}%
\ifIUT@three\else%
\hbox to\textwidth{\hfill\IUT@sig{\check@val\@fourthreader, Ph.D.}}%
\fi%
\ifx\@fifthreader\relax\else%
\hbox to\textwidth{\hfill\IUT@sig{\check@val\@fifthreader, Ph.D.}}%
\fi
\vfill
\noindent\check@val\@submitdate
\vfill
\newpage
}
\def\copyrightpage{%
\typeout{Copyright Page}%
\hbox{}\vfill
\begin{center}
Copyright © \check@val\@copyrightyear \\
\check@val\@author %\\
\end{center}
\vfill
\newpage
}
\newcommand{\makededication}[1][1in]{%
\ifvoid\dedicationbox\else
\typeout{Dedication}%
\hbox{}\vskip#1\unvbox\dedicationbox\vfill%
\newpage
\fi
}
\def\makereferencesheading{%
\ifvoid\referencesbox\else
\typeout{References}%
\@makeschapterhead{\MakeUppercase{References}}%
\unvbox\referencesbox
\newpage
\fi
}
\def\ReferenceBib{%
\typeout{References}%
\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{\tocchapter{}{}{References}}%
\@makeschapterhead{\MakeUppercase{References}}%
}
\def\makepreface{%
\ifvoid\prefacebox\else
\typeout{Preface}%
\@makeschapterhead{\MakeUppercase{Preface}}%
\unvbox\prefacebox
\newpage
\fi
}
\def\makeack{%
\ifvoid\acknowledgebox\else
\typeout{Acknowledgements}%
\@makeschapterhead{\MakeUppercase{Acknowledgements}}%
\unvbox\acknowledgebox
\newpage
\fi
}
\fi
\newcommand{\IUT@sig}[2][3in]{%
\vbox{%
\hrule width 0pt height 1in depth 0pt%
\hrule width #1 height .4pt depth 0pt%
\vskip2mm%
\hbox to #1{\hfill #2}%
}%
}
\newcommand{\IUT@shortsig}[2][3in]{%
\vbox{%
\hrule width 0pt height 0.8in depth 0pt%
\hrule width #1 height .4pt depth 0pt%
\vskip2mm%
\hbox to #1{\hfill #2}%
}%
}
\def\tableofcontents{%
\bgroup
\renewcommand{\baselinestretch}{\IUT@blstretch}%
\normalfont
\@makeschapterhead{\MakeUppercase{\contentsname}}%
\@starttoc{toc}%
\egroup
}
\def\listoffigures{%
\bgroup
\renewcommand{\baselinestretch}{\IUT@blstretch}%
\normalfont
\chapter*{\listfigurename}%
\@starttoc{lof}%
\egroup
}
\def\listoftables{%
\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{\tocchapter{}{}{List of Tables}}%
\bgroup
\renewcommand{\baselinestretch}{\IUT@blstretch}%
\normalfont
\@makeschapterhead{\MakeUppercase{\listtablename}}%
\@starttoc{lot}%
\egroup
}
\def\listofmaps{%
\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{\tocchapter{}{}{List of Maps}}%
\bgroup
\renewcommand{\baselinestretch}{\IUT@blstretch}%
\normalfont
\@makeschapterhead{\MakeUppercase{\listmapname}}%
\@starttoc{lom}%
\egroup
}
\def\ReferencesBib{%
\cleardoublepage
\bgroup
\renewcommand{\baselinestretch}{\IUT@blstretch}%
\normalfont
\@makeschapterhead{\MakeUppercase{References}}%
\addcontentsline{toc}{chapter}{\normalfont REFERENCES \tocdotfill}%
}
%%%%
\renewcommand \thepart {\@Roman\c@part}
\renewcommand \thechapter {\@arabic\c@chapter}
\renewcommand \thesection {\thechapter.\@arabic\c@section}
\renewcommand\thesubsection {\thesection.\@arabic\c@subsection}
\renewcommand\thesubsubsection{\thesubsection.\@arabic\c@subsubsection}
\renewcommand\theparagraph {\thesubsubsection.\@arabic\c@paragraph}
\renewcommand\thesubparagraph {\theparagraph.\@arabic\c@subparagraph}
\newcommand\@chapapp{\chaptername}
\def\frontmatter{\cleardoublepage\pagenumbering{roman}\pagestyle{plain}}
\def\mainmatter{%
\cleardoublepage
\pagenumbering{arabic}%
\pagestyle{headings}%
\renewcommand{\baselinestretch}{\IUT@blstretch}%
\normalfont
}
\def\backmatter{%
\newpage
\pagestyle{empty}%
\renewcommand{\baselinestretch}{1}%
\normalfont
}
\def\check@val#1{%
\ifx#1\relax
\typeout{}%
\typeout{!!!!!!!!}%
\typeout{Warning: #1 not set!}%
\typeout{!!!!!!!!}%
\hbox{???}%
\else
#1%
\fi
}
\renewcommand{\seename}{see}
\def\IUT@blstretch{1.67}
\ifnum\@mainsize=10\def\IUT@blstretch{1.67}\fi
\ifnum\@mainsize=11\def\IUT@blstretch{1.62}\fi
\ifnum\@mainsize=12\def\IUT@blstretch{1.66}\fi
\IUT@dbgmsg{Baseline stretch: \IUT@blstretch}
\pagestyle{chapter}
\pagenumbering{arabic}
\normalsize
\endinput
%%
%% End of file `iuthesis-jw.cls'.
将 MWE 中的类更改为然后iuthesis-jw
生成