2

I am using \documentclass[11pt,a4paper,twoside]{article} for my document. I want to remove the small space just before the "Abstract." title. How to remove that small space? I want to strat the "Abstract." title just like "Keywords" without any white spaces at begining.

Here is the screenshot: enter image description here

I am using the following in my preamble:

\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{.}

In the main.tex I am using:

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

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

2 Answers 2

2

You can use \abstitleskip setting it to -\parindent.

You also want to apply \small to the title.

\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}

A small skip between the abstract and the keywords seems necessary.

enter image description here

1

What do think about this solution?

\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} 
2
  • Thanks for your answer. This solution could be the last resort for me. This solution doesn't keep the fontsize and fontfamily in the abstract. These are set by \abstractnamefont. Is there any solution using \usepackage{abstract}?
    – sigma
    Nov 8, 2023 at 9:50
  • I changed parts of the code, should now fit better to your needs...
    – mario1000
    Nov 8, 2023 at 10:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .