文章类中的单倍行距标题

文章类中的单倍行距标题

我正在文章课上写一篇论文,标题很长。以下是 MWE:

\documentclass[12pt]{article}

\usepackage{fullpage}
\usepackage{setspace} 


\newcommand\e{\emph}
\newcommand\tb{\textbf}
\newcommand\un{\underline}
\newcommand\txt{\texttt}

\usepackage[left=1 in,top=1in,right=1 in,bottom=1in,includefoot]{geometry}

\usepackage{blindtext}

\usepackage[small]{titlesec}
\titleformat*{\section}{\normalsize\bfseries}
\titlespacing*{\section}{0pt}{1.1\baselineskip}{\baselineskip}
\titlespacing{\section}{0pt}{\parskip}{-\parskip}

\title{\vspace{-7ex}\tb{\large A very very very very very very very very very very very very very very very very very very long title}\vspace{-7ex}}
\author{}
\date{}



\begin{document}

    \maketitle 

    \blindtext

\end{document}

输出如下

在此处输入图片描述

我怎样才能缩小标题之间的间隙,以便标题与文档的其余部分一样单倍行距?

在发布这个问题之前,我曾查阅过不同的 Stack Exchange 主题,了解如何缩小章节标题之间的差距,但那里的解决方案对我都不起作用。

谢谢你!

答案1

您可以使用软件包获得所需的内容,该软件包提供了自定义命令和使用的titling工具:\maketitle\setstretch

\documentclass[12pt]{article}

\usepackage{fullpage}
\usepackage{setspace}

\newcommand\e{\emph}
\newcommand\tb{\textbf}
\newcommand\un{\underline}
\newcommand\txt{\texttt}

\usepackage[margin=1in,includefoot]{geometry}

\usepackage{blindtext}

\usepackage[small]{titlesec}
\titleformat*{\section}{\normalsize\bfseries}
\titlespacing*{\section}{0pt}{1.1\baselineskip}{\baselineskip}
\titlespacing{\section}{0pt}{\parskip}{-\parskip}

\usepackage{titling}

\setlength{\droptitle}{-9.5ex}
 \pretitle{\begin{center}\large\bfseries\setstretch{0.5}}
 \posttitle{\par\end{center}\leavevmode\vspace*{-5.4ex}}%\

\title{A very very very very very very very very very very very very very very very very very very long title\vspace{-7ex}}
\author{}
\date{}

\begin{document}

    \maketitle

    \blindtext

\end{document} 

在此处输入图片描述

相关内容