Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want my sections, subsections and subsubsections in revtex to be marked by arabic numbers and 1.1., 1.1.1. etc. Instead I'm having roman numbers and letters. Can somebody help me?

share|improve this question
1  
The revtex4-1 class is meant for submissions to some physics journals, and the format is the one required by those journals. –  egreg Dec 15 '12 at 17:17
add comment

4 Answers 4

\documentclass{article}

\def\thesection{\Roman{section}}
\def\thesubsection{\Roman{section}.\Roman{subsection}}
\def\thesubsubsection{\Roman{section}.\Roman{subsection}.\Roman{subsubsection}}

\begin{document}
\tableofcontents
\section{aaa}
\subsection{bbb}
\subsubsection{ccc}
\end{document}
share|improve this answer
    
Thanks.I have manage to get wanted numbering style (actually I've replaced Roman with arabic),but still having one problem.My subsection (only in first section) starts counting from 0 instead from 1. –  Boki Dec 15 '12 at 18:39
    
My mistake.I wrote subsubsection instead of subsection.All good.Thx –  Boki Dec 15 '12 at 21:20
add comment

With the important premise that this change should not be made for papers that are meant for submissions to journals requiring revtex, here's how you can do:

\documentclass{revtex4-1}

% Usual (decimal) numbering
\renewcommand{\thesection}{\arabic{section}}
\renewcommand{\thesubsection}{\thesection.\arabic{subsection}}
\renewcommand{\thesubsubsection}{\thesubsection.\arabic{subsubsection}}

% Fix references
\makeatletter
\renewcommand{\p@subsection}{}
\renewcommand{\p@subsubsection}{}
\makeatother

\begin{document}

\section{SECTION}\label{section}

\subsection{SUBSECTION}\label{sub}

\subsubsection{SUBSUBSECTION}\label{subsub}

Section: \ref{section}

Subsection: \ref{sub}

Subsubsection: \ref{subsub}

\end{document}

It's very important to change also \p@subsection and \p@subsubsection or the references would be completely wrong.

enter image description here

share|improve this answer
add comment

(Sub(sub))section numbering is done by LaTeX by keeping a separate counter for each one. (Conveniently named section, subsection, and subsubsection). The formatting of the header numbering is controlled by the \thesection, \thesubsection and \thesubsubsection macros. So if you want arabic numbers, you can just use the \arabic command to number them.

See this page for some more counter-related macros.

\documentclass{article}

\renewcommand{\thesection}{\arabic{section}}
\renewcommand{\thesection}{\arabic{section}.\arabic{subsection}}
\renewcommand{\thesection}{\arabic{section}.\arabic{subsection}.\arabic{subsubsection}
\begin{document}
...
share|improve this answer
add comment

In relation to the previous posts, Shouldn't you take advantage of recursion here?

Instead of: (Which, for the record, I think is just plainly wrong)

\renewcommand{\thesection}{\arabic{section}}
\renewcommand{\thesection}{\arabic{section}.\arabic{subsection}}
\renewcommand{\thesection}{\arabic{section}.\arabic{subsection}.\arabic{subsubsection}}

I would write it as:

\renewcommand{\thesection}{\arabic{section}}
\renewcommand{\thesubsection}{\thesection.\arabic{subsection}}
\renewcommand{\thesubsubsection}{\thesubsection.\arabic{subsubsection}}

In principal, you can see that each macro should call the parent macro. Else you run the risk of having an inconsistent document. Changing from Arabic to Roman at the section level, here requires only one code modification as opposed to three in the previous posts....

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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