11

I'm writing a report and I need to write an abstract for the chapter after the chapter title in the same page. How can I do this?

3 Answers 3

7

You can't just use the regular abstract environment provided by the report document class, since it puts it on a page of its own. However, a slight modification to that environment (or creating a similar one without the conditional page breaking) - provided below as chapabstract - works without problem:

New chapter abstract

\documentclass{report}
\usepackage{changepage}% http://ctan.org/pkg/changepage
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\makeatletter
\newenvironment{chapabstract}{%
    \begin{center}%
      \bfseries Chapter Abstract
    \end{center}}%
   {\par}
\makeatother
\begin{document}
\chapter{First chapter}
\begin{chapabstract}
\lipsum[1]
\end{chapabstract}
\section{A section}

%=====

\chapter{Second chapter}
\begin{adjustwidth}{1cm}{1cm}
\lipsum[1]
\end{adjustwidth}
\section{A section}
\end{document}

changepage also provides the adjustwidth environment (where you specify the left/right indent), which allows for setting of contents in a narrower context. These two could be combined, if needed.

2
  • thanks, I'm surprised that worked perfectly, I was using the abstract environment at the first place, and I thought whatever you put after the \chapter (in a report class) will be in the next page, just like the abstract environment used to do ...
    – elaich
    Jun 9, 2012 at 12:46
  • This solution worked perfectly for me, thanks, however, a note for those using \include for each chapter, make sure your \chapter is inside your included file since include will add a page break.
    – jsaven
    Jun 4, 2017 at 5:52
4

I would rather use a list to define such environments to get the margins adjusted in one step and to be able to adjust indentation and paragraph separation.

\documentclass{book}
\usepackage{lipsum}
\makeatletter
\newenvironment{summary}
               {\begin{center}\textbf{Abstract}\end{center}
                 \list{}{\listparindent 1em%
                        %\setlength{\leftmargin}{<value>} adjust if you need
                        \itemindent\listparindent
                        \rightmargin\leftmargin
                        \parsep\z@ \@plus\p@}%
                \item\relax}
               {\endlist}
\begin{document}
\chapter{Introduction}
\begin{summary}
\lipsum[3]
\end{summary}
\lipsum
\end{document}

I have allowed for a heading (but it looks ugly, so if you do not need it remove the \begin{center}...\end{center}. The left and right margin is the same as those found in the quotation environment to keep the style constant. If you need to change it use:

\setlength{\leftmargin}{<value>}

within the definition.

1
  • thanks for that brillant suggestion, it works as well ..
    – elaich
    Jun 9, 2012 at 12:50
2

I don't have enough reputation to comment, or I would just put this as a comment, but I found all I had to do was include the notitlepage option in the documentclass line. The following produces the exact same output as Werner's answer.

 \documentclass[notitlepage]{report}
 \usepackage{lipsum}
 \begin{document}
 \chapter{First chapter}
 \begin{abstract}
 \lipsum[1]
 \end{abstract}
 \section{A section}

 %=====

 \chapter{Second chapter}
 \begin{abstract}
 \lipsum[1]
 \end{abstract}
 \section{A section}
 \lipsum
 \end{document}

Also remember that using \include{somefile} will put a page break before the contents of the file. I had this error because my abstracts were in separate files. Moving things around or using \input{somefile} instead fixed it for me.

0

You must log in to answer this question.

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