![hyperref 问题](https://linux22.com/image/345369/hyperref%20%E9%97%AE%E9%A2%98.png)
我正在写论文,使用了 MWE 中的所有软件包。我想使用hyperref
以便可以拥有书签。但不幸的是,我总是收到 未定义的控制序列错误\begin{document}
。如果我注释掉hyperref
软件包,它就可以正常工作。
\documentclass{article}
\usepackage{threeparttable}
\usepackage{longtable}
\usepackage{amsmath}
\usepackage{acro}
\usepackage[final]{graphicx}
\usepackage{float,epsf,caption}
\usepackage{subcaption}
%\expandafter\def\csname [email protected]\endcsname{}
\usepackage{svg}
\usepackage{csvsimple}
%\usepackage{hyperref}
\usepackage{psfrag}
\usepackage{matlab-prettifier}
\usepackage{svg}
\usepackage{diagbox}
\usepackage{wrapfig}
\usepackage{longtable}
\usepackage{url}
\usepackage{rotating}
\usepackage{notoccite}
\usepackage{tabu}
\usepackage[acronym]{glossaries}
\usepackage{epstopdf}
\usepackage{amsmath}
\usepackage{algorithm}
\usepackage{float}
\usepackage[noend]{algpseudocode}
\title{BibTeX Website citatations with the \textsf{biblatex}~package}
\usepackage{tikz}
\usepackage[latin1]{inputenc}
\usepackage[section]{placeins}
\usepackage[colorlinks=true,linkcolor=blue,urlcolor=black,bookmarksopen=true]{hyperref}
\usepackage{bookmark}
\begin{document}
\tableofcontents
\section {hello}
The Maori Party Formed
The Maori Party was launched on the 7th of July 2004. It was formed around a former Labour Party Cabinet Minister, Tariana Turia, and as its name suggests, it is based on the indigenous Maori population. The foreshore and seabed controversy was one of the main reasons for setting up the party.
The Maori Party contested the 2005 general elections, and won four of the seven Maori seats and 2.12% of the party vote.
2007
Anti-smacking Bill Passed as Law
The Crimes (Substituted Section 59) Amendment Act 2007, commonly known as the anti-smacking Bill, was a highly controversial Bill introduced by Green Party MP Sue Bradford, which amended Section 59 of the Crimes Act. The Bill removed legal defence of 'reasonable force' for parents prosecuted of assaulting their children.
There was large-scale public opposition to the Bill. In opinion polls, there was overwhelming public opposition to the Bill. Despite this, the Bill was passed on the 16th of May 2007, with a large majority of 113 votes against 8.
\section {migrant}
This method employs user ratings and recommendations to select content. The system finds someone with interests similar to the end user and bases its recommendations on their activity. This method of selection is widely used on social sites such as Facebook and Flipboard.
Parameters for determining the social ranking are generally based on actions such as shares, vote, Likes, etc., keeping in mind the time that these activities are carried out once the content is published.The more there are such activities in a shorter time, the higher rating this content gets.
"Social curation"[1] services like Pinterest allow users to share and discuss their curated collections of found content.
\begin{figure}
\centering
\fbox{Report 1}
\caption{Figure test}
\label{fig:report1}
\end{figure}
As you can see in Fig.~\ref{fig:report1}...
\end{document}
答案1
直接的问题不在于hyperref
包本身,而在于你同时加载了包svg
(它会自动加载subfig
包)和包subcaption
。subfig
subcaption
包不能在同一个文档中一起使用。 使用其中一个包或另一个包,但并非两者兼而有之。假设加载该包有特定原因svg
,那么您就不应该加载subcaption
。
顺便说一句,您文档的序言相当混乱。几个包(例如,、、和svg
)被加载了两次。这样做不会有什么好处。此外,正如 David Carlisle 在另一条评论中指出的那样,您几乎肯定不应该加载该包,尤其是因为您无论如何都要加载。和包可能也不应该加载。请花点时间整理一下这个繁杂的序言。longtable
amsmath
float
epsf
graphicx
psfrag
epstopdf