6

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, ...

enter image description here

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.

Can anyone please help me with this?

  • 1
    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
4

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.

A complete example (adjust the redefinitions to suit your needs):

\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}

enter image description here

1

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:

enter image description here

  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.