![当不同页面引用相同参考文献时,将“Ibid.”字符串替换为字符串“Ivi”](https://linux22.com/image/419897/%E5%BD%93%E4%B8%8D%E5%90%8C%E9%A1%B5%E9%9D%A2%E5%BC%95%E7%94%A8%E7%9B%B8%E5%90%8C%E5%8F%82%E8%80%83%E6%96%87%E7%8C%AE%E6%97%B6%EF%BC%8C%E5%B0%86%E2%80%9CIbid.%E2%80%9D%E5%AD%97%E7%AC%A6%E4%B8%B2%E6%9B%BF%E6%8D%A2%E4%B8%BA%E5%AD%97%E7%AC%A6%E4%B8%B2%E2%80%9CIvi%E2%80%9D.png)
我正在使用biblatex
的ext-verbose-trad1
风格memoir
。
当我随后在不同的页面上引用相同的参考文献时,我必须使用缩写“ivi”,而当在同一页面上引用相同的参考文献时,则保留通常的“ibid.”缩写。
这个问题也在tex.stackexchange.com/q/418701/35864,建议使用补丁。
正如下面的 MWE 所演示的,使用ext-verbose-trad1
补丁建议的样式可以完美运行:
\documentclass[12pt, a4paper]{memoir}
\usepackage[italian]{babel}
\usepackage[style=ext-verbose-trad1]{biblatex}
%patch to use ibid and ivi
\usepackage{xpatch}
\NewBibliographyString{ibidemloccit,ibidemnoloccit}
\DefineBibliographyStrings{italian}{%
idem = {\autocap{i}d},
ibidemloccit = {\mkbibemph{\autocap{i}bid\adddot}},
ibidemnoloccit = {\mkbibemph{\autocap{i}vi}},
}
\xpatchbibmacro{author}
{\printnames{author}}
{\iffootnote
{\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
{\usebibmacro{cite:idem}}
{\printnames{author}}}
{\printnames{author}}}
{}{}
\xpatchbibmacro{bbx:editor}
{\printnames{editor}}
{\iffootnote
{\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
{\usebibmacro{cite:idem}}
{\printnames{editor}}}
{\printnames{editor}}}
{}{}
\xpatchbibmacro{bbx:translator}
{\printnames{translator}}
{\iffootnote
{\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
{\usebibmacro{cite:idem}}
{\printnames{translator}}}
{\printnames{translator}}}
{}{}
\renewbibmacro*{cite:ibid}{%
\printtext{%
\bibhyperlink{cite\csuse{cbx@lastcite@\thefield{entrykey}}}{%
\ifloccit
{\bibstring[\mkibid]{ibidemloccit}%
\global\toggletrue{cbx:loccit}}
{\bibstring[\mkibid]{ibidemnoloccit}}}}}
\addbibresource{biblatex-examples.bib}
\begin{document}
Lorem \footcite{aristotle:anima}
Lorem \footcite[14]{aristotle:anima}
Lorem \footcite[198]{aristotle:anima}
ipsum \footcite[198]{aristotle:anima}
\printbibliography
\end{document}
给出输出:
当我使用该样式时,ext-verbose-trad2
它给出了另一个结果。最后一个引用是前一个的简单重复,而应该出现字符串“Ibid”:
答案1
链接问题的答案仍然适用于(ext-)verbose-trad2
。您只是遗漏了答案中最重要的部分(在第一句中提到):您需要设置选项ibidpage=true,
。
\documentclass[12pt, a4paper]{memoir}
\usepackage[italian]{babel}
\usepackage[style=ext-verbose-trad2, ibidpage=true]{biblatex}
%patch to use ibid and ivi
\usepackage{xpatch}
\NewBibliographyString{ibidemloccit,ibidemnoloccit}
\DefineBibliographyStrings{italian}{%
idem = {\autocap{i}d},
ibidemloccit = {\mkbibemph{\autocap{i}bid\adddot}},
ibidemnoloccit = {\mkbibemph{\autocap{i}vi}},
}
\xpatchbibmacro{author}
{\printnames{author}}
{\iffootnote
{\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
{\usebibmacro{cite:idem}}
{\printnames{author}}}
{\printnames{author}}}
{}{}
\xpatchbibmacro{bbx:editor}
{\printnames{editor}}
{\iffootnote
{\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
{\usebibmacro{cite:idem}}
{\printnames{editor}}}
{\printnames{editor}}}
{}{}
\xpatchbibmacro{bbx:translator}
{\printnames{translator}}
{\iffootnote
{\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
{\usebibmacro{cite:idem}}
{\printnames{translator}}}
{\printnames{translator}}}
{}{}
\renewbibmacro*{cite:ibid}{%
\printtext{%
\bibhyperlink{cite\csuse{cbx@lastcite@\thefield{entrykey}}}{%
\ifloccit
{\bibstring[\mkibid]{ibidemloccit}%
\global\toggletrue{cbx:loccit}}
{\bibstring[\mkibid]{ibidemnoloccit}}}}}
\addbibresource{biblatex-examples.bib}
\begin{document}
Lorem \footcite{aristotle:anima}
Lorem \footcite[14]{aristotle:anima}
Lorem \footcite[198]{aristotle:anima}
ipsum \footcite[198]{aristotle:anima}
\printbibliography
\end{document}