我想将参考书目条目的标签改为粗体(仅在参考文献列表中,不用于正文中的引用)。完整的标签应以粗体打印,即包括方括号。
我看了这些问题:如何更改 amsrefs 中参考书目项目标签的外观?和BibLaTeX 参考书目不带方括号。但是,我无法将它们转移到我的案例中。我甚至尝试更改 bst 文件,但无法实现我想要的效果。
仅改变参考书目中标签的外观的正确方法是什么?
这是我的示例:
\documentclass{article}
\bibliographystyle{alpha}
\begin{document}
I cite \cite{A1} and \cite{B2} in my text.
\bibliography{bibliography}
\end{document}
这是 bibliography.bib 的内容:
@BOOK{A1,
author = {Author One},
title = {Alpha},
publisher = {Publisher A},
year = {2000},
}
@BOOK{B2,
author = {Author Two},
title = {Beta},
publisher = {Publisher B},
year = {2001},
}
我想要的输出结果如下:
答案1
无需任何包,您只需重新定义\@biblabel
工作方式:
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@BOOK{A1,
author = {Author One},
title = {Alpha},
publisher = {Publisher A},
year = {2000},
}
@BOOK{B2,
author = {Author Two},
title = {Beta},
publisher = {Publisher B},
year = {2001},
}
\end{filecontents*}
\makeatletter
\renewcommand{\@biblabel}[1]{\textbf{[#1]}}
\makeatother
\bibliographystyle{alpha}
\begin{document}
I cite \cite{A1} and \cite{B2} in my text.
\bibliography{\jobname}
\end{document}