# Enumerate environments in abstract [closed]

Consider usage of the standard enumerate environment inside the standard (article) abstract environment:

\begin{abstract}
We discuss several exciting topics:
\begin{enumerate}
\item Topic 1, explained at such length that the text produces a line break,
\item Topic 2.
\end{enumerate}
\end{abstract}


My complaint is that the enumerate environment doesn't respect the margin reductions of the abstract environment. (In particular, the index numbers appear to the left of the left margin, and the text is wrapped to right of the right margin.)

Presumably, I could wrap the enumerate environment in a minipage to control the margins by brute force. What is the right way to do it?

To elaborate on the question, you can see an example below:

You may notice that this was not produced from the article class. The class does, however, borrow the abstract code (with some--I thought--insignificant changes) from the conventional article class.

-

## closed as too localized by Joseph Wright♦Mar 31 '12 at 5:58

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

@Alexander Russell: Don't do this. Instead, say "We discuss several exciting topics. Firstly, we consider topic 1: we have shown by ... that ... and discuss the possibility that ... Secondly, we determined that ... in topic 2." –  Bruno Le Floch Dec 22 '11 at 17:46
although it's maybe not the best style, some document classes do honor the margins set for the abstract when an enumerate is present. amsart is one such. perhaps you could crib some code from that. (i haven't explored to see how difficult it might be.) i think the problem was addressed there because sometimes numbered displays are embedded in the abstract, and the margins have to be honored for those. –  barbara beeton Dec 22 '11 at 18:05
Thanks to both of you for your responses. While I agree that this sort of usage may not be ideal, stylistically, in an abstract, the issue came up while writing a class file for a journal so I'd naturally like the abstract environment to be as robust as possible. Thanks for the pointer to the amsart class! –  acr Dec 24 '11 at 4:13
@AlexanderRussell Sorry, I implicitly assumed in my comment that you were choosing to write the abstract in that way. I hope you didn't take it personally. –  Bruno Le Floch Dec 24 '11 at 4:38
I think the problem does not lie with the abstract environment (or code), but rather with your enumerate code. Without the actual class code, it would be hard to assess how to fix your current situation. –  Werner Dec 24 '11 at 4:41

"My complaint is that the enumerate environment doesn't respect the margin reductions of the abstract environment. (In particular, the index numbers appear to the left of the left margin, and the text is wrapped to right of the right margin.)"

In the article class, list environments like enumerate do respect the margin reductions of the abstract environment -- have a look at my example. (You may have mistakened the indentation of the abstract's first line with a general indentation of the environment's left margin.)

\documentclass{article}

\usepackage{lipsum}

\begin{document}

\begin{abstract}
\lipsum[1]
\begin{enumerate}
\item Topic 1, explained at such length that the text \emph{really}
produces a line break,
\item Topic 2.
\end{enumerate}
\end{abstract}

\section{foo}

\lipsum[2]

\end{document}


-
Dear @lockstep, This is embarrassing. As you point out, the abstract environment in the current version of the article class does produce robust enough margins for the enumerate to respect. This means that I have some problem in my own custom class that I shouldn't be blaming on article.cls! Thanks! –  acr Dec 24 '11 at 4:30

If you really must use a list environment in your abstract, I suggest using the enumitem package to manage the horizontal spacing or margins. Note that the output from your code snippet produces results as expected, since the "first paragraph" (starting with "We discuss...") is actually indented by a length \parindent. Either way, here is a take on a possibility that you might be after:

\documentclass{article}
\usepackage{showframe}% http://ctan.org/pkg/showframe
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\usepackage{enumitem}% http://ctan.org/pkg/enumitem
\begin{document}
\begin{abstract}
\lipsum[1]
We discuss several exciting topics:
\begin{enumerate}[label={Topic~\arabic*:},leftmargin=*]
\item \lipsum[2]
\item \lipsum[3]
\end{enumerate}
And here we have the end of the abstract.
\end{abstract}
\end{document}
​


Some more things to note:

• Since \lipsum typesets paragraphs, it issues \par at the end of every paragraph. This makes the following paragraph indent by \parindent, as you can see from the MWE.
• Since there is no gap between the end of the enumerate environment and the start of the last sentence/paragraph, no \parindent is visible. If you want a paragraph indent, issue \par at the end of enumerate, or use \indent.
• I've made the list enumerate itself as Topic~\arabic*: by using the functionality of enumitem's label setting.
• Also, making the left margin flush with the text block (in abstract), I've used leftmargin=*. Other alignment options are also available.

showframe was used to highlight the text block margins, while lipsum provided some dummy text.

In an attempt to replicate your abstract without any package dependencies, consider the following:

\documentclass{article}
\begin{document}
\begin{abstract}
This paper studies the one-way communication complexity of the \textit{subgroup
membership problem\/}, a classical problem closely related to basic questions in quantum
computing. Here Alice receives, as input, a subgroup~$H$ of a finite group~$G$; Bob receives
an element $y\in G$. Alice is permitted to send a single message to Bob, after which he must
decide if his input~$y$ is an element of~$H$. We establish the following bounds on the classical
communication complexity of this problem in the bounded-error setting: \par \medskip

\makebox[1.5em][l]{1.}The problem can be solved with $\mathcal{O}(\log|G|)$-bit communication with the promise that~$H$ is normal. \par \medskip

\makebox[1.5em][l]{2.}The problem can be solved with $\mathcal{O}(d_{\max}-\log|G|)$-bit communication, where~$d_{\max}$ is the maximum
degree of an irreducible complex representation of~$G$. \par \medskip

\makebox[1.5em][l]{3.}For any prime~$p$ not dividing~$|G|$, the problem can be solved with $\mathcal{O}(\log|G|+d_{\max}\cdot\log p)$-bit
communication, where~$d_{\max}$ is the maximum degree of an irreducible $\mathbf{F}_p$-representation of~$G$.
\end{abstract}
\end{document}


This way you typeset an enumeration by physically adjusting the left margin (\leftskip) and accompanying paragraph indent (\parindent) to simulate enumerate. I've hardcoded the numbering, but that can be made into a counter as well. However, this would only be necessary if they may be re-ordered often, or if you want to reference them by means of \label and \ref commands. Also, I've placed a \medskip between the items to make it look like an enumeration. However, a single \par would also suffice.

-
Thank you for your very complete response. I can see from your example that the enumitem package is rich enough to solve the problem. In my particular case (which I did not explain above), this is for a class file for a journal. I would like to keep package dependencies to a minimum, so if I can actually rewrite the abstract code to make it more robust, I would be more satisfied with that solution. –  acr Dec 24 '11 at 4:17
@AlexanderRussell: I've added a hard-coded version of you abstract that simulates the enumerate environment. It is independent of any packages, and should therefore fit nicely with your current document class. –  Werner Dec 24 '11 at 5:06