# Specify arabic numerals in \ref{}

I've two documents, doc1 references lists in doc2 through package xr. In doc2 the lists are numbered with arabic numbers, but when referenced in doc1 using \ref{tag} they show up as roman numbers. How can I change this? I'd like to use arabic numbers always.

Minimal example:

\documentclass[a4paper,12pt,onecolumn,final]{ProjectStyle}
\renewcommand{\labelenumi}{\arabic{enumi}.}
\renewcommand{\labelenumii}{\labelenumi\arabic{enumii} }

\begin{document}
\renewcommand{\theenumi}{\arabic{enumi}.}
\renewcommand{\p@enumii}{\theenumi.\theenumii}

\setcounter{page}{1}
\pagenumbering{arabic}
\pagestyle{plain}

\begin{enumerate}
\item \textbf{Convites para conferencias, coloquio e SOC}
\begin{enumerate}
\item {\label{inv_leiden} Comprovante para \emph{Fine Tunning Stellar Population Models} (Leiden, 2006)}
\item {\label{inv_iau} Comprovante para \emph{XII Latin American Regional IAU Meeting} (Isla Margarita, 2007)}
\end{enumerate}
\end{enumerate}
Ref: \ref{inv_leiden}

\end{document}


And this is what I get:

enumii0..

1. Convites para conferencias, coloquio e SOC

1.1 Comprovante para Fine Tunning Stellar Population Models (Lei- den, 2006)

1.2 Comprovante para XII Latin American Regional IAU Meeting (Isla Margarita, 2007)

Ref: 1a

-
Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – egreg Mar 4 '13 at 12:55

The external reference to a document using xr should be the same as you get from a reference within the document (it just reads the value from the aux file.

\ref does not use \labelenumi at all that just affects the label used in the list display. For the first level list it uses \theenumi and for second level list it uses \p@enumii\theenumii.

You were missing a \makeatletter and and had the prefix including enumii twice, your MWE can not be run as it uses a local class but you see the same with book class.

\documentclass[a4paper,12pt,onecolumn,final]{book}
\makeatletter

\renewcommand{\labelenumi}{\arabic{enumi}.}
\renewcommand{\labelenumii}{\labelenumi\arabic{enumii} }

\renewcommand{\theenumi}{\arabic{enumi}}
\renewcommand{\theenumii}{\arabic{enumii}}
\renewcommand{\p@enumii}{\theenumi.}
\makeatother

\begin{document}

\setcounter{page}{1}
\pagenumbering{arabic}
\pagestyle{plain}

\begin{enumerate}
\item \textbf{Convites para conferencias, coloquio e SOC}
\begin{enumerate}
\item {\label{inv_leiden} Comprovante para \emph{Fine Tunning Stellar Population Models} (Leiden, 2006)}
\item {\label{inv_iau} Comprovante para \emph{XII Latin American Regional IAU Meeting} (Isla Margarita, 2007)}
\end{enumerate}
\end{enumerate}
Ref: \ref{inv_leiden}

\end{document}

-
I still didn't understand how to fix it. The default for numbering lists is roman. I had set to have it arabic. Nevertheless the info in .aux is still in roman, therefore both docs will reference it as roman (be it external or within), which I don't want. How do I redefine so that numbers in the aux file are given in arabic as well? – user26836 Mar 4 '13 at 18:39
as I say if you redefine \label... it has no effect on the aux file or on \ref you need to define \theenumii and \p@enumii If you make a minimal complete document using book class and showing the problem it would be much easier to show you how to fix it if the above is not enough. Questions should laways include a complete example document. – David Carlisle Mar 4 '13 at 19:07
I edited the question to contain an example. – user26836 Mar 4 '13 at 23:16
@user26836 code added – David Carlisle Mar 4 '13 at 23:28

The following worked well.

\documentclass[a4paper,12pt,onecolumn,final]{ProjectStyle}
\renewcommand{\labelenumi}{\arabic{enumi}.}
\renewcommand{\labelenumii}{\labelenumi\arabic{enumii} }

\begin{document}

\renewcommand{\theenumi}{\arabic{enumi}.}
\renewcommand{\theenumii}{\arabic{enumii}}

\setcounter{page}{1}
\pagenumbering{arabic}
\pagestyle{plain}
\begin{enumerate}
\item \textbf{Convites para conferencias, coloquio e SOC}
\begin{enumerate}
\item {\label{inv_leiden} Comprovante para \emph{Fine Tunning Stellar Population Models} (Leiden, 2006)}
\item {\label{inv_iau} Comprovante para \emph{XII Latin American Regional IAU Meeting} (Isla Margarita, 2007)}
\end{enumerate}
\end{enumerate}
Ref: \ref{inv_leiden}

\end{document}

-