如何更正图形编号?

如何更正图形编号?

我正在写一篇文章,但对图表的引用与标题中的图表编号不匹配。(图表上写的是 1,但引用的文字中写的是 1.1 而不是 1)。

如何纠正?谢谢。

在此处输入图片描述

平均能量损失

\documentclass[12pt,italian]{article}
\usepackage[sc]{mathpazo}
\usepackage{helvet}
\usepackage{courier}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[letterpaper]{geometry}
\geometry{verbose,tmargin=1.5cm,bmargin=1.5cm,lmargin=1.5cm,rmargin=1.5cm}
\setcounter{tocdepth}{2}
\usepackage{color}
\usepackage{babel}


\usepackage{float}
\usepackage{graphicx}
\usepackage[unicode=true,
 bookmarks=true,bookmarksnumbered=true,bookmarksopen=true,bookmarksopenlevel=2,
 breaklinks=true,pdfborder={0 0 1},backref=false,colorlinks=true]
 {hyperref}
\hypersetup{pdftitle={Title},
 pdfauthor={Autor},
 pdfsubject={theme},
 pdfkeywords={},
 linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false}

\makeatletter
\pagenumbering{roman}
\let\myTOC\tableofcontents
\renewcommand\tableofcontents{%
  \pdfbookmark[1]{\contentsname}{}
  \myTOC
  \cleardoublepage
  \pagenumbering{arabic} }

\makeatother

\begin{document}
\listoffigures

\title{\textsf{\large{}Title}}
\author{\textsf{}\thanks{\textsf{\large{}\protect\href{}{}}}}

\maketitle
\textsf{\large{}\tableofcontents{}}{\large\par}

\section{\textsf{\large{}1st section title}}

\subsection{\textsf{subsection}}

texttexttexttexttexttexttexttexttexttext
texttexttexttexttexttexttexttexttexttext
texttexttexttexttexttexttexttex \ref{f1}
\begin{center}
\begin{figure}[H]
\includegraphics{pasted1}
\caption{caption}
\end{figure}
\label{f1}
\end{center}
\end{document}

答案1

引用图表或表格时,应\label 命令\caption,但在tablefigure环境内。

相关内容