![參考文獻:刪除doi前面的空格](https://rvso.com/image/328453/%E5%8F%83%E8%80%83%E6%96%87%E7%8D%BB%EF%BC%9A%E5%88%AA%E9%99%A4doi%E5%89%8D%E9%9D%A2%E7%9A%84%E7%A9%BA%E6%A0%BC.png)
在我的參考文獻中,doi 有問題。使用時\usepackage{doi}
我得到超鏈接,這就是我想要的。然而,結合起來\usepackage{apacite}
,我必須抑制 doi 前綴\renewcommand{\doiprefix}{}
(否則“doi:”將顯示兩次)。這種指令組合會導致參考文獻部分的 doi 前面出現太多空格,例如:
這是一個 MWE:
\documentclass[11pt, oneside, a4paper]{book}
\usepackage[ngerman]{babel}
\usepackage[tocbib, natbibapa, nosectionbib]{apacite}
\renewcommand{\doiprefix}{}
\usepackage{doi}
\usepackage{hyperref}
\hypersetup{colorlinks, citecolor=black, filecolor=black, linkcolor=black, urlcolor=blue}
\begin{filecontents}{test.bib}
@article{A,
author = {Ackerman, P. L. and Beier, M. E. and Boyle, M. O.},
title = {Working memory and intelligence: The same or different constructs?},
journal = {Psychological Bulletin},
volume = {131},
pages = {30-60},
DOI = {10.1037/0033-2909.131.1.30},
year = {2005}
}
\end{filecontents}
\begin{document}
\citet{A}.
\bibliographystyle{apacite}
\renewcommand\bibname{References}
\bibliography{test}
\end{document}
有誰知道如何刪除doi前面的一個空格?或者有人知道如何在不使用 doi 套件的情況下將 doi 轉換為超連結嗎?
答案1
來自亨利·門克的評論:
如果你查看文件.bbl
,你會注意到
\begin{APACrefDOI} \doi{10.1037/0033-2909.131.1.30} \end{APACrefDOI}
\begin{APACrefDOI}
看到和之間的空格了嗎\doi
?定義
\renewcommand\doiprefix{\ignorespaces}
你就會擺脫這個額外的空間。
或者,您可以保留\doiprefix
並設定\renewcommand\doitext{}
(這是您從 doi 套件中獲取的文字)。