附录用数字代替字母标记,并显示错误

附录用数字代替字母标记,并显示错误

我正在尝试向我的文档添加附录,但是当我这样做时,附录以数字而不是字母标记,并且出现以下错误:

LaTeX Error: No counter 'chapter' defined.
LaTeX Error: Command \@chapapp undefined.
LaTeX Error: Command \thechapter undefined.

我正在使用以下代码:

\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}

抱歉,我知道这实际上不是“最小示例”,但我怀疑其中一个软件包存在冲突,导致这种情况发生。我是 LaTex 新手,从讲师那里继承了这个序言。

谢谢你!!

在此处输入图片描述

答案1

你正在将article类与fncychap包一起使用。这毫无意义,因为该包是为定义章节的类创建的。这是不是该类的情况article

相关内容