0

I just want to have a reference of an item from my appendix like this [see appendix D] or [see appendix F] and the D and F should be not manually be written, instead it should get that from the \ref command.

Now so far I got this:

\documentclass[12pt]{article}
\usepackage[toc,page]{appendix}
\usepackage[hidelinks]{hyperref}

\begin{document}
Some important text \ref{appendix:One}
\begin{appendices}
\section{Appendix Name}
\label{appendix:One}
\begin{figure}[H]
   \centering
   \includegraphics[scale=0.7]{FirgureName}
   \caption{Test}
\end{figure}
\end{appendices}
\end{document}

which produces text like this:

Some important text [A]

That is pretty close to what I want, now I thought I could add onw text into the \ref command, but I read that I have to use hyperref, so I tried it with this:

Some important text \hyperref[appendix:One]{see Appendix}

which lead to:

Some important text see Appendix

No brackets, no A, nothing. Now this is way worse than before. I just want to add "see Appendix" into the normal [A] referencing.

0

Don't use the hyperref package.

Create a new macro for your appendix referencing:

\newcommand*{\appref}[1]{[see appendix \ref{#1}]}

and use \appref instead of \ref when you want to refer to an appendix.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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