1

This question already has an answer here:

\documentclass[12pt]{article}
\usepackage{amsmath}

\begin{document}

As shown in Appendix~\ref{app_eg},...

\appendix
\renewcommand{\thesection}{\Alph{section}}
\numberwithin{equation}{section}

\section{An example}
\label{app_eg}

\begin{equation}
1+1=2
\label{pert}
\end{equation}

\end{document}

I would like the name of the appendix to be Appendix A: An example. But the equation number and referencing in the main text should remain as it is now. Please suggest a fix.

marked as duplicate by Werner equations Jan 30 at 6:10

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1

Update \@seccntformat to prefix the usual \the<cntr> with Appendix:

enter image description here

\documentclass{article}

\usepackage{amsmath}

\begin{document}

As shown in Appendix~\ref{app_eg},...

\appendix
\makeatletter
\renewcommand{\@seccntformat}[1]{Appendix \csname the#1\endcsname\quad}
\makeatother
\renewcommand{\thesection}{\Alph{section}}
\numberwithin{equation}{section}

\section{An example}
\label{app_eg}

\begin{equation}
  1+1=2
\end{equation}

\end{document}

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