# Roman number not showing with \pageref [closed]

I tried to use the \pageref to show page number when referencing to a figure/table, it works fine where I have arabic number but for the tables that appear in my appendix the numbers are not showing. I haven't used the package appendix and \appendix but \pagenumbering{Roman} before the appendix starts.

\documentclass[12pt,a4paper,twoside,french]{article}
\usepackage{mathptmx}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{tabularx}
\usepackage{prettyref}

\begin{document}
\pagenumbering{gobble}
\maketitle

\pagenumbering{arabic}
\section{Section}
See figure \ref{tab:table} on page \pageref{tab:table}

\pagenumbering{Roman}
\section*{Appendix}

\begin{table}
\caption{caption}
\begin{tabularx}{10cm}{XXl}
.... table
\end{tabularx}
\label{tab:table}
\end{table}

\end{document}

-

## closed as too localized by Qrrbrbirlbel, Mico, Heiko Oberdiek, Kurt, T. VerronApr 12 '13 at 16:27

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Please provide a minimum working example(MWE) that generates the problem you're looking to solve. I'm afreid that your current description of the problem isn't quite enough to diagnose what's going on. – Mico Apr 12 '13 at 15:19
I don't know what I should copy/paste here because I have a huge preamble and I do not know which one is related to the page numbering except the \pagenumbering I wrote. – esmitex Apr 12 '13 at 15:30
@esmitex You should be able to remove things while keeping the problem and end up with a file of a few lines you can post. If removing something fixes the problem then that is the culprit. See meta.tex.stackexchange.com/questions/228/… – David Carlisle Apr 12 '13 at 15:37
I believe it might have simply been some compiling bug that led to this error because I copied pasted the full code again in my doculent and the pageref is working with roman numbers now. – esmitex Apr 12 '13 at 16:06
the style of page number for the first page is set when \maketitle is activated. the style of page numbers won't change until there's a new page. so with the insertion of more material before the appendix (and the command \pagenumbering{Roman}), this will "fix itself". this can be demonstrated by inserting \clearpage before the \pagenumbering command. – barbara beeton Apr 12 '13 at 16:36