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.

Werner
  • 603,163
Lennie
  • 3
  • Welcome to TeX.SE. Regarding your comment that "I read that I have to use hyperref": out of idle curiosity, where did you pick up this incorrect piece of information? – Mico Sep 13 '18 at 17:11
  • Thanks! I googled and the first 3 articles talk about hyperref. https://tex.stackexchange.com/questions/70143/cross-reference-with-custom-text https://stackoverflow.com/questions/1491842/references-with-text-in-latex https://leesjohn.wordpress.com/2013/03/14/using-custom-text-when-using-ref-in-latex/

    I also tried to use \autoref, without success.

    – Lennie Sep 13 '18 at 17:32

1 Answers1

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.

Peter Wilson
  • 28,066