Write an abstract in LaTeX (abstract environment)

Put the text into the abstract environment, directly after \maketitle. The classes article and report print it with the heading "Abstract"; book has no such environment.

The abstract below the title

In article the abstract is set in a smaller font with wider margins and a centred heading. In report it gets a page of its own.

\title{Measuring Wind Speed with Ultrasound}
\author{Anna Schmidt}
\maketitle

\begin{abstract}
This report compares two ultrasonic sensors for measuring wind speed.
Both were tested in a wind tunnel at speeds from 1 to 20 metres per second.
\end{abstract}

\section{Introduction}
Text of the first section.
Result
The compiled example

Open in the editor

Keywords below the abstract

The standard classes have no command for keywords. Write them as the last paragraph of the abstract.

\begin{abstract}
This report compares two ultrasonic sensors for measuring wind speed.

\medskip
\noindent\textbf{Keywords:} ultrasound, wind speed, sensor comparison
\end{abstract}
Result
The compiled example

Open in the editor

Change the heading

The heading is stored in \abstractname. Without babel, change it with \renewcommand{\abstractname}{Summary}. With babel and ngerman it reads "Zusammenfassung"; \setlocalecaption replaces it.

This goes into the preamble.

\usepackage[ngerman]{babel}
\setlocalecaption{ngerman}{abstract}{Kurzfassung}

Open in the editor

An abstract in two languages

Load both languages with babel; the last one is the main language. Wrap the second abstract in otherlanguage, which switches the heading and the hyphenation.

Complete document:

\documentclass{article}
\usepackage[english, ngerman]{babel}
\begin{document}
\begin{abstract}
Dieser Bericht vergleicht zwei Ultraschallsensoren zur Messung der Windgeschwindigkeit.
\end{abstract}

\begin{otherlanguage}{english}
\begin{abstract}
This report compares two ultrasonic sensors for measuring wind speed.
\end{abstract}
\end{otherlanguage}
\end{document}
Result
The compiled example

Open in the editor

Full width in a two-column document

With twocolumn the abstract sits in the left column. To set title and abstract across both columns, put them into the optional argument of \twocolumn and use onecolabstract from the abstract package.

Complete document:

\documentclass[twocolumn]{article}
\usepackage{abstract}
\title{Measuring Wind Speed with Ultrasound}
\author{Anna Schmidt}
\begin{document}
\twocolumn[
\maketitle
\begin{onecolabstract}
This report compares two ultrasonic sensors for measuring wind speed.
\end{onecolabstract}
\vspace{1em}
]
\section{Introduction}
The text starts in the left column.
\end{document}
Result
The compiled example

Open in the editor

Pitfalls

Compiled with pdfLaTeX from TeX Live 2023.

Related pages