[texhax] Adding section levels and repeated text.
Philip Taylor (Webmaster, Ret'd)
P.Taylor at Rhul.Ac.Uk
Mon Mar 28 00:07:09 CEST 2011
jfbu wrote:
> the following seems to work:
As does this (at least, for the first five levels),
for reasons that are totally unclear to me ...
Philip Taylor
--------
\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 %
{paragraph}{4}{0mm}%
{-\baselineskip}%
{0.5\baselineskip}%
{\normalsize\sffamily\bfseries}}%
\renewcommand{\thesubsubsubsection}{\thesubsubsection.\arabic{subsubsubsection}}
\newcounter{subsubsubsubsection}
\newcommand\hv{\@startsection %
{subparagraph}{5}{0mm}%
{-\baselineskip}%
{0.5\baselineskip}%
{\normalsize\sffamily\bfseries}}%
\renewcommand{\thesubsubsubsubsection}{\thesubsubsubsection.\arabic{subsubsubsubsection}}
%\newcounter{subsubsubsubsubsection}
%\newcommand\hvi{\@startsection %
% {subsubparagraph}{6}{0mm}%
% {-\baselineskip}%
% {0.5\baselineskip}%
% {\normalsize\sffamily\bfseries}}%
%\renewcommand{\thesubsubsubsubsubsection}{\thesubsubsubsection.\arabic{subsubsubsubsubsection}}
\makeatother
\hi{Level One}
Level one 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}
More information about the texhax
mailing list