如何在“\bibliographystyle{model1-num-names}”Elsevier 科学文章模板上引用网站

如何在“\bibliographystyle{model1-num-names}”Elsevier 科学文章模板上引用网站

在此处输入图片描述

@Misc{APAWeb,
  title        = {{Socioeconomic Status}},
  howpublished = {{https://www.apa.org/topics/socioeconomic-status/}},
  note         = {{Accessed: 2019-02-16}},
  url          = {https://www.apa.org/topics/socioeconomic-status/},
  urldate      = {2019-02-16},
}


\documentclass[a4paper,12pt]{elsarticle} 
\usepackage{graphicx} 
\usepackage{amssymb} 
\usepackage{lineno} 
\usepackage{multirow} 
\usepackage{multicol} 
\usepackage{threeparttable} 
\usepackage{lscape} 
\usepackage{gensymb} 
\usepackage{textcomp} 
\usepackage{mhchem} 

\bibliographystyle{model1-num-names} 
\bibliography{XYZ.bib}

答案1

????出现此问题的原因是,参考书目样式期望在 类型的条目中model1-num-names找到非空字段。手头的条目包含一个名为 的字段,但没有一个名为year@miscurldateyear

鉴于model1-num-names书目样式确实知道如何处理名为 的字段url,您可能应该删除该冗余howpublished字段。(如果您决定保留该字段,并且内容由 URL 字符串组成,howpublished则应将其内容包含在指令中。)\url

在此处输入图片描述

\RequirePackage{filecontents}
\begin{filecontents}{XYZ.bib}
@Misc{APAWeb,
  title         = {{Socioeconomic Status}},
  xhowpublished = {\url{https://www.apa.org/topics/socioeconomic-status/}},
  note          = {{Accessed}: 2019-02-16},
  url           = {https://www.apa.org/topics/socioeconomic-status/},
  xurldate      = {2019-02-16},
  year          = 2019,
}
\end{filecontents}

\documentclass[a4paper,12pt]{elsarticle} 
%% I've commented out all preamble instructions 
%% that are irrelevant to the problem at hand.
%\usepackage{graphicx} 
%\usepackage{amssymb} 
%\usepackage{lineno} 
%\usepackage{multirow} 
%\usepackage{multicol} 
%\usepackage{threeparttable} 
%\usepackage{lscape} 
%\usepackage{gensymb} 
%\usepackage{textcomp} 
%\usepackage{mhchem} 
\bibliographystyle{model1-num-names} % from https://www.elsevier.com/authors/author-schemas/latex-instructions
\usepackage{xurl} % allow line breaks anywhere in a URL string

\begin{document}
\cite{APaWeb}
\bibliography{XYZ} % don't inlcude the ".bib" extension
\end{document}

相关内容