在 natbib 和 apalike-fr 参考资料中显示 URL

在 natbib 和 apalike-fr 参考资料中显示 URL

在引用网站时natbib我遇到了问题。apalike-fr

网站链接未显示在参考文献中。

这是 LaTeX 代码的一个示例:

\documentclass[12pt]{book}
\usepackage[square,sort,comma,numbers]{natbib}
\begin{document}

Hello world! \\

As said \citet{Dong2015} and \citet{Statista2017}, this is a test.

\bibliography{mybib}
\bibliographystyle{apalike-fr}

\end{document}

这是该文件的内容mybib.bib

@misc{Statista2017,
author = {Statista},
title = {{Global mobile data traffic from 2016 to 2021 (in exabytes per month)}},
url = {https://www.statista.com/statistics/271405/global-mobile-data-traffic-forecast/},
year = {2017}
}

@article{Dong2015,
abstract = {abstract},
author = {Dong, Wenqiang and Wang, Fulai and Huang, Yu and Xu, Guangluan and Guo, Zhi and Fu, Xingyu and Fu, Kun},
doi = {10.1016/j.cag.2014.10.001},
file = {fileaddress},
isbn = {1880148536},
issn = {00978493},
journal = {Computers and Graphics (Pergamon)},
keywords = {Force-directed,Graph drawing,Graph visualization,PageRank},
pages = {24--33},
publisher = {Elsevier},
title = {{An advanced pre-positioning method for the force-directed graph visualization based on pagerank algorithm}},
url = {http://dx.doi.org/10.1016/j.cag.2014.10.001},
volume = {47},
year = {2015}
}

这是编译的结果:

文本

参考

如您所见,两个参考文献都包含 URL,但均未显示。对于期刊文章来说,这可能没问题,但对于网站来说,就不行了。

我该如何纠正这个问题?

答案1

您可以apacite像这里一样使用:

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@misc{Statista2017,
  author = {Statista},
  title  = {{Global mobile data traffic from 2016 to 2021 (in exabytes per month)}},
  url    = {https://www.statista.com/statistics/271405/global-mobile-data-traffic-forecast/},
  year   = {2017},
}
@article{Dong2015,
  abstract = {abstract},
  author = {Dong, Wenqiang and Wang, Fulai and Huang, Yu and 
            Xu, Guangluan and Guo, Zhi and Fu, Xingyu and Fu, Kun},
  doi = {10.1016/j.cag.2014.10.001},
  file = {fileaddress},
  isbn = {1880148536},
  issn = {00978493},
  journal = {Computers and Graphics (Pergamon)},
  keywords = {Force-directed,Graph drawing,Graph visualization,PageRank},
  pages = {24--33},
  publisher = {Elsevier},
  title = {{An advanced pre-positioning method for the force-directed graph visualization based on pagerank algorithm}},
  url = {http://dx.doi.org/10.1016/j.cag.2014.10.001},
  volume = {47},
  year = {2015},
}
\end{filecontents*}


\documentclass{article}

%\usepackage[square,sort,comma,numbers]{natbib}
\usepackage[%
% numberedbib,
  natbibapa
]{apacite} 
\usepackage[hyphens]{url}


\begin{document}
As said \citet{Dong2015} and \citet{Statista2017}, this is a test.

\bibliographystyle{apacite}
\bibliography{\jobname}
\end{document}

结果如下:

清晰结果

或者你可以biblatexbiber这里一样使用:

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@misc{Statista2017,
  author = {Statista},
  title  = {{Global mobile data traffic from 2016 to 2021 (in exabytes per month)}},
  url    = {https://www.statista.com/statistics/271405/global-mobile-data-traffic-forecast/},
  year   = {2017},
}
@article{Dong2015,
  abstract = {abstract},
  author = {Dong, Wenqiang and Wang, Fulai and Huang, Yu and 
            Xu, Guangluan and Guo, Zhi and Fu, Xingyu and Fu, Kun},
  doi = {10.1016/j.cag.2014.10.001},
  file = {fileaddress},
  isbn = {1880148536},
  issn = {00978493},
  journal = {Computers and Graphics (Pergamon)},
  keywords = {Force-directed,Graph drawing,Graph visualization,PageRank},
  pages = {24--33},
  publisher = {Elsevier},
  title = {{An advanced pre-positioning method for the force-directed graph visualization based on pagerank algorithm}},
  url = {http://dx.doi.org/10.1016/j.cag.2014.10.001},
  volume = {47},
  year = {2015},
}
\end{filecontents*}


\documentclass{article}

\usepackage[%
  backend=biber,
  style=apa,
  natbib=true
]{biblatex}
\addbibresource{\jobname.bib}


\begin{document}
As said \citet{Dong2015} and \citet{Statista2017}, this is a test.

\printbibliography
\end{document}

结果如下:

biblatex 结果

相关内容