Hyperref 警告

Hyperref 警告

Overleaf 告诉我:

Yperref 警告

为什么?非常感谢

第一次编辑:(阅读评论) 来自 Overleaf 的简短 tex 代码,刚刚由我编辑:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Welcome to Overleaf --- just edit your LaTeX on the left,
% and we'll compile it for you on the right. If you open the
% 'Share' menu, you can invite other users to edit at the same
% time. See www.overleaf.com/learn for more info. Enjoy!
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{book}
\usepackage{blindtext}
\usepackage{hyperref}

\title{Example of Hyperlinks}
\author{Overleaf}

\begin{document}

\frontmatter
\tableofcontents
\clearpage

\addcontentsline{toc}{chapter}{Foreword}
{\huge {\bf Foreword}}

\Blindtext
\clearpage

\addcontentsline{toc}{chapter}{Dummy entry\quad quad}
{\huge {\bf Dummy entry}}

\Blindtext
\mainmatter

\chapter{First Chapter, $a=b$}

This will be an empty chapter

\begin{equation}
\label{eq:1}
\sum_{i=0}^{\infty} a_i x^i
\end{equation}

The equation \ref{eq:1} shows a sum that is divergent. This formula will be used later on page \pageref{second}.

\Blindtext
\clearpage

\section{Second section} \label{second}

\blindtext
\Blinddocument
\end{document}

答案1

不幸的是,您的代码不会产生与您发布的类似错误,至少在我的环境中不会。这可能是因为您hyperref根本没有使用代码片段。

如果我仔细检查收到的每个警告并“解决”它,我最终会得到这个结果,并考虑到一些评论:

\documentclass{book}
\usepackage{blindtext}
\usepackage{hyperref}

\title{Example of Hyperlinks}
\author{Overleaf}

\begin{document}

\frontmatter
\tableofcontents
\clearpage

\addcontentsline{toc}{chapter}{Foreword}
{\huge {\bf Foreword}}

\Blindtext
\clearpage

\addcontentsline{toc}{chapter}{Dummy entry}% <<==
{\huge {\bf Dummy entry}}

\Blindtext
\mainmatter

\chapter{First Chapter, equality}% <<==

This will be an empty chapter

\begin{equation}
\label{eq:1}
\sum_{i=0}^{\infty} a_i x^i
\end{equation}

The equation \ref{eq:1} shows a sum that is divergent. This formula will be used later on page \pageref{second}.
\Blindtext
\clearpage

\section{Second section} \label{second}

\blindtext
\Blinddocument
\end{document}

截屏

截屏

为了定位警告的来源,我建议采用“归位”策略。即删除相关文本的一半,运行 + 检查,恢复,删除另一半,运行 + 检查。如果您做得正确,即符合您的情况,一半应该通过,而另一半将失败。重复。//将“一半”视为一个模糊概念。它实际上可以是 50%,或更多,或更少。因为您遵循 $2^n$ 方案,所以您应该很快找到麻烦制造者。

相关内容