For a particular document, I'm trying to define up to six section levels, using the \@startsection command. However, any new levels (beyond subsubsection) add the section title to the body text inside the section, in addition to including it in the header. In other words, the section title is repeated, in body text, inside the section. Can anyone explain this, or how to prevent it? Thank you!<div>
<br></div><div>-pd<br><div><br></div><div>Here's a simple sample:</div><div><br></div><div><div>\documentclass[11pt]{article}</div><div><br></div><div>\title{Adding Section Levels}</div><div><br></div><div>\begin{document}</div>
<div><br></div><div>\setcounter{secnumdepth}{6}</div><div><br></div><div>\makeatletter</div><div><br></div><div>\newcommand\hi{\@startsection %</div><div> {section}{1}{0mm}%</div><div> {-\baselineskip}%</div><div> {0.5\baselineskip}%</div>
<div> {\normalsize\sffamily\bfseries}}%</div><div><br></div><div>\newcommand\hii{\@startsection %</div><div> {subsection}{2}{0mm}%</div><div> {-\baselineskip}%</div><div> {0.5\baselineskip}%</div><div> {\normalsize\sffamily\bfseries}}%</div>
<div><br></div><div>\newcommand\hiii{\@startsection %</div><div> {subsubsection}{3}{0mm}%</div><div> {-\baselineskip}%</div><div> {0.5\baselineskip}%</div><div> {\normalsize\sffamily\bfseries}}%</div><div><br></div><div>
\newcounter{subsubsubsection}</div><div>\newcommand\hiv{\@startsection %</div><div> {subsubsubsection}{4}{0mm}%</div><div> {-\baselineskip}%</div><div> {0.5\baselineskip}%</div><div> {\normalsize\sffamily\bfseries}}%</div>
<div>\renewcommand{\thesubsubsubsection}{\thesubsubsection.\arabic{subsubsubsection}}</div><div><br></div><div>\newcounter{subsubsubsubsection}</div><div>\newcommand\hv{\@startsection %</div><div> {subsubsubsubsection}{5}{0mm}%</div>
<div> {-\baselineskip}%</div><div> {0.5\baselineskip}%</div><div> {\normalsize\sffamily\bfseries}}%</div><div>\renewcommand{\thesubsubsubsubsection}{\thesubsubsubsection.\arabic{subsubsubsubsection}}</div><div><br></div>
<div>\newcounter{subsubsubsubsubsection}</div><div>\newcommand\hvi{\@startsection %</div><div> {subsubsubsubsubsection}{6}{0mm}%</div><div> {-\baselineskip}%</div><div> {0.5\baselineskip}%</div><div> {\normalsize\sffamily\bfseries}}%</div>
<div>\renewcommand{\thesubsubsubsubsubsection}{\thesubsubsubsection.\arabic{subsubsubsubsubsection}}</div><div><br></div><div>\makeatother</div><div><br></div><div>\hi{Level One}</div><div><br></div><div>Level oen paragraph.</div>
<div><br></div><div>\hii{Level Two}</div><div><br></div><div>Level two paragraph.</div><div><br></div><div>\hiii{Level Three}</div><div><br></div><div>Level three paragraph.</div><div><br></div><div>\hiv{Level Four}</div>
<div><br></div><div>Level four paragraph.</div><div><br></div><div>\hv{Level Five}</div><div><br></div><div>Level five paragraph.</div><div><br></div><div>\hvi{Level Six}</div><div><br></div><div>Level six paragraph.</div>
<div><br></div><div><br></div><div>\end{document}</div><div><br></div><br>-- <br><span style="font-family:arial, sans-serif;border-collapse:collapse">----<div>The Tech Curmudgeon</div><div><a href="http://www.techcurmudgeon.com/" style="color:rgb(17, 65, 112)" target="_blank">http://www.techcurmudgeon.com</a></div>
<div style="font-size:10.8333px"><br></div></span><br>
</div></div>