# How do I get the \paragraph's enumerated, but not the \section's

I need the \paragraph{xxx} command outputs "§ 1 xxx" but the \section{Abc} outputs just "Abc", no numbering. Any help? Thanks.

-
Should the sectional units associated to \subsection and \subsubsection be numbered or not? –  Gonzalo Medina Dec 17 '11 at 3:43
Both titlesec package and memoir class might be helpful, see their (excellent) documentation. –  mbork Dec 17 '11 at 3:45
the \section and \subsection must not be numbered, neither in the body not in the ToC. I'm using the memoir package indeed, but I can't figure how to manage that. If I set \maxsecnumdepth{paragraph}, then, how can I prevent the \section, \subsection and \subsubsection heading from show their numbers (in both the body and the ToC)? –  marlonob Dec 18 '11 at 19:36

Normally \paragraph is defined using \@startsection which uses the counter secnumdepth to decide whether to number the unit. For example, in article.cls you can find

    \renewcommand\thesubparagraph {\theparagraph.\@arabic\c@subparagraph}


and

    \newcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
{3.25ex \@plus1ex \@minus.2ex}%
{-1em}%
{\normalfont\normalsize\bfseries}}


The first command numbers paragraphs as Section.Para, the second sets the formatting of the paragraphs.

You can patch these commands, for example

\documentclass{article}
\setcounter{secnumdepth}{0}         % Now sections are not numbered
\renewcommand\theparagraph{\arabic{paragraph}} % delete the section num from \theparagraph
\makeatletter
\renewcommand\paragraph{%
\refstepcounter{paragraph}%   Manually stepping paragraph counter without consulting secnumdepth
\@startsection{paragraph}{4}{\z@}%
{3.25ex \@plus1ex \@minus.2ex}%
{-1em}%
{\normalfont\normalsize\bfseries\S~\theparagraph\space}} % Formatting the paragraph
\makeatother

\begin{document}
\section{First section}
\paragraph{First paragraph} Second
\end{document}

-
Thanks! It seems that this will do the trick. But, will this show the paragraph number in the table of contents? It is not necesary, but would be very practical. Again, the section and subsection numbers must not be shown in the ToC. –  marlonob Dec 18 '11 at 18:22
Try, for example, \renewcommand*\l@paragraph{\@dottedtocline{0}{7.0em}{4.1em}}. The first zero here tells TOC to put the paragraph sections into TOC on the 0 level –  Boris Dec 18 '11 at 21:41
Thanks @Boris! I finally get what I wanted: The \section and \subsection must appear in the ToC without number but the \paragraph must be numerated, so I use \setcounter{secnumdepth}{0}. I got this with a little addition to the code you suggested, so now it looks like this. –  marlonob Dec 19 '11 at 2:51
Well, I can't include the proper format in the previous comment (this is my first time :) but I expect to be understandable. I know it doesn't seem a clean solution, so if anyone can figure out something better it would be great. Thanks guys, you're awsome. –  marlonob Dec 19 '11 at 3:03