
私はスタイルbiblatex
を使用してauthoryear-icomp
、同じ年に書かれた同じ著者の2つの作品を引用したいと考えています。現在の出力\citet{examplea, exampleb}
は
ジョン(1991a,b)
しかし、私はスペースを追加して、
ジョン(1991a、b)。
私はすでに再定義しようと試み\multicitedelim
、\compcitedelim
\renewcommand{\multicitedelim}{\addcomma\addspace}
\renewcommand{\compcitedelim}{\addcomma\addspace}
しかし、それは期待した効果をもたらさなかった。
ムウェ
\documentclass{article}
\usepackage[backend=biber, natbib, style=authoryear-icomp]{biblatex}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@MISC{examplea,
author = {John, Doe},
title = {MyBook A},
date = {1991}
}
@MISC{exampleb,
author = {John, Doe},
title = {MyBook B},
date = {1991}
}
\end{filecontents*}
\bibliography{\jobname.bib}
\begin{document}
\citet{examplea, exampleb}
\end{document}
答え1
この動作の原因は bibmacro ですtextcite
...
プリアンブルに次の行を追加します(パッケージxpatch
が必要です)
\xpatchbibmacro{textcite}
{\setunit{\addcomma}}
{\setunit{\addcomma\addspace}}
{}
{}
問題を解決します。
完全なコード(\bibliography
にも変更しました\addbibresource
)
\documentclass{article}
\usepackage[backend=biber, natbib, style=authoryear-icomp]{biblatex}
\usepackage{xpatch}
\xpatchbibmacro{textcite}
{\setunit{\addcomma}}
{\setunit{\addcomma\addspace}}
{}
{}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@MISC{examplea,
author = {John, Doe},
title = {MyBook A},
date = {1991}
}
@MISC{exampleb,
author = {John, Doe},
title = {MyBook B},
date = {1991}
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\begin{document}
\citet{examplea, exampleb}
\end{document}
出力: