# How do I set up appendices?

I used the following command for setting up an appendix section:

\setcounter{section}{0}
\renewcommand{\theequation}{\Alph{section}.\arabic{equation}}
\renewcommand{\thesection}{\Alph{section}}


(I don't want to use \appendix)

Equations work fine, they have A.1, A.2, etc. Yet, whenever I refer to an appendix in the text using ~\ref{appendix:name_of_appendix}, I get a consecutive number from the sections (a numeral) instead of a reorder appendix section name (A, B, C, etc.). Any ideas what's wrong? (I re-ran pdflatex several times.)

I use it as follows:

We see in Appendix~\ref{appendix:a} that ...

[...]

\setcounter{section}{0}
\renewcommand{\theequation}{\Alph{section}.\arabic{equation}}
\renewcommand{\thesection}{\Alph{section}}

\section*{Appendix A: xxx}
\label{appendix:a}

-
Is \section* a typo? –  Willie Wong Oct 11 '10 at 22:58
It would be easier to answer your question if we knew what is wrong with \appendix for your needs. –  Lev Bishop Oct 11 '10 at 23:23
The \appendix command is redefined using a style package that I use. The redefinition exactly defines a macro that does what I described above. I want to use this package, and I would rather not change it. –  klew Oct 11 '10 at 23:52
\section* is not a typo, it means that the it won't print the section number in the beginning of the section heading. –  klew Oct 11 '10 at 23:53

Use \section instead of \section*. \section* introduces an unnumbered section so the \label continues to reference the previous section. If you want to reformat the way the appendix heading is formatted then change the format using one of the many methods for doing so.

-
Personally I think Lev's answer is the right way to do things. But in case you have really some attachment to \section*, what you can do is to insert \refstepcounter manually between the \section* command and the \label command, as in
\section*{Appendix A: xxx}