5

I need a lower heading level than subsubsection and hence I am turning towards \paragraph. I am happy with not having it numbered but I do want it to stand on a line of it's own and be italic. I have tried the following:

\documentclass{memoir}
\usepackage{lipsum}
\begin{document}

\setparaheadstyle{\itshape}
\let\origparagraph\paragraph
\renewcommand*{\paragraph}{%
\origparagraph{#1} \\ 
}

\paragraph{Lorem ipsum}
\lipsum[1-2]

\end{document}

which sadly gives me:

! Illegal parameter number in definition of \paragraph.
<to be read again> 
                   1
l.9 }

So clearly I can't renew the \paragraph command quite in that way. How should I do it?

8
\setparaheadstyle{\normalsize\itshape}
\setafterparaskip{1ex}

Choose the value that suits you; if you want no vertical space use 1sp instead of 0pt as a positive value (even the smallest one) forces a line break.

You probably already know that to number paragraphs you have to say

\setsecnumdepth{paragraph}

which corresponds to the traditional LaTeX

\setcounter{secnumdepth}{4}

If you don't want an indented paragraph just after the title, say also

\setbeforeparaskip{-\beforeparaskip}

which suppresses the indentation, keeping the same vertical spacing before the title.

  • 4
    or the memoir way: \setsecnumdepth{paragraph} – daleif Nov 11 '11 at 11:48
  • And if I don't want to have an indentation directly after the headline? – jonalv Nov 11 '11 at 12:30
2

For what is worth, you must indicate that you're expecting a value, so you have to write \renewcommand*\paragraph[1]{re-definition} this [1] means that you're expecting a value, which you call with #1.

See the wikibook on LaTeX for more details.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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