报告类中章节标题前后的间距

报告类中章节标题前后的间距

对于我的论文,我需要在章节标题前后保持一致的间距。论文是在课堂上撰写的report

目前,我在序言中使用以下命令来控制章节标题前后的间距。但是,这不会导致整个文档的间距一致。如果有办法解决这个问题,将会很有帮助。

\documentclass[12pt,a4paper]{report}
\usepackage[utf8]{inputenc}
\usepackage[titletoc]{appendix}
\usepackage{lipsum}
\usepackage{indentfirst}
\usepackage{graphicx}
\graphicspath{{Images/}}
\usepackage[a4paper,margin=1in]{geometry}
%%%For absolute positioning on the title page
\usepackage[absolute]{textpos}
\setlength{\TPHorizModule}{\paperwidth}
\setlength{\TPVertModule}{10in}
%%%%
\usepackage{fancyhdr}
%%%%Adding figure captions in italics and color
\usepackage[svgnames]{xcolor}
\definecolor{blue}{RGB}{101,140,191}
\usepackage{caption}
\usepackage[font={color=blue}]{caption}
%%%%%
\usepackage{subcaption}
\usepackage{setspace}
\usepackage{hyperref}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage[indentafter]{titlesec} %%%%to set the size of different headers
%%%%%Setting the spacing before and after the section titles
%%%%%
\titlespacing{\chapter}{0pt}{20pt plus 0pt minus 0pt}{20pt plus 0pt minus 0pt}
\titlespacing{\section}{0pt}{20pt plus 0pt minus 0pt}{20pt plus 0pt minus 0pt}
\titlespacing{\subsection}{0pt}{20pt plus 0pt minus 0pt}{20pt plus 0pt minus 0pt}
\titlespacing{\subsubsection}{0pt}{20pt plus 0pt minus 0pt}{20pt plus 0pt minus 0pt}
%%%%%
\usepackage{indentfirst}
\usepackage{float}  %%%% To restrict the location of figure
\usepackage{array} %%%% This is used for controlling the width of table. If left controlled, the text may span more space than permitted by the 
% command \textwidth
\usepackage{chemmacros} %%%% for representing the ions in non-italicized font
\usepackage{textgreek} %%%For printing non-italicized greek letters
\newcommand*\chem[1]{\ensuremath{\mathrm{#1}}} %%%% This package is for writing chemical equations
\renewcommand{\chaptername}{CHAPTER}
\renewcommand{\appendixname}{APPENDIX}
%%%%%
\usepackage{titletoc}
\setcounter{tocdepth}{0}
\newcommand{\setupname}[1][\chaptername]{
\titlecontents{chapter}[0pt]{\vspace{1ex}}{#1~\thecontentslabel:\quad}{}{\mdseries\titlerule*[0.75em]{.}\contentspage}[]
}
%%%%
%%%%%
%\setlength{\intextsep}{5pt plus 1.0pt minus 2.0pt}   %%%%For controlling the spacing between figure and text
%\setlength{\floatsep}{5pt plus 1.0pt minus 2.0pt}   %%%%For controlling the spacing between figure and text
%\setlength{\textfloatsep}{5pt plus 1.0pt minus 2.0pt}   %%%%For controlling the spacing between figure and text
\usepackage{siunitx}
\newcolumntype{M}[1]{>{\centering\arraybackslash}m{#1}}   %%% New column time defined for centering columns
\titleformat*{\section}{\large}
\titleformat*{\subsection}{\large}
\titleformat*{\subsubsection}{\large}
\titleformat*{\paragraph}{\large}
\titleformat*{\subparagraph}{\large}
%%%%
%%%%
%\pagestyle{fancy}
%\fancyhead{}
%\fancyhead[RO,LE]{Thesis Title}
%\fancyfoot{}
%\fancyfoot[LE,RO]{\thepage}
%\fancyfoot[LO,CE]{Chapter\thechapter}
%\fancyfoot[CO,RE]{Vikram Kumar}
%\renewcommand{\headrulewidth}{0.4pt}
%\renewcommand{\footrulewidth}{0.4pt}
\usepackage[style=chem-acs,sorting=none]{biblatex}\addbibresource{references.bib}  %%%sorting is set equal to none for having the references appear in the order they are cited
\addbibresource{introduction.bib}
\addbibresource{characterization.bib}
\addbibresource{data.bib}
\usepackage{ragged2e} %%%For aligning the text
%%%%Adjustment of Title
\titleformat{\chapter}[hang] 
{\mdseries\large}{\chaptertitlename\ \thechapter:}{1em}{\centering}
\begin{document}
\pagenumbering{roman}
\chapter*{}
\vspace*{\fill}
\textit{To my Parents}
\vspace*{\fill}
\begin{spacing}{1.75}
\justify
\chapter*{ACKNOWLEDGMENTS}
%\par
\lipsum.%\par

\renewcommand*\contentsname{TABLE OF CONTENTS}
\tableofcontents
\cleardoublepage
\pagenumbering{arabic}
\setupname
\chapter{INTRODUCTION}\label{chap:intro}
\lipsum %\par

\lipsum %\par

\begin{flushleft}
\section{Problem Statement and Organization}\label{sec:problemstatment}
\end{flushleft}
%par
\lipsum

\begin{flushleft}
\section{Detailed Investigations}\label{sec:problemstatment}
\end{flushleft}
%par
\lipsum
%%%%
\end{spacing}
\begin{spacing}{1.5}
\overfullrule=0pt
\addcontentsline{toc}{chapter}{REFERENCES}
\printbibliography[title={REFERENCES}]
\end{spacing}
\end{document}

相关内容