TransWikia.com

Book class not numbering equations correctly and appendix reference does not work

TeX - LaTeX Asked on April 20, 2021

I have a reference in my document to both the Appendix chapter and a reference to an equation in the Appendix. The reference in the text does not produce a number and the equation in the appendix does not have an initial chapter number.

Also, the equation numbering in the main body is starting at zero.

MWE:

documentclass{book}

usepackage{appendix} % for appendices
usepackage{amsmath}
numberwithin{equation}{chapter}

title{Title}
author{Author}
date{today}

begin{document}
frontmatter
maketitle
tableofcontents
input{mwe1}
appendix
input{mwe2}
end{document}

mwe1.tex

chapter{One}

Equation~ref{app:eq1} in Appendix~ref{app:app1} shows that x = 1.

Here is another equation:

begin{equation}label{One:eq1}
  x + y = 3.
end{equation}

Equation~ref{One:eq1} shows that x = 2.

mwe2.tex

chapter{Maths}label{app:app1}

The equation is

begin{equation}label{app:eq1}
  x + y = 2
end{equation}

The chapter numbers are not included in the Table of Contents.

The output of chapter One is:
ChapterOneOutput

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP