![在 natbib 和 apalike-fr 参考资料中显示 URL](https://linux22.com/image/366844/%E5%9C%A8%20natbib%20%E5%92%8C%20apalike-fr%20%E5%8F%82%E8%80%83%E8%B5%84%E6%96%99%E4%B8%AD%E6%98%BE%E7%A4%BA%20URL.png)
在引用网站时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}
结果如下:
或者你可以biblatex
像biber
这里一样使用:
\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}
结果如下: