我想将引用条目的文本设置在引用键下方,并在左边框处留出空格。我当前的解决方案将文本设置为下一行,但键和文本之间的空格仍然相同。这是我当前用于参考书目设置的代码:
\usepackage[backend=biber, maxcitenames=1, maxbibnames=10, style=alphabetic, natbib=true, sorting=nyt]{biblatex}
\DefineBibliographyStrings{ngerman}{
andothers = {{et\,al\adddot}},
}
\DeclareFieldFormat{labelalpha}{\thefield{entrykey}\thefield{label}}
\DeclareFieldFormat{extraalpha}{}
\renewcommand*{\labelnamepunct}{\addcolon\addspace}
\renewcommand*{\labelalphaothers}{}
\renewcommand*{\mkbibparens}[1]{{\ifcitation{\bibleftbracket#1\bibrightbracket}
{\bibleftparen#1\bibrightparen}}}
\renewcommand*{\bibopenparen}[1]{{\ifcitation{\bibleftbracket#1} {\bibleftparen#1}}}
\renewcommand*{\bibcloseparen}{{\ifcitation{\bibrightbracket}{\bibrightparen}}}
\renewbibmacro*{begentry}{%
\\
}
\DeclareNameAlias{default}{last-first}
最小示例:
\documentclass[a4paper, 12pt,listof=totoc,numbers=noenddot,bibtotoc]{scrartcl}
\usepackage[T1] {fontenc}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{helvet}
\input{bibliographysettings}
\bibliography{literatur}
\begin{document}
\section{Test}
An example text. \parencite[]{Test}
\printbibliography[nottype=online,heading=subbibliography,
title={Literaturverzeichnis}]
\end{document}
Bib 文件:
@Book{Test,
Title = {Example},
Author = {Example, E.},
Publisher = {Example Example Example},
Year = {1970},
Label = {\ 1970}
}
编辑:我添加了 Lopezo 的行。当 bibentrytext 只有一行时,它很有帮助。如果它更长,我会遇到一个新问题:
整个文本与左边框应具有相同的空间。有什么想法吗?
谢谢你!!
答案1
从代码中执行此操作的最简单方法是添加第三行:
\defbibenvironment{bibliography}
{\list{
\printtext[labelalphawidth]{%
\printfield{prefixnumber}%
\printfield{labelalpha}}%
\addspace \\
}
{\setlength{\labelwidth}{2em}}
}
{\endlist}
{\item}
\renewbibmacro*{begentry}{%
\\
}
编辑这是第一个解决方案的更新