Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm writing up my thesis right now, using memoir, and I have a problem with abstracts. Each chapter - besides the intro and conclusion - is an article published in a journal, and has its own abstract (which is in addition to the abstract at the beginning of the thesis). I like the way the abstract environment \begin{abstract}... typesets the abstracts for each chapter, but they show up as unnumbered chapters in the table of contents. If I use \abstractnum to force numbering it just numbers the abstracts as chapters; what I'd really like is for them to be numbered as sections:

2 Great chapter title
2.1 Abstract ....
2.2 Introduction ....
[...]

I've been up one side of Google and down the other to no avail, and I can't find anything in the memoir manual. Is there a simple way to do this in memoir, or do I have make the abstracts \section{}s and live with it?

Update:

I've been playing more and I can get the behaviour I want in individual chapters if I muck with the section numbering and add to the toc manually:

\begin{abstract}
\addtocounter{section}{1}
\addcontentsline{toc}{section}{\numberline{\thesection}Abstract}
...

But now I've got the opposite problem: I put the thesis abstract in the table of contents using \abstractintoc before the thesis abstract, but now the chapter abstracts show up twice, once as an unnumbered chapter and once as the properly numbered section:

2 Great chapter title
Abstract
2.1 Abstract..
2.2 Introduction...

Maybe it's easier to solve the problem when it's this way instead?

share|improve this question
    
calling \abstractnum after the thesis abstract should be fine. –  Stefan Kottwitz Mar 24 '11 at 21:26
    
Welcome to tex.sx! It appears that your 2nd update is actually an answer to your question and not part of the question. So it would be great if you could post that update as an actual answer to your own question. (Yes, it's quite OK to post answers to own questions.) Then you can remove that answer from your question. Thanks! –  Hendrik Vogt Mar 25 '11 at 6:00
add comment

2 Answers

up vote 5 down vote accepted

Besides calling \abstractnum, you can redefine \num@bs:

\makeatletter
\renewcommand*{\num@bs}{\section{\abstractname}}
\makeatother

It's originally defined in memoir.cls:

\newcommand{\num@bs}{\chapter{\abstractname}}

Instead of simply redefining this internal macro, you could create your own abstract environment using \renewenvironment{abstract}{...} and calling \section within.

As said in the comment, here's a minimal example:

\documentclass{memoir}
\abstractnum
\makeatletter
\renewcommand*{\num@bs}{\section{\abstractname}}
\makeatother
\listfiles
\begin{document}
\tableofcontents
\chapter{One}
\begin{abstract}
   Here is the abstract.
\end{abstract}
Text follows.
\end{document}

abstract as section

share|improve this answer
    
Hmm, thanks for the answer Stefan! Unfortunately, redefining \num@bs isn't doing anything; my abstracts show up just the same way (and I rudely updated the question while you were answering it :-). –  Winawer Mar 24 '11 at 21:01
    
@Winawer: you could show a minimal example which demonstrates that it doesn't work. I will add an example showing that it does work for me. We could compare to find the reason. –  Stefan Kottwitz Mar 24 '11 at 21:04
    
Okay, I put one in. Thanks for the help! –  Winawer Mar 24 '11 at 21:19
    
All right, that does it in the original (full) file too. Good enough for me! Thanks again. –  Winawer Mar 24 '11 at 21:26
add comment

Hendrik asked me to move this to a separate answer, so here it is...

Update: Following Stefan's awesome answer:

The minimal example you provided didn't quite work, Stefan, because I still need the thesis abstract and I need it unnumbered. But here's a minimal example that does work for me:

\documentclass{memoir}
\makeatletter
\renewcommand*{\num@bs}{\section{\abstractname}}
\makeatother

\listfiles
\begin{document}
\tableofcontents
\clearpage
\abstractintoc
\begin{abstract}
Here's the thesis abstract.  Should be unnumbered.
\end{abstract}

\abstractnum
\chapter{One}
\begin{abstract}
    Here is the chapter abstract.  Should be (and is) numbered.  
\end{abstract}
\section{Introduction}
Text follows.
\end{document}

Seems to work for me, so I'm going to go with that. :-)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.