I'm trying to add an appendix to my document but when I do, the appendices are labelled with numbers instead of letters, and I get the following errors:
LaTeX Error: No counter 'chapter' defined.
LaTeX Error: Command \@chapapp undefined.
LaTeX Error: Command \thechapter undefined.
I am using the following code:
\documentclass[12pt]{article}
\usepackage[english]{babel}
\usepackage[letterpaper,top=2cm,bottom=2cm,left=3cm,right=3cm,marginparwidth=1.75cm]{geometry}
% Useful packages
\usepackage[utf8]{inputenc}
\usepackage{float}
\usepackage{eurosym}
\usepackage{array}
\usepackage{textcomp}
\usepackage[round, numbers]{natbib}
\usepackage{graphicx} % graphics package
\graphicspath{ {figures/} }% specify the path where figures are located
\usepackage{epstopdf} % converts eps files to pdf
\usepackage{fancyhdr} % fancy headers and footers
\usepackage{url} % nicely format url breaks
\usepackage{relsize} % font sizing hierarchy
\usepackage{booktabs} % professional looking tables
\usepackage[config, labelfont={bf}]{caption,subfig}
\usepackage{mathrsfs} % additional math scripts
\usepackage[Bjarne]{fncychap} % creates fancier chapter titles
\usepackage{setspace}
\usepackage{amsmath}
\usepackage{xcolor}
\usepackage{soul}
\usepackage{dirtytalk}
\usepackage{multicol}
\usepackage{tabto}
\usepackage[toc]{appendix}
\numberwithin{equation}{section}
\usepackage{mathrsfs}
\usepackage{chngcntr}
\counterwithin{table}{section}
\counterwithin{figure}{section}
\usepackage[justification=centering]{caption}
\setlength{\parskip}{0.5em}
\usepackage{rotating, graphicx}
\usepackage{enumitem}
\setlist[description]{style=nextline}
\setlength{\belowcaptionskip}{-15pt}
\renewcommand{\arraystretch}{1.5}
\usepackage{biblatex} %Imports biblatex package
\addbibresource{bibliography.bib} %Import the bibliography file
% \renewcommand{\baselinestretch}{1.5}
% \onehalfspacing % line spacing
\spacing{3}
\geometry{
a4paper,
left = 1.0in,
right = 1.0in,
top = 1.0in,
bottom = 1.375in
}
\begin{document}
\section{Section 1}
blah blah blah
\appendix
\section{Appendix}
blah blah blah
\end{document}
Sorry I know this isn't really "minimum example" but i suspect there is some conflict with one of the packages that is causing this to occur. I'm new to LaTex and inherited this preamble from a lecturer.
Thank you!!
