我使用\bibliographystyle{alpha}
with bibtex
(而不是biblatex
)。文档类是scrreprt
。输出如下所示
[Abc07] Example Abc. The title and all other stuff.
dddd. 2007.
[Bcd08] Ex Bcd. The title, the journal and all other stuff.
cccc. 2008.
但我想要类似的东西
[Abc07] Example Abc. The title and all other stuff.
dddd. 2007.
[Bcd08] Ex Bcd. The title, the journal and all other stuff.
cccc. 2008.
标签[Abc07]
和[Bcd08]
应该在哪里大胆的。所以我不想要悬挂缩进。而是希望条目之间有一个小的垂直空间。
有人能帮我吗?
答案1
环境thebibliography
就是list
环境,您应该更改其参数。基本上,\leftmargin
我们不是设置,而是设置\itemindent
包含标签和分隔符,同时将保持\leftmargin
为零。
\begin{filecontents*}{\jobname.bib}
@article{A,
author={Author, A.},
title={The title of this article that should be long enough to wrap},
journal={Journal of Irreproducible Results},
year={2042},
}
@article{B,
author={Buthor, B.},
title={The title of this article that should be long enough to wrap},
journal={Journal of Irreproducible Results},
year={2042},
}
\end{filecontents*}
\documentclass{scrreprt}
%%% Code to add to your document
\usepackage{etoolbox}
\patchcmd{\thebibliography}
{\advance\leftmargin\labelsep}
{\leftmargin=0pt\itemindent=\labelwidth\advance\itemindent\labelsep}
{}{}
%%% end of code to add
\begin{document}
\nocite{*}
\bibliographystyle{alpha}
\bibliography{\jobname}
\end{document}
该示例使用了filecontents*
环境,但您所需要的只是标记的代码。
如果您希望标签以粗体显示,并且在标签后面留有正常空格,则需要添加的代码是
\patchcmd{\thebibliography}
{\advance\leftmargin\labelsep}
{\leftmargin=0pt\labelwidth=0pt\labelsep=0pt}
{}{}
\makeatletter
\renewcommand{\@biblabel}[1]{[\textbf{#1}]~}
\makeatother
这是一张图片: