19

In the article class, it seems that using the abstract environment has an effect to the rest of the document. More precisely, it seems that it redefines the \linewidth, which equals \textwidth without abstract, is smaller with the abstract. My feeling is that \linewidth is redefined for the abstract environment, but the value is not reseted at the end of the abstract.

Here is a minimal example:

\documentclass{article}
\begin{document}
\abstract{This is an abstract. This is an abstract.}\bigskip

This is text. This is text. This is text. This is text. This is text. This is text.\\ 
\rule{\textwidth}{3em}
\rule{\linewidth}{3em}
\end{document}

The output is not the same if you comment the \abstract line or not.

Do you have the same problem as I do when you compile (if not, I will upload some PDF files to show)? Is this a (known) bug in LaTeX2e? How can we circumvent the problem?

Note: I compile with the pdflatex command, and I use pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian).

1
  • What if I want to intentionally keep the linewidth the same for the rest of the document, but use correct syntax, i.e. \begin{abstract} This is an abstract. This is an abstract. \end{abstract}? Is there a way of knowing the linewidth used in the abstract? -> See here!
    – Jonas
    Commented Mar 16, 2013 at 12:20

1 Answer 1

17

abstract is an environment and should be used as such. And \linewidth is smaller than \textwidth within abstract because abstract (without article's titlepage class option) is based on the quotation environment which adds left-hand and right-hand indentation.

\documentclass{article}

\begin{document}

\begin{abstract}
This is an abstract. This is an abstract.
\end{abstract}

\bigskip

This is text. This is text. This is text. This is text. This is text. This is text.\\ 
\rule{\textwidth}{3em}
\rule{\linewidth}{3em}

\end{document}
3
  • Usually I use the environment, I do not know why this time I did not! Thanks for your answer.
    – Bruno
    Commented Aug 16, 2011 at 11:30
  • 3
    @Bruno: There is only the environment, but all environments are implemented using internal macros with the same name and an end macro which starts with 'end', i.e. \abstract and \endabstract. Therefore your original code still compiled without warning or error, but lead to a wrong result. Commented Aug 16, 2011 at 11:58
  • 2
    The worst part is that theoretically, I know all of what you remind me... I should have think about it a bit longer. Yet, if my question and lockstep's answer can help some other people, it was not a waste of time!
    – Bruno
    Commented Aug 16, 2011 at 16:16

You must log in to answer this question.

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