我使用 biblatex 包中的字母引用样式,如果我引用其他出版物,这对我来说通常没问题。但如果我引用自己的出版物或我学生的出版物,我的教授希望我以以下方式编辑文中的引用:
[XYZ22*] 用于我自己的出版物
[ABC21**] 作为我学生的论文
这里有一个小例子:
\documentclass{article}
\usepackage[
backend=bibtex,
style=alphabetic,
autocite=inline,
sorting=nyt,
sortcase=false,
url=false,
hyperref=auto,
maxnames=10,
maxbibnames=3, %max 3 Namen im Literaturverzeichnis, sonst "et al."
maxalphanames=1
firstinits=true,
maxcitenames=1,
isbn=false,
labelnumber,
defernumbers=true,
]{biblatex}
\usepackage{filecontents}
\usepackage{hyperref}
\begin{filecontents*}{\References.bib}
@article{Myself2018,
author = {Myself, I},
title = {Whatever},
journal = {Proceedings of ICFUN},
year = {2018},
doi = {10.15544},
keywords = {Mys},
}
@article{Student2019,
author = {Student, My},
title = {Whatever 2},
journal = {Proceedings of ICFUN},
year = {2019},
keyword = {Stu}
}
@book{Boge2021,
author = {B{\"o}ge, Alfred and B{\"o}ge, Wolfgang},
year = {2021},
title = {Technische Mechanik},
address = {Wiesbaden},
publisher = {{Springer Fachmedien Wiesbaden}},
isbn = {978-3-658-34153-4},
doi = {10.1007/978-3-658-34154-1}
}
\end{filecontents*}
\addbibresource{\References.bib}
\begin{document}
This is my work \cite{Myself2018}. This is the work of my student \cite{Student2019}. This is the work of someone else \cite{Boge2021}.
\printbibliography
\end{document}
结果应该在文中:
这是我的作品 [Mys18*]。这是我的学生的作品 [Stu19**]。这是别人的作品 [Bog21]。
当然应该有三个不同的书目,我已经使用关键词进行管理了:
\printbibliography[title={Authors Publications}, keyword={Mys}, heading=subbibliography]
\printbibliography[title={Students Publications}, keyword={Stu}, heading=subbibliography]
\printbibliography[title={Further Publications}, keyword={Mys}, notkeyword={Stu}, heading=subbibliography]
任何帮助都将非常有帮助!
提前致以最诚挚的谢意
答案1
在alphabetic
样式中,没有方便的方法在引用标签后添加标记,因此我们重新定义了cite
bibmacro。
如果您希望星号也出现在参考书目中,请重新定义labelalphawidth
。
\documentclass{article}
\usepackage[
backend=bibtex,
style=alphabetic,
autocite=inline,
sorting=nyt,
sortcase=false,
url=false,
maxnames=10,
maxbibnames=3,
maxalphanames=1,
firstinits=true,
maxcitenames=1,
isbn=false,
labelnumber,
defernumbers=true,
]{biblatex}
\usepackage{hyperref}
\newbibmacro{cite:addmarkers}{%
\ifkeyword{Mys}{*}{}%
\ifkeyword{Stu}{**}{}%
}
\renewbibmacro*{cite}{%
\printtext[bibhyperref]{%
\printfield{labelprefix}%
\printfield{labelalpha}%
\printfield{extraalpha}%
\ifbool{bbx:subentry}
{\printfield{entrysetcount}}
{}%
\usebibmacro{cite:addmarkers}}}
\DeclareFieldFormat{labelalphawidth}{%
\mkbibbrackets{#1\usebibmacro{cite:addmarkers}}}
\begin{filecontents*}{\jobname.bib}
@article{Myself2018,
author = {Myself, I},
title = {Whatever},
journal = {Proceedings of ICFUN},
year = {2018},
doi = {10.15544},
keywords = {Mys},
}
@article{Student2019,
author = {Student, My},
title = {Whatever 2},
journal = {Proceedings of ICFUN},
year = {2019},
keywords = {Stu},
}
@book{Boge2021,
author = {B{\"o}ge, Alfred and B{\"o}ge, Wolfgang},
year = {2021},
title = {Technische Mechanik},
address = {Wiesbaden},
publisher = {{Springer Fachmedien Wiesbaden}},
isbn = {978-3-658-34153-4},
doi = {10.1007/978-3-658-34154-1},
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\begin{document}
This is my work \cite{Myself2018}.
This is the work of my student \cite{Student2019}.
This is the work of someone else \cite{Boge2021}.
\printbibliography[title={Authors Publications},
keyword={Mys}, heading=subbibliography]
\printbibliography[title={Students Publications},
keyword={Stu}, heading=subbibliography]
\printbibliography[title={Further Publications},
notkeyword={Mys}, notkeyword={Stu}, heading=subbibliography]
\end{document}