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 am producing a document using the revtex4-1 document class, in which the sections should appear as, for example I.A.1. To achieve this, I've simply added the following lines to the preamble:

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

and it worked perfectly. The problem is now the following, if I add a reference to a section in the text, it appears as I I.A I.A.1. I tried various combinations, and this problem arises only when I add the two above lines using the revtex4-1 document class (for example, it behaves correctly using the article document class). Here is a minimal working example to reproduce this problem:

\documentclass{revtex4-1}

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

\begin{document}

\section{Intro}
\subsection{Some point}
\subsubsection{Some other point}
\label{sec:some_other_point}

\section{Outro}
As seen in Sec.~\ref{sec:some_other_point}, this reference is incorrectly shown using revtex4-1.

\end{document}

This renders like this using Texmaker (texLive) under Ubuntu 10.04. enter image description here

share|improve this question
add comment

2 Answers

up vote 7 down vote accepted

The revtex4-1 class uses simple numbers in the headers, relying on the format for distinguishing among the section level: roman number and all caps bold face for sections, letter and boldface for subsections, arabic number and italics for subsubsections.

Thus it sets things up so that in references the missing bits are automatically supplied, via the associated macros \p@subsection and \p@subsubsection. Since you want to override the standard (which is a bit surprising, as the class is usually used for submissions to journals that have a predefined style), you have to say

\makeatletter
\def\p@subsection{}
\def\p@subsubsection{}
\makeatother

in your document preamble.

share|improve this answer
    
Nice and simple, that did the trick. Many thanks. –  raspoutine Sep 7 '12 at 16:36
add comment

Class reftex4-1 uses the feature that references can be prefixed using \p@<counter>. You need to reset them for your redefined counters:

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

\makeatletter
\renewcommand*{\p@subsection}{}
\renewcommand*{\p@subsubsection}{}
\makeatother
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.