![表格/图形标题编号自动基于章节/节,而不是实际表格/图形的数量](https://linux22.com/image/449368/%E8%A1%A8%E6%A0%BC%2F%E5%9B%BE%E5%BD%A2%E6%A0%87%E9%A2%98%E7%BC%96%E5%8F%B7%E8%87%AA%E5%8A%A8%E5%9F%BA%E4%BA%8E%E7%AB%A0%E8%8A%82%2F%E8%8A%82%EF%BC%8C%E8%80%8C%E4%B8%8D%E6%98%AF%E5%AE%9E%E9%99%85%E8%A1%A8%E6%A0%BC%2F%E5%9B%BE%E5%BD%A2%E7%9A%84%E6%95%B0%E9%87%8F.png)
我在硕士论文中使用了以下 Overleaf 模板:https://www.overleaf.com/latex/templates/hvl-master-thesis-software-engineering-template/qjtzwnzvhrys
但是,插入图表后,我发现它们的编号是根据它们所在的部分而定的。而不是根据表格/图表的数量。下面的屏幕截图显示了表格(这是我的论文中的第一个表格,因此应该是表 1:xxxx)。
%--------------------------------------
% Master's Thesis Title Page
% LaTeX Template
% Version 1.0 (23/05/14)
% Thanks to Magnus Marthinsen, this thesis and template is made available for Master studentes at HVL Joint SE program (01.03.2021)
%---------------------------------------
%----------------------------------------------------------------------------------------
% PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------
\documentclass[a4paper]{report}
\usepackage{graphicx} % Required for box manipulation
\usepackage{helvet}
\usepackage{subfig}
\usepackage[utf8]{inputenc}
%\usepackage{natbib}
\usepackage[USenglish]{babel}
\usepackage[useregional]{datetime2}
\usepackage{pgfgantt}
\usepackage{listings}
\usepackage{wrapfig}
\usepackage{setspace}
\usepackage{parskip} % Used to create spaces between paragraphs
\usepackage{dirtytalk} % quotes by talk
\usepackage[hidelinks]{hyperref}
\usepackage[acronym, toc]{glossaries} % Used to add a wordlist/glossaries
\usepackage{mathtools}
\usepackage{amsfonts}
\usepackage{color, colortbl}
\usepackage{booktabs}
\usepackage{float}
\usepackage{csquotes}
%zelf toegevoegd
\usepackage[most]{tcolorbox}
\usepackage{multirow} %table
\usepackage{xcolor,colortbl}
\usepackage{pdflscape}
\usepackage{pifont} %%%bullet points
\usepackage{longtable}
%BIB by Adrian
%\usepackage[backend=biber,style=numeric, urldate=long]{biblatex}
\usepackage{multibib}
% See the references.bib file. Most Bibtex bibliographies in Computer Science can be found from dblp.org
%\addbibresource{references.bib}
% Glossary/wordlist
\makeglossaries
\input{glossaries.tex}
\begin{document}
%
% COLORS USED THROUGH THE REPORT
%
\definecolor{kb_red}{RGB}{96,2,4}
\definecolor{light_gray}{RGB}{160,160,160}
\definecolor{med_gray}{RGB}{96,94,94}
\definecolor{black}{RGB}{0,0,0}
\definecolor{white}{RGB}{155,155,155}
\definecolor{light_green}{RGB}{208,240,192}
\definecolor{light_red}{RGB}{255,204,203}
% CODE STYLE
\definecolor{javared}{rgb}{0.6,0,0} % for strings
\definecolor{javagreen}{rgb}{0.25,0.5,0.35} % comments
\definecolor{javapurple}{rgb}{0.5,0,0.35} % keywords
\definecolor{javadocblue}{rgb}{0.25,0.35,0.75} % javadoc
\makeatletter
\lst@Key{matchrangestart}{f}{\lstKV@SetIf{#1}\lst@ifmatchrangestart}
\def\lst@SkipToFirst{%
\lst@ifmatchrangestart\c@lstnumber=\numexpr-1+\lst@firstline\fi
\ifnum \lst@lineno<\lst@firstline
\def\lst@next{\lst@BeginDropInput\lst@Pmode
\lst@Let{13}\lst@MSkipToFirst
\lst@Let{10}\lst@MSkipToFirst}%
\expandafter\lst@next
\else
\expandafter\lst@BOLGobble
\fi}
\makeatother
\lstset{language=Java,
basicstyle=\footnotesize,
keywordstyle=\color{javapurple}\bfseries,
stringstyle=\color{javared},
commentstyle=\color{javagreen},
morecomment=[s][\color{javadocblue}]{/**}{*/},
numbers=left,
captionpos=b,
frame=single,
breakatwhitespace=false,
breaklines=true,
numberstyle=\tiny\color{black},
stepnumber=1,
numbersep=10pt,
tabsize=2,
showspaces=false,
showstringspaces=false,
matchrangestart=t}
%Title page
\input{title_page.tex}
\titlePage
\pagebreak
%author page
\input{author_page.tex}
\authorPage
\pagebreak
\section*{Abstract}
\textbf{[Title]}, \textbf{[Introduction]}, \textbf{[Objectives]}, \textbf{[Methods]}, \textbf{[Results]}, \textbf{[Conclusion]}
\\ \\
\textbf{Keywords:}
%\acrlong{MDSE} is a ...
\section*{Acknowledgements}
First and foremost, I would like to thank ...
\pagebreak
\tableofcontents
\listoffigures
\listoftables
\printglossary[nonumberlist]
\printglossary[type=\acronymtype, nonumberlist]
\input{Chapters/1.Introduction.tex}
\input{Chapters/2.Literature.tex}
\input{Chapters/3.ResearchMethod.tex}
\appendix
%\input{appendix/1.Systematic Literature}
%\input{appendix/2.Interview}
\bibliographystyle{splncs04}
\bibliography{references}
\addcontentsline{toc}{chapter}{Bibliography} %%%%ADD BIB TO TABLE OF CONTENTS
%\bibliographystyle{splncs04}
%\bibliography{references}
%\printbibliography
\end{document}