我想删除版本和年份之间的空格,但我不知道该怎么做。
解释一下:我通过更改 bibmacropublisher+location+date
并\printfield{edition}
从参考书目驱动程序中删除,将版本放在年份之前。我对收藏做了同样的事情,但我没有把它放在这里。我不知道这是否是最好的解决方案,但它有效
\documentclass[11pt]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[autostyle,german=guillemets]{csquotes}
\usepackage[backend=biber, style=authortitle-ibid, pagetracker=false]{biblatex}
\renewcommand*{\mkbibcompletename}[1]{\textsc{#1}}
\DeclareDelimFormat[bib]{nametitledelim}{\addcolon\space}
\DeclareFieldFormat{title}{#1\isdot}
\DeclareFieldFormat{edition}{\textsuperscript{#1}} %Auflage hochgestellt
\renewbibmacro*{publisher+location+date}{%kein Komma nach Verlag und Auflage vor Datum
\printlist{location}%
\setunit*{\addcolon\space}%
\printlist{publisher}%
\setunit*{\space}%
\printfield{edition}
\usebibmacro{date}%
\newunit}
\DeclareBibliographyDriver{book}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/editor+others/translator+others}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{maintitle+title}%
\newunit
\printlist{language}%
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
\usebibmacro{byeditor+others}%
\newunit\newblock
%\printfield{edition}%Edition ausblenden
%\newunit
\iffieldundef{maintitle}
{\printfield{volume}%
\printfield{part}}
{}%
\newunit
\printfield{volumes}%
\newunit\newblock
\usebibmacro{series+number}%
\newunit\newblock
\printfield{note}%
\newunit\newblock
\usebibmacro{publisher+location+date}%
\newunit\newblock
\usebibmacro{chapter+pages}%
\newunit
\printfield{pagetotal}%
\newunit\newblock
\iftoggle{bbx:isbn}
{\printfield{isbn}}
{}%
\newunit\newblock
\usebibmacro{doi+eprint+url}%
\newunit\newblock
\usebibmacro{addendum+pubstate}%
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
\iftoggle{bbx:related}
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
\usebibmacro{finentry}}
\begin{filecontents}{literatur.bib}
@book{ZimmerlingCharismatisch,
author = {Zimmerling, Peter},
title = {Charismatische Bewegungen},
publisher = {Vandenhoeck \& Ruprecht},
location = {Göttingen},
year = {2018},
Edition = {2}
}
\end{filecontents}
\addbibresource{literatur.bib}
\begin{document}
Text \footcite{ZimmerlingCharismatisch}
\printbibliography
\end{document}
答案1
您的代码几乎满足您的要求。您只需要在%
后面加上\printfield{edition}
。在 LaTeX 中,行尾的行为类似于空格,因此可能会导致输出中出现空格,除非使用 注释掉它%
。请参阅行尾的百分号 (%) 有什么用?(为什么我的宏会产生额外的空间?)进行更深入的讨论。
所以
\renewbibmacro*{publisher+location+date}{%
\printlist{location}%
\setunit*{\addcolon\space}%
\printlist{publisher}%
\setunit*{\space}%
\printfield{edition}%
\usebibmacro{date}%
\newunit}
将按预期工作。
在里面biblatex-ext
文档(§5.4选定书目宏,v0.14 第 33 页)我建议采用以下更简短的解决方案。
只需从 切换style=authortitle-ibid,
到即可style=ext-authortitle-ibid,
。(否则,此更改不会对输出产生任何影响。ext-authortitle-ibid
是 的直接替代品authortitle-ibid
。)
\documentclass[11pt]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[autostyle,german=guillemets]{csquotes}
\usepackage[backend=biber, style=ext-authortitle-ibid, pagetracker=false]{biblatex}
\renewcommand*{\mkbibcompletename}[1]{\textsc{#1}}
\DeclareDelimFormat[bib]{nametitledelim}{\addcolon\space}
\DeclareFieldFormat{title}{#1\isdot}
\renewbibmacro*{edition}{}
\DeclareFieldFormat{superedition}{\textsuperscript{#1}}
\newbibmacro*{superedition}{%
\iffieldnums{edition}
{\printfield[superedition]{edition}}
{\printfield{edition}%
\setunit{\addspace}}}
\renewcommand*{\pubdatedelim}{\addspace}
\renewcommand*{\locdatedelim}{\pubdatedelim}
\renewbibmacro*{pubinstorg+location+date}[1]{%
\printlist{location}%
\iflistundef{#1}
{\setunit*{\locdatedelim}}
{\setunit*{\locpubdelim}}%
\printlist{#1}%
\setunit*{\pubdatedelim}%
\usebibmacro{superedition}%
\usebibmacro{date}%
\newunit}
\begin{filecontents}{\jobname.bib}
@book{ZimmerlingCharismatisch,
author = {Zimmerling, Peter},
title = {Charismatische Bewegungen},
publisher = {Vandenhoeck \& Ruprecht},
location = {Göttingen},
year = {2018},
Edition = {2},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
Text\autocite{ZimmerlingCharismatisch}
\printbibliography
\end{document}
这里的想法是避免修改需要大量代码的参考书目驱动程序,通过使用新的edition
bibmacro 来biblatex-ext
禁用“通常”的版本打印。
然后我们只需将版本添加到日期即可。这是在元宏中完成的pubinstorg+location+date
,最终会publisher+location+date
像您的示例中那样定义。
也可以看看将版本打印为年份后的顶部/上标(或者https://golatex.de/viewtopic.php?p=107206#p107206在德国 goLaTeX 论坛中)。