29 lines
600 B
TeX
29 lines
600 B
TeX
\newcounter{alphasect}
|
|
\def\alphainsection{0}
|
|
|
|
\let\oldsubsection=\subsection
|
|
\def\subsection{%
|
|
\ifnum\alphainsection=1%
|
|
\addtocounter{alphasect}{1}
|
|
\fi%
|
|
\oldsubsection}%
|
|
|
|
\renewcommand\thesubsection{%
|
|
\ifnum\alphainsection=1%
|
|
\Alph{alphasect}
|
|
\else%
|
|
\arabic{section}
|
|
\fi%
|
|
}%
|
|
|
|
\newenvironment{alphasection}{%
|
|
\ifnum\alphainsection=1%
|
|
\errhelp={Let other blocks end at the beginning of the next block.}
|
|
\errmessage{Nested Alpha section not allowed}
|
|
\fi%
|
|
\setcounter{alphasect}{0}
|
|
\def\alphainsection{1}
|
|
}{%
|
|
\setcounter{alphasect}{0}
|
|
\def\alphainsection{0}
|
|
}% |