我正在写一篇文章,但对图表的引用与标题中的图表编号不匹配。(图表上写的是 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
,但在table
或figure
环境内。