36

I want to refer appendix in my paper.

Here is my sample latex code:

\section{hello1}
\label{h1}
bala.......

\section{hello2}
\label{h2}
bala.....

\appendix
\label{appendix}
\section{}
bala....

Here is what the appendix displays:

enter image description here

I use \ref to link sections and \eqref to refer equations, and \autoref to refer figs and tables. How do I refer appendix to display 'A' in papers?

Thanks so much.

5
  • 3
    Use \appendix\section{foo}\label{sec.foo} and then call its label \ref{sec.foo}.
    – Sigur
    Jul 23, 2014 at 2:23
  • \label should be placed after the "counter-stepping mechanism" (the sectional unit in your case). See Understanding how references and labels work.
    – Werner
    Jul 23, 2014 at 2:43
  • 1
    Thanks. I think I have to leave the \section{} empty. But this time \ref{sec.foo} displays 'Appendix A'. But I only want it to display 'A'. How could I do it?
    – Zizhao
    Jul 23, 2014 at 13:12
  • I suppose you are using specialized package for references?
    – user31729
    Jul 23, 2014 at 23:13
  • Yes. I use hyperref package, but I only use it to ref table and fig by \autoref.
    – Zizhao
    Jul 24, 2014 at 4:05

2 Answers 2

37
\usepackage[toc,page]{appendix}

Then in the body of the text.

This is a reference to the graph appendix \ref{appendix:graph}

\begin{appendices}

\section{Graph Appendix}
\label{appendix:graph}
This is the graph appendix...

\section{Another Appendix}

\end{appendices}

Result in body of text:

reference to appendix latex

Appendix:

appendix for graph

1
  • 4
    There is no necessity to load appendix.
    – Werner
    Oct 1, 2015 at 5:26
22

You don't necessarily need to import any packages. You can have appendices defined like the following:

\appendix

\section{Appendix: Rule Tables for Chapter 2}
\label{appendix:a}

And refer to them using:

\ref{appendix:a}
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .