我在我的 BIB 文件中使用@PREAMBLE{"\def\SortNoop#1{}"}
它来正确排序AUTHOR = {{\SortNoop{Bruijn}}de Bruijn, Nicolaas Govert}
。但这会改变 bibitem 的标签:所有其他只有一个作者的条目都有一个标签,其中作者的姓氏用三个字母缩写。使用的\SortNoop
标签为 [B64],但我希望是 [Bru64] 或 [deB64]。我如何获得标签 [Bru64]?
以下是 MWE:
\begin{filecontents*}{\jobname.bib}
@PREAMBLE{"\def\SortNoop#1{}"}
@INCOLLECTION{Bruijn1964,
AUTHOR = {{\SortNoop{Bruijn}}de Bruijn, Nicolaas Govert},
TITLE = {{P{\'o}lya's} {Theory} of {Counting}},
BOOKTITLE = {Applied combinatorial mathematics},
PUBLISHER = {John Wiley and Sons, Inc., New York-London-Sydney},
YEAR = {1964}
}
@ARTICLE{Harary1958,
AUTHOR = {Harary, Frank},
TITLE = {On the number of bi-colored graphs},
JOURNAL = {Pacific J. Math.},
YEAR = {1958}
}
\end{filecontents*}
\documentclass{article}
\begin{document}
The label of \cite{Harary1958} has three alphabetic characters in it.
But the label of \cite{Bruijn1964} has only one alphabetic character.
How do I get the label [Bru64] or [deB64]?
\bibliographystyle{alpha}
\bibliography{\jobname.bib}
\end{document}
答案1
为你的 hack 添加 hack。或者不要使用该alpha
样式。;-)
\begin{filecontents*}{\jobname.bib}
@PREAMBLE{"\newcommand\SortNoop[1]{}"}
@PREAMBLE{"\newcommand\Bru{Bru}"}
@INCOLLECTION{Bruijn1964,
AUTHOR = {{\SortNoop{Bruijn}}de {\Bru}ijn, Nicolaas Govert},
TITLE = {{P{\'o}lya's} {Theory} of {Counting}},
BOOKTITLE = {Applied combinatorial mathematics},
PUBLISHER = {John Wiley and Sons, Inc., New York-London-Sydney},
YEAR = {1964}
}
@ARTICLE{Harary1958,
AUTHOR = {Harary, Frank},
TITLE = {On the number of bi-colored graphs},
JOURNAL = {Pacific J. Math.},
YEAR = {1958}
}
\end{filecontents*}
\documentclass{article}
\begin{document}
The label of \cite{Harary1958} has three alphabetic characters in it.
But the label of \cite{Bruijn1964} has only one alphabetic character.
How do I get the label [Bru64] or [deB64]?
\bibliographystyle{alpha}
\bibliography{\jobname.bib}
\end{document}