删除每段后的多余空格

删除每段后的多余空格

我正在使用报告类在 LaTex 中撰写论文。我必须使用我习惯的双倍行距来撰写\doublespacing。但是,我在每个段落后都获得了额外的空格,比正常的双倍行距还要多。

我尝试了\vspace*{-\baselineskip}、、\setlength{\parskip}{-\baselineskip}和,\setlength{\parskip}{-0.5\baselineskip}但都没有用。

在此处输入图片描述

有什么建议么?

这是我所拥有的

\documentclass[12pt,letterpaper,notitlepage]{report} 
% To prevent the widows and orphans
\widowpenalty=10000
\clubpenalty=10000


\usepackage{indentfirst}
\usepackage{multirow}
\usepackage[autopunct=true]{csquotes}
\usepackage[none]{hyphenat}
\usepackage{anysize}                % Set up the margin: similar to GEOMETRY 
\usepackage{setspace}               % Line spacing
\usepackage{parskip}
\usepackage{titletoc}
\usepackage[compact]{titlesec}      % Title
\usepackage{textcomp}               % Just for the copyright symbol....
\usepackage{afterpage}              
\usepackage{apacite}                % APA style references
\usepackage[titletoc]{appendix}     % Appendices
\usepackage{fancyhdr}        % Page numbering position      

\usepackage[top=1.0in, bottom=1.0in, left=1.5in, right=1.0in]{geometry}
\usepackage{enumerate}              % For customized enumeration
\usepackage[normalem]{ulem}         % Underline
\usepackage{graphicx}               % Insert graphs
\usepackage{url}                    % Insert URL in the text
%\usepackage{subfig}                    % Have subfigures
\usepackage{subfigure}
%\usepackage[format=plain]{caption} %to edit captions: don't have figure captions hang
\usepackage{caption}
 \AtBeginCaption{\doublespacing}                % For the caption of tables/figures
\captionsetup[figure]{labelfont=it,labelsep=period,singlelinecheck=false}

\captionsetup[subfigure]{labelsep=space,labelfont=it,justification=justified,
    singlelinecheck=false,font=doublespacing,position=below}
\captionsetup[table]{aboveskip=0pt,belowskip=12pt, justification=raggedright,
labelsep=period,singlelinecheck=false,textfont=it,labelsep=newline}

\usepackage{amsmath,amsthm, amssymb,commath}
\renewcommand*\theequation{\textup{\arabic{chapter}.\arabic{equation}}}
\renewcommand*\thetable{\textup{\arabic{chapter}.\arabic{table}.}}
\renewcommand*\thefigure{\textup{\textit{\arabic{chapter}.\arabic{figure}}}}
\usepackage{adjustbox}              % Fit the table in one page
\usepackage[super]{nth}             % For the "th" in superscript
\usepackage{chngcntr}               
\usepackage{natbib}
\usepackage{lipsum}
\usepackage[titles,subfigure]{tocloft}              % For Table of Contents
\usepackage{booktabs}                % For makeing the table layout
\usepackage{rotating}                % For the tables in landscape
\usepackage{arydshln}                % Have dashline in Table environment
\usepackage[encapsulated]{CJK}                 % Chinese
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}

\usepackage[nottoc,notlot,notlof]{tocbibind}   
\usepackage{listings}
\usepackage[flushleft]{threeparttable}         % To make footnote for the table
\usepackage{float}
\usepackage{enumitem}           % For the margin of the ENUMERATION
\usepackage{adjustbox}
\usepackage{pdfpages} % for pdf
\usepackage{mathptmx} % for times new roman
\usepackage{parskip}

\theoremstyle{definition}
\newtheorem{theo}{Theorem}
\theoremstyle{definition}
\newtheorem{prop}{Proposition}
\theoremstyle{definition}
\newtheorem{defn}{Definition}
\theoremstyle{definition}
\newtheorem{eg}{Example}


% % CHAPTER
% Center the chapter title
\renewcommand{\chaptername}{CHAPTER}{\normalsize}
\titleformat{\chapter}[display]
       {\normalfont\normalsize\bfseries\centering}{\chaptertitlename\ \thechapter}{0pt}{\normalsize\uppercase}
  \titlespacing*{\chapter}{0pt}{1in}{0pt} % 1st page of each new section
  %starts 2in from top of page - Don't ask me why it's 0.5in


% % SECTION
% Change the font size for heading and section
\titleformat{\section}{\normalsize\bfseries\centering\singlespacing}{\thesection}{12pt}{\normalsize}
\titlespacing*{\section}{0pt}{0pt}{0pt}

% % SUBSECTION
\titleformat{\subsection}
{\normalfont\normalsize\bfseries\centering\singlespacing}{\thesubsection}{12pt}{}
\titlespacing*{\subsection}{0pt}{0pt}{0pt}

% % SUBSUBSECTION
\titleformat{\subsubsection}
{\normalfont\normalsize\bfseries\singlespacing}{\thesubsubsection}{12pt}{}
\titlespacing*{\subsubsection}{0pt}{0pt}{0pt}


\doublespacing  
\setlength{\parindent}{0.5in}

\begin{document}
\begin{flushleft}           % Remove the justification and make it left-aligned)
\pagenumbering{gobble}

答案1

删除\usepackage{parskip},这是问题的根源。事实上,它的主要作用就是用段落之间的额外垂直空间来替换段落缩进。

答案2

我通过添加解决了这个问题

\setlength{\parskip}{0pt}

在输入章节之前。

相关内容