MPDI 与 cleveref 合作的文章

MPDI 与 cleveref 合作的文章

我需要使用 MDPI 模板撰写一篇文章。此模板的最新版本可在背页或直接MDPI 网站cleveref。据说这个模板与包兼容。

\usepackage{cleveref}不幸的是,当我在可用模板中添加时,我得到了Package cleveref Error: cleveref must be loaded after hyperref!.。因此,如果我服从并hyperref先加载,那么我会得到一个选项冲突,因为hyperref这个包已经在后台加载了。我考虑不加载,cleveref认为它也可能在后台加载,但后来我无法使用命令\cref

这是我的 MWE(基于可用的模板):

\documentclass{Definitions/mdpi} 

%\usepackage{hyperref}
\usepackage{cleveref}

%=================================================================
% MDPI internal commands
\firstpage{1} 
\pubvolume{1}
\issuenum{1}
\articlenumber{0}
\pubyear{2022}
\copyrightyear{2022}
\datereceived{} 
\dateaccepted{} 
\datepublished{} 
\hreflink{https://doi.org/}
%=================================================================
\Title{Title}
\newcommand{\orcidauthorA}{0000-0000-0000-000X}
\Author{Firstname Lastname $^{1,\dagger,\ddagger}$\orcidA{}, Firstname Lastname $^{1,\ddagger}$ and Firstname Lastname $^{2,}$*}
\address{%
    $^{1}$ \quad Affiliation 1; [email protected]\\
    $^{2}$ \quad Affiliation 2; [email protected]
}

\abstract{
    A single paragraph of about 200 words maximum. For research articles, abstracts should give a pertinent overview of the work. We strongly encourage authors to use the following style of structured abstracts, but without headings: (1) Background: place the question addressed in a broad context and highlight the purpose of the study; (2) Methods: describe briefly the main methods or treatments applied; (3) Results: summarize the article's main findings; (4) Conclusion: indicate the main conclusions or interpretations. The abstract should be an objective representation of the article, it must not contain results which are not presented and substantiated in the main text and should not exaggerate the main conclusions.
}

\keyword{
    keyword 1; keyword 2; keyword 3 (List three to ten pertinent keywords specific to the article; yet reasonably common within the subject discipline.)
} 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\section{How to Use this Template}
    The template details the sections that can be used in a manuscript. Note that the order and names of article sections may differ from the requirements of the journal (e.g., the positioning of the Materials and Methods section). Please check the instructions on the authors' page of the journal to verify the correct order and names. For any questions, please contact the editorial office of the journal or [email protected]. For LaTeX-related questions please contact [email protected].
    

\subsection{Figures, Tables and Schemes}
    All figures and tables should be cited in the main text as Figure~\ref{fig1}, etc.
    
    \begin{figure}[H]
        \includegraphics[width=1.5 cm]{Definitions/logo-mdpi}
        \caption{This is a figure. Schemes follow the same formatting. If there are multiple panels, they should be listed as: (\textbf{a}) Description of what is contained in the first panel. (\textbf{b}) Description of what is contained in the second panel. Figures should be placed in the main text near to the first time they are cited. A caption on a single line should be centered.\label{fig1}}
    \end{figure}   
\end{document}

所以这是一个错误吗?我应该联系 MDPI 寻求支持吗?还是我遗漏了什么?

答案1

mdpihyperref通过在文档开头自动加载来添加,因此总是在您尝试加载之后。如果您进一步延迟使用或类似操作,cleveref该示例将编译。cleveref\AtBeginDocument{\usepackage{cleveref}}

相关内容