# \renewcommand not working for subsection

I wanted to number sections with alphabets and subsections with roman numbers

I have added these two lines above \begin{document}:

\renewcommand \thesection {\Alph{section}}
\renewcommand \thesubsection {\thesection.\Roman{subsection}}


It changes the section numbering to A, B, C, ... from the default I, II, III, ..., but the subsection numbering is still the default A, B, C, ...

I have also tried this and it did not work either.

\renewcommand \thesubsection {\Roman{subsection}}


I have also tried to change the numbering of paragraphs, but there was no change from the default.

• Since your section header is centered I suppose that you have more commands. Please, show the minimal code to reproduce the problem. Here those two commands worked well. – Sigur Jul 29 '14 at 1:45
• @Sigur no; there are no additional commands; the document class used is IEEtran which produces those headings by default. – Gonzalo Medina Jul 29 '14 at 2:50

Since you are using the IEEEtran document class with no special options, you need to redefine the family of commands with a dis suffix, since in that case the class has

\else% not compsoc
\def\thesectiondis{\thesection.}                   % I.
\def\thesubsectiondis{\Alph{subsection}.}          % B.
\def\thesubsubsectiondis{\arabic{subsubsection})}  % 3)
\def\theparagraphdis{\alph{paragraph})}            % d)
\fi


So for subsections, subsubsections and paragraphs you need a redefinition of \thesubsectiondis, \thesubsubsectiondis and \theparagraphdis, respectively.

\documentclass{IEEEtran}

\renewcommand\thesection{\Alph{section}}
\renewcommand\thesubsectiondis{\thesection.\Roman{subsection}}
\renewcommand\thesubsubsectiondis{\thesubsectiondis.\alph{subsubsection}}
\renewcommand\theparagraphdis{\arabic{paragraph}.}

\begin{document}

\section{Test section}
\subsection{Test subsection}
\subsubsection{Test subsubsection}
\paragraph{Test paragraph}

\end{document}


You should provide a MWE to figure out what your problem is. Any way, you can use the following two commands in the preamble as the following example:

\documentclass{article}
\renewcommand{\thesection}{\Alph{section}}
\renewcommand{\thesubsection}{\thesection.\Roman{subsection}}
\begin{document}
\section{My first section}
Text of the first section  goes here.
\subsection{My first subsection}
Text of the  first subsection goes here
\subsection{My second subsection}
Text of the  second subsection goes here
\section{My second section}
Text of the second section  goes here
\subsection{My first subsection}
Text of the  first subsection goes here
\subsection{And finally my second subsection}
Finally, text of the second subsection goes here
\end{document}


This should work with you.

The output of the above code is as desired:

• No, this won't work since the document class used by the OP is IEEEtran with no options which uses a different set of commands for the representations of the counters. – Gonzalo Medina Jul 29 '14 at 2:24