[texhax] Adding section levels and repeated text.

Philip Taylor (Webmaster, Ret'd) P.Taylor at Rhul.Ac.Uk
Sun Mar 27 23:39:01 CEST 2011


Is it not perhaps significant that in the three
offending cases the definition include something
along the lines of the following :

	\renewcommand{\thesubsubsubsection}{\thesubsubsection.\arabic{subsubsubsection}}

whereas the three non-offending cases do not ?

Philip Taylor
--------
Peter Davis wrote:
> 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!
>
> -pd
>
> Here's a simple sample:
>
> \documentclass[11pt]{article}
>
> \title{Adding Section Levels}
>
> \begin{document}
>
> \setcounter{secnumdepth}{6}
>
> \makeatletter
>
> \newcommand\hi{\@startsection %
>    {section}{1}{0mm}%
>    {-\baselineskip}%
>    {0.5\baselineskip}%
>    {\normalsize\sffamily\bfseries}}%
>
> \newcommand\hii{\@startsection %
>    {subsection}{2}{0mm}%
>    {-\baselineskip}%
>    {0.5\baselineskip}%
>    {\normalsize\sffamily\bfseries}}%
>
> \newcommand\hiii{\@startsection %
>    {subsubsection}{3}{0mm}%
>    {-\baselineskip}%
>    {0.5\baselineskip}%
>    {\normalsize\sffamily\bfseries}}%
>
> \newcounter{subsubsubsection}
> \newcommand\hiv{\@startsection %
>    {subsubsubsection}{4}{0mm}%
>    {-\baselineskip}%
>    {0.5\baselineskip}%
>    {\normalsize\sffamily\bfseries}}%
> \renewcommand{\thesubsubsubsection}{\thesubsubsection.\arabic{subsubsubsection}}
>
> \newcounter{subsubsubsubsection}
> \newcommand\hv{\@startsection %
>    {subsubsubsubsection}{5}{0mm}%
>    {-\baselineskip}%
>    {0.5\baselineskip}%
>    {\normalsize\sffamily\bfseries}}%
> \renewcommand{\thesubsubsubsubsection}{\thesubsubsubsection.\arabic{subsubsubsubsection}}
>
> \newcounter{subsubsubsubsubsection}
> \newcommand\hvi{\@startsection %
>    {subsubsubsubsubsection}{6}{0mm}%
>    {-\baselineskip}%
>    {0.5\baselineskip}%
>    {\normalsize\sffamily\bfseries}}%
> \renewcommand{\thesubsubsubsubsubsection}{\thesubsubsubsection.\arabic{subsubsubsubsubsection}}
>
> \makeatother
>
> \hi{Level One}
>
> Level oen paragraph.
>
> \hii{Level Two}
>
> Level two paragraph.
>
> \hiii{Level Three}
>
> Level three paragraph.
>
> \hiv{Level Four}
>
> Level four paragraph.
>
> \hv{Level Five}
>
> Level five paragraph.
>
> \hvi{Level Six}
>
> Level six paragraph.
>
>
> \end{document}
>
>
> --
> ----
> The Tech Curmudgeon
> http://www.techcurmudgeon.com <http://www.techcurmudgeon.com/>
>
>
>
>
> _______________________________________________
> TeX FAQ: http://www.tex.ac.uk/faq
> Mailing list archives: http://tug.org/pipermail/texhax/
> More links: http://tug.org/begin.html
>
> Automated subscription management: http://tug.org/mailman/listinfo/texhax
> Human mailing list managers: postmaster at tug.org

-- 
Not sent from my i-Pad, i-Phone, Blackberry, Blueberry, or any
such similar poseurs' toy, none of which would I be seen dead
with even if they came free with every packet of cornflakes.


More information about the texhax mailing list