\hyperref 未定义控制序列

\hyperref 未定义控制序列

当我使用 引用所需部分时,出现Undefined control sequence错误\hyperref。我想让部分编号在单击时引用该部分,同时我希望部分编号通过 \ref 自动显示。像这样:

\documentclass{article}
\usepackage{harvard}

\usepackage{xcolor}
\usepackage{graphicx}

\usepackage{url}
\usepackage{hyperref}
\usepackage{xspace}

\renewcommand{\harvardurl}{URL:\url}
\graphicspath{./301/Alaa Ali Yousef/}

\title {Example \LaTeX \quad     article for course 4ME301}
\author{Alaa Ali Yousef  \\ 9105195789 \\[email protected]\\   Linnaeus University, Växjö }


\begin{document}
    \maketitle

\begin{abstract}
    This assignment aims to make you familiar with the basic features
    of \LaTeX which should come useful when preparing your own reports,
    and eventually your master thesis. You should try to replicate “as
    close as possible” this PDF document using \LaTeX. This does not
    exclude making some changes as long as they are relevant. Submission
    instructions can be found in Section \ref{secondSection}.
    \end{abstract}

\section{Introduction section}
\label{firstsection}
There is a handy book about \LaTeX {\color{green}\cite{lamport1994latex}} available at the LNU library, but if
you search online you should find many examples and guides, like e.g. {\color{green}\cite{WEBSITE:2}}
on {\color{green}\cite{WEBSITE:3}}, or extensive information on {\color{green}\cite{WEBSITE:1}}.


\section{How to submit} 

\label{secondSection}
\
When you compose and compile the final version of this document, you should upload a .zip file on the course moodle that contains:

\begin{enumerate}
    \item the compiled .pdf file;  
    \item   the source files (.tex, .bib, and the image file).
\end{enumerate}
The filename template for these files, besides the image file, should be:

\begin{itemize}
    \item 4ME301-LaTeX-[yoursurname].xxx 
\end{itemize}
\end{document}

如何使用 \ref 和 \hyperref 或 \hyperlink 使部分编号可点击,以及使用 \hyperref 或 \hyperlink 哪个更适合?

我使用了它们两个并得到了同样的错误

相关内容