在撰写提案时,我希望有一种方法,使对我的论文的引用显示为[XXn]
而不是[n]
,其中 XX 是我的姓名首字母,n 是已排序或未排序的计数器。
最终,我可能会在最后有两个单独的参考列表,一个是我的作品,另一个是其他作品的。
我知道如何使用 biblatex 做第二件事,但第一件事我却很纠结。使用简写字段不会产生增量。
这是一个 MWE;
\documentclass{article}
\usepackage[sorting=none,backend=biber]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{A1,
author = {myself},
year = {2001},
title = {A work of mine},
shorthand = {XX},
keywords={mine},
}
@article{A2,
author = {myself},
year = {2001},
title = {A work of mine},
shorthand = {XX},
keywords={mine},
}
@article{B3,
author = {Some random person},
year = {2002},
title = {Doing random things},
}
@article{B4,
author = {Some other author},
year = {2002},
title = {Doing other things},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
These are my works, \cite{A1,A2}. This is another one \cite{B3}, this as well, \cite{B4}, while this is mine and that of this other person \cite{A1,B3}
\printbibliography[title={Personnal publications},keyword=mine]
\printbibliography[notkeyword=mine]
\end{document}
我想要的是;
These are my works, [XX1,XX2]. This is another one [3], this as well, [4], while this is mine and that of this other person [XX1,4]
参考部分中的标签也相同。
答案1
您可以使用prefixnumbers
(它隐式地有一个resetnumbers
,但对于您的设置来说这并不重要)
\printbibliography[title={Personnal publications},keyword=mine,prefixnumbers={XX}]
\printbibliography[notkeyword=mine]
为了确保万无一失,您应该添加defernumbers=true
为biblatex
选项。
平均能量损失
\documentclass{article}
\usepackage[sorting=none,backend=biber,defernumbers=true]{biblatex}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{A1,
author = {myself},
year = {2001},
title = {A work of mine},
keywords={mine},
}
@article{A2,
author = {myself},
year = {2001},
title = {A work of mine},
keywords={mine},
}
@article{B3,
author = {Some random person},
year = {2002},
title = {Doing random things},
}
@article{B4,
author = {Some other author},
year = {2002},
title = {Doing other things},
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\begin{document}
These are my works, \cite{A1,A2}. This is another one \cite{B3}, this as well, \cite{B4}, while this is mine and that of this other person \cite{A1,B3}
\printbibliography[title={Personnal publications},keyword=mine,prefixnumbers={XX}]
\printbibliography[notkeyword=mine]
\end{document}
如果你不能隐式resetnumbers
尝试
\makeatletter
\define@key{blx@bib1}{prefixnumbersnoreset}{}
\define@key{blx@bib2}{prefixnumbersnoreset}{%
\def\blx@prefixnumbers{#1}%
\iftoggle{blx@defernumbers}
{}
{\iftoggle{blx@labelnumber}
{\blx@warning{%
Option 'prefixnumbers' requires global\MessageBreak
'defernumbers=true'}}
{}}}
\makeatother
和
\printbibliography[notkeyword=mine]
\printbibliography[title={Personnal publications},keyword=mine,prefixnumbersnoreset={XX}]