如何删除摘要标题开头的空格?

如何删除摘要标题开头的空格?

我正在为我的文档使用它\documentclass[11pt,a4paper,twoside]{article}。我想删除“摘要”标题前面的小空格。如何删除那个小空格?我想让“摘要”标题像“关键词”一样开头,开头没有任何空格。

这里是截屏在此处输入图片描述

我在我的前言

\usepackage[runin]{abstract} % Allows abstract customization
\renewcommand{\abstractnamefont}{\normalfont\bfseries} % Set the "Abstract" text to bold
\renewcommand{\abstracttextfont}{\normalfont\small} % Set the abstract itself to small italic text
\abslabeldelim{.}

main.tex我正在使用:

\begin{abstract}
    \input{sections/abstract}

    \noindent\textbf{Keywords.} \pdfKeywords\par
\end{abstract}
\vspace{0.5cm}

答案1

您可以将\abstitleskip其设置为-\parindent

您也想申请\small该称号。

\documentclass{article}
\usepackage[runin]{abstract} % Allows abstract customization

\usepackage{lipsum}% mock text

\renewcommand{\abstractnamefont}{\normalfont\small\bfseries} % Set the "Abstract" text to bold
\renewcommand{\abstracttextfont}{\normalfont\small} % Set the abstract itself to small italic text
\abslabeldelim{.}
\setlength{\abstitleskip}{-\parindent}

\begin{document}

\title{Title}
\author{Sigma}
\date{}
\maketitle

\begin{abstract}
\lipsum[1][1-3]

\smallskip

\noindent\textbf{Keywords.} Pizza, without, pineapple.
\end{abstract}

\end{document}

摘要和关键词之间的小跳跃似乎是必要的。

在此处输入图片描述

答案2

您认为这个解决方案怎么样?

\documentclass[11pt,a4paper,twoside]{article}

\usepackage{changepage}

\usepackage{lipsum}

\usepackage{fontspec}

\renewcommand{\sfdefault}{phv}
\begin{document}


\begin{adjustwidth}{1cm}{1cm} %By setting the dimensions you can choose how small or wide the abstract text should appear

\fontsize{12}{9}\selectfont \textbf{Abstract.} \lipsum[1] %or any other text
%\fontsize: first number changes the size of the font and the second number changes the leading. Set it to the desired numbers.

\noindent \textbf{Keywords.} First keyword, second keyword, third keyword,...
\end{adjustwidth}

\section{Introduction}
\fontsize{15}{18}\selectfont \fontfamily{ccr}\selectfont %change the font code as detailed here: https://tex.stackexchange.com/questions/426279/fontfamily-selectfont-does-not-work-with-xelatex-engine, for the rest see above
\lipsum[2-3]

\end{document} 

相关内容