2

I'm using an adapted version of the memoir class to typeset my thesis. I'm attempting to add an appendix, which I will reference in various chapters. Here is the basic code (to compile, need ukthesis class which can be found here math.as.uky.edu/sites/default/files/ukthesis.cls_.txt ):

\documentclass[final]{ukthesis}
%you must include these 2 packages.
\usepackage{hyperref}
\usepackage{memhfixc}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\mainmatter
\chapter{Introduction}
\section{General Introduction}

 In \textbf{Appendix \ref{app:A}}, alongside CAD diagrams.

%-----------------------------------------------
\backmatter
\newpage
\appendix
\chapter{Detector Frame Drawings}\label{app:A}
The following pages show drawings 
\end{document}

However, when I attempt to reference it, what I get back out is something like:

"See appendix 2.3.3" (or in the case of this MWE, I just get a blank reference value)

instead of the expected:

"See appendix A."

Thoughts on what could be causing this? Forgive me if this is answered elsewhere, but I couldn't locate someone with this same problem, and other suggestions (for various other problems) haven't worked.

Thanks, Zach

EDITED: to include an actual MWE.

11
  • (1) Welcome, (2) Full minimal compilable example please. If I just add \documentclass{memoir} to your example and compile a few times I get the expected appendix A, so there seems to be something you are not telling us.
    – daleif
    Jan 16, 2015 at 15:59
  • I'm using a version of the memoir class that is added to by my university for their template. They provide a file called ukthesis.cls, but it just adds the beginning pages and format, then loads the memoir class. I also seem to be getting the correct "A" from this example now (though I wasn't when I posted it 5 minutes ago). Will attempt to make a MCE that isn't working.
    – Zach
    Jan 16, 2015 at 16:16
  • It seems the problem is in the ukthesis file. I'm unsure what's causing it, but removing that as an input document class solves the problem. I will work this out separately, since debugging a document class type is not what I had originally asked. Thanks for your input, daleif.
    – Zach
    Jan 16, 2015 at 16:23
  • Is that class downloadable somewhere?
    – daleif
    Jan 16, 2015 at 16:41

2 Answers 2

2

\backmatter stops any chapter numbering, so put your appendix before that. In any case bibliographies and indexes normally come after appendices.

2
  • Ahh, that's it. The example thesis they gave has appendix at the very very end. Thank you. Thanks to everyone else for help as well.
    – Zach
    Jan 16, 2015 at 18:32
  • I feel a bit embarassed that i didn't spot the \backmatter, but I am glad to see that the memoir experts are supporting as well.
    – Johannes_B
    Jan 16, 2015 at 18:41
2

Trimming down the code to

\documentclass{memoir}
\begin{document}
\frontmatter
\chapter{BLAH}
See appendix \ref{app:A}.
\chapter{Concerning Hobbits}\label{app:A}
\end{document}

makes you realize: There was never a \mainmatter issued, so no chapter is numbered. The same behaviour will happen when issuing \backmatter.

\documentclass{memoir}
\begin{document}
\frontmatter
\mainmatter<-------------
\chapter{BLAH}
See appendix \ref{app:A}.
\chapter{Concerning Hobbits}\label{app:A}
\backmatter
\end{document}
6
  • Ahh, I'm sorry. I am very new (3 days) to LaTeX. My main document does have a \mainmatter. However, it still does not label correctly. I seem to be unable to get an MWE that isn't just the whole document with most of the text removed. The document is already quite large though.
    – Zach
    Jan 16, 2015 at 18:00
  • I have added the full backmatter from my document to the initial post, perhaps that will be somehow enlightening.
    – Zach
    Jan 16, 2015 at 18:03
  • Nicola Talbot wrote a few lines on how to prepare a minimal working example. You will be able to strip the document down within half an hour. Right now i can't even guess.
    – Johannes_B
    Jan 16, 2015 at 18:03
  • No, not enlightening. Sorry.
    – Johannes_B
    Jan 16, 2015 at 18:05
  • Okay a new MWE is up now. For me, this returns, instead of "Appendix A" it comes as "Appendix 1.1." Also, the appendix does not add a "Appendix A" title to it's title.
    – Zach
    Jan 16, 2015 at 18:29

You must log in to answer this question.

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