参考文献: doi の前の空白を削除します

参考文献: doi の前の空白を削除します

私の参考文献では、doi に問題があります。 を使用すると、\usepackage{doi} 必要なハイパーリンクが表示されます。\usepackage{apacite} ただし、 と組み合わせると、doi プレフィックスを抑制する必要があります\renewcommand{\doiprefix}{}(そうしないと、「doi:」が 2 回表示されます)。 このコマンドの組み合わせにより、参考文献セクションの 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 の前の空白を 1 つ削除する方法を知っている人はいませんか? または、doi パッケージを使用せずに doi をハイパーリンクに変換する方法を知っている人はいませんか?

答え1

アンリ・メンケ氏のコメントより:

ファイルを見れば.bblわかるだろう

\begin{APACrefDOI} \doi{10.1037/0033-2909.131.1.30} \end{APACrefDOI}

\begin{APACrefDOI}との間のスペースを確認しますか\doi?定義

\renewcommand\doiprefix{\ignorespaces}

余分なスペースがなくなります。

あるいは、keep\doiprefixと set \renewcommand\doitext{}(doi パッケージから取得したテキスト) を保持することもできます。

関連情報