更改前言中章节标题前的间距

更改前言中章节标题前的间距

我正在为我的论文使用报告类,这要求每章开头有 2 英寸的边距。我使用以下命令:

\titlespacing*{\chapter}{0pt}{2in}{1in}

这对于所有章节都适用。但是,在 中不起作用frontmatter。我的 cls 文件如下。

\usepackage\[top=1in,bottom=1in,left=1in,right=1in\]{geometry}
\usepackage{titlesec}
\usepackage{setspace}
\usepackage{textcase}
\usepackage{tocloft}
\usepackage\[nonumberlist,xindy,toc\]{glossaries}

\titlespacing{\chapter}{0pt}{2in}{1in}
\titlespacing*{\chapter}{0pt}{2in}{1in}
\titlespacing*{name=\chapter,numberless}{0pt}{2in}{1in}

\newcommand{\makefrontmatter}{
  \thispagestyle{empty}
  \vspace*{50\p@}
  \begin{center}
    \begin{doublespace}
    \renewcommand{\and}{\NoCaseChange{\\}}
    \MakeTextUppercase{\@title} \linebreak \linebreak
    by \linebreak
    \MakeTextUppercase{\@author}
    \begin{singlespace}
      \MakeTextUppercase{\@adviser, Committee Chair \and \@committee}
    \end{singlespace}

    \hfill \linebreak
    \ifthesis
      A THESIS
    \else
      A DISSERTATION
    \fi
    \hfill \linebreak
    \begin{singlespace}
      Submitted in partial fulfillment of the requirements \\
      for the degree of \@degree \\
      in the Department of \@department \\
      in the \@school\,of \\
      \@university
    \end{singlespace}
    \hfill \linebreak
    \hfill \linebreak
    \MakeTextUppercase{\@place}
    \hfill \linebreak
    \hfill \linebreak
    \@gradyear
  \end{doublespace}
  \end{center}
  \pagebreak

    \begin{frontmatter}

    \chapter*{ABSTRACT}
    \addcontentsline{toc}{chapter}{ABSTRACT}

    \@abstract

    \chapter*{DEDICATION}
    \addcontentsline{toc}{chapter}{DEDICATION} 
    \@dedication

    %% Print everything in the glossary.
    \glsaddall
    \printglossary
    \glsresetall

    \chapter*{ACKNOWLEDGMENTS}
    \addcontentsline{toc}{chapter}{ACKNOWLEDGMENTS}

    \@acknowledgments

    \begin{singlespace}
    \tableofcontents

    \listoftables 
    \addcontentsline{toc}{chapter}{LIST OF TABLES} 

    \listoffigures
    \addcontentsline{toc}{chapter}{LIST OF FIGURES} 
    \end{singlespace}

    \end{frontmatter}

}

它在前言部分不起作用 但它在主要内容中起作用

答案1

我希望这能起作用:

\documentclass[12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage{blindtext} % enters dummy text in document (removable)
%\usepackage[titles]{tocloft} % use tocloft in this way
% other wise it interferes with titles settings

\title{
  {Learning Report Class}\\
  {\large Institute of Self Learning }\\
}
\author{J Kumar}
\date{\today}

\usepackage{titlesec}
\titleformat{\chapter}[display]
{\vspace{1in}} % adding 1in space which makes the total space 2in
{\Large\bfseries\chaptertitlename \thechapter}
{25pt}
{\Huge\bfseries}

\begin{document}
\maketitle

\chapter*{Abstract}
\blindtext

\chapter*{Dedication}
To my ...

\chapter*{Declaration}
\blindtext

\chapter*{Acknowledgements}
\blindtext

\tableofcontents
\clearpage

\chapter{Introduction}
\blindtext

\chapter{Chapter two}
\blindtext

\appendix
\chapter{Bibliography}

\chapter{Index} 
\end{document}

相关内容