如何更改附录部分的标题对齐方式?

如何更改附录部分的标题对齐方式?

我正在使用usfdis类。但是,由于新的规范,附录标题现在应为单倍行距并与左边距对齐。

参考附录部分的代码如下usfdis.cls

\renewcommand{\appendix}{% Appendices have a cover page and different
                     % layout
\clearpage
\vspace*{0.6in}
\addcontentsline{toc}{chapter}{\protect\numberline{Appendices}}
 \begin{center}{\chpsformat Appendices\par}
 \end{center}
\newpage
\addtolength{\textheight}{-2\baselineskip+3pt} %<--- Weird 3.5pt
\setlength{\headsep}{2\baselineskip-3pt}%            it's magic!
\ch@ngetext
\gdef\@chapapp{\appendixname }%
\gdef\thechapter{\@Alph\c@chapter}
\renewcommand{\chapter}
{\clearpage\thispagestyle{plain}\@afterindentfalse\secdef\@appendix\@schapter}
\setcounter{chapter}{0}%
\setcounter{section}{0}%
\makeatletter
\let\@oddhead\@empty
\def\@oddhead{\vbox{\chapalign\chpformat (continued) } }
\makeatother

}

一种选择是将附录作为节而不是章节,然后它们将左对齐,但我还需要有节标题,例如:

Appendix A: Name of Appendix A
Appendix B: Name of Appendix B
etc.

下图是一个示例,展示了新的要求:

新格式要求

下面的代码是该文档实际格式的示例:

\documentclass[11pt,doublespacing,alignheadcenter]{usfdis}
\usepackage{geometry}
\usepackage{graphicx}
\usepackage[T1]{fontenc}
\usepackage{mathptmx}
\usepackage{helvet}
\usepackage[plain]{fancyref}
\usepackage{amsmath}
\usepackage{booktabs}
\usepackage{pdfpages}

\title{Disertation title}
\author{The author}
\degree{Doctor of Philosophy}
\department{Department}
\college{Engineering}
\advisor{Main advisor}
\member{Member 1, Ph.D. \and Member2, Ph.D. \and Member3, Ph.D.}
\approvaldate{ 2013}
\copyrightdate{2013}
\keywords{keyword 1\and keyword 2}

\begin{document}
\setlength{\parindent}{30pt}
\maketitle  

\chapter{Introduction}   
 \section{Section 1.1 in Chapter 1}

 \chapter{Conclusions} 
 \clearpage

\appendix
 \chapter{Copyright Approvals for Appendices A, B and C, respectively }
 \noappendix

 \begin{bio} bio information
 \end{bio}

\end{document}

答案1

类文件设计得非常好,因此修改起来相对简单。将以下内容添加到文档序言中。我创建了一个新命令\appalign来仅对齐附录的标题,然后重新定义了内部命令,使标题使用该命令而不是类\chapalign。虽然该值可以硬编码,但这种更改将是将其纳入课程的更好方法,特别是如果研究生院可以再次改变主意,因为他们习惯这样做。

\makeatletter
\newcommand{\appalign}{\raggedright}
\renewcommand{\@makeapphead}[1]{%
\vspace*{-3\baselineskip}{\appalign%
{\chpformat #1}%
\par\nobreak\vspace*{\baselineskip}}%
}
\makeatother

以下是完整示例:

\documentclass[11pt,doublespacing,alignheadcenter]{usfdis}
\usepackage{geometry}
\usepackage{graphicx}
\usepackage[T1]{fontenc}
\usepackage{mathptmx}
\usepackage{helvet}
\usepackage[plain]{fancyref}
\usepackage{amsmath}
\usepackage{booktabs}
\usepackage{pdfpages}
\makeatletter
\newcommand{\appalign}{\raggedright}
\renewcommand{\@makeapphead}[1]{%
\vspace*{-3\baselineskip}{\appalign%
{\chpformat #1}%
\par\nobreak\vspace*{\baselineskip}}%
}
\makeatother
\title{Disertation title}
\author{The author}
\degree{Doctor of Philosophy}
\department{Department}
\college{Engineering}
\advisor{Main advisor}
\member{Member 1, Ph.D. \and Member2, Ph.D. \and Member3, Ph.D.}
\approvaldate{ 2013}
\copyrightdate{2013}
\keywords{keyword 1\and keyword 2}

\begin{document}
\setlength{\parindent}{30pt}
\maketitle  

\chapter{Introduction}   
 \section{Section 1.1 in Chapter 1}

 \chapter{Conclusions} 
 \clearpage

\appendix
 \chapter{Copyright Approvals for Appendices A, B and C, respectively }
 \noappendix

 \begin{bio} bio information
 \end{bio}

\end{document}

相关内容