\ref{} 命令似乎会为每一章重新启动计数器。这会使跨章节引用变得不明确。假设我有以下内容:
Section 1
Section 2
Chapter 2
Section 1
Section 2
Section 3
如果我在第 2 章第 2 节中引用第 1 章第 1 节,它将简单地显示为1
而不是1.1
,正如我希望的那样。
如何才能使章节号在引用时显示为第一个数字?
希望我说清楚了。干杯!
编辑:我添加了所有我认为可能相关的代码片段:
\documentclass[a4paper,12pt,twoside]{book}
\usepackage{graphicx}
\usepackage{dcolumn}
\usepackage{colordvi}
\usepackage{color}
\definecolor{bleudefrance}{rgb}{0.19, 0.55, 0.91}
\definecolor{royalblue}{rgb}{0.25, 0.41, 0.88}
\usepackage{acronym}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{url}
\usepackage{placeins}
\usepackage{subfig}
\usepackage{sidecap}
\usepackage{numprint}
\usepackage{makecell}
\usepackage{hyperref}
\hypersetup{
colorlinks,
breaklinks,
urlcolor=royalblue,
linkcolor=royalblue,
citecolor=royalblue
}
\usepackage{tabularx}
\usepackage{gensymb}
\usepackage{lineno}
\linenumbers
\renewcommand{\arraystretch}{1.1}
\renewcommand{\thesection}{\arabic{section}}
\renewcommand{\thesubsection}{\thesection.\arabic{subsection}}
\renewcommand{\thesubsubsection}{\thesubsection.\arabic{subsubsection}}
\makeatletter
\renewcommand{\p@subsection}{}
\renewcommand{\p@subsubsection}{}
\makeatother
\usepackage{mathrsfs}
\usepackage{multirow}
\usepackage{booktabs}
\begin{document}
\maketitle
{\renewcommand{\thefootnote}{\fnsymbol{footnote}}}
\setcounter{footnote}{0}
\newpage
\FloatBarrier
\setcounter{tocdepth}{10}
\setcounter{secnumdepth}{10}