在导言区最前面加上\numberwithin{algorithm}{subsection} 就可以了
或者加在第一章前面
首先注意宏包\usepackage{hyperref}必须在导言区最后一个位置
其次使用带星号的\begin{algorithm},可参考链接Incorrect reference when combining amsmath, hyperref, and \tag - TeX - LaTeX Stack Exchange
在导言区最前面加上\numberwithin{algorithm}{subsection} 就可以了
或者加在第一章前面
首先注意宏包\usepackage{hyperref}必须在导言区最后一个位置
其次使用带星号的\begin{algorithm},可参考链接Incorrect reference when combining amsmath, hyperref, and \tag - TeX - LaTeX Stack Exchange