0

Having taken note of a way to have author's names and abstracts assigned to each chapter in a memoir class document (see add authors and abstract below memoir chapter title), I've run into a bit of a snag.

I wanted to add a bit of space in the TOC, which works fine. However, if I try to have a multi-paragraph abstract, the indentation works fine in the TOC, but not in the actual chapter; somehow, the instruction to indent seems to get swallowed up.

How can I fix this? MWE and relevant output follow:

\documentclass{memoir}

\newcommand\authorabstract[1]{% \chapterprecishere{\mbox{}\[\baselineskip]#1}% \chapterprecistoc{\[.5\baselineskip]#1\[.5\baselineskip]}% }

\begin{document} \frontmatter \tableofcontents

\mainmatter \chapter{First chapter} % this goes into the document and the ToC \authorabstract{Author\newline\newline First paragraph.\newline\indent Second paragraph.}

Chapter text here. \end{document}

Correct indentation in TOC:

enter image description here

Missing indentation in the chapter:

enter image description here

1 Answers1

2

memoir uses the environment quote (no inner indentation) to put together \prechapterprecis.

You might add a \parindent to \authorabstract to indent the second paragraph.

a

\documentclass{memoir}

\newlength{\docparindent} \setlength{\docparindent}{\parindent} % save document indent

\newcommand\authorabstract[1]{% \chapterprecishere{\mbox{}\[\baselineskip]\parindent\the\docparindent#1}% changed <<<<<<<< \chapterprecistoc{\[.5\baselineskip]#1\[.5\baselineskip]}% }

\begin{document} \frontmatter \tableofcontents

\mainmatter
\chapter{First chapter}
% this goes into the document and the ToC
\authorabstract{Author\newline\newline First paragraph.\newline\indent Second paragraph.}

Chapter text here.

\end{document}

Simon Dispa
  • 39,141
  • Thanks, that seems to work well! I guess I can understand, given the original intent of \chapterprecis why it would have been set up that way. I'm struggling a bit to understand the fix, though. Do I take it that due to the quote environment, indents (i.e., \parindent length) are set to 0 length and that we are effectively resetting them to the global value with \parindent\the\docparindent, similarly to passing a parameter, then? – K.G. Feuerherm Jun 03 '22 at 17:10
  • 1
    @K.G. Feuerherm Thank you for feedback!. Only \authorabstrac is modified by adding a non zero indent to #1. quote remains unchanged. – Simon Dispa Jun 03 '22 at 20:30