我正在尝试重新排列 @incollection 条目的编辑和书名。编辑后面还应该有一个冒号,书名后面应该有一个句号
目前的情况就是这样。
梅威瑟:
\documentclass[11pt, a4paper]{scrbook}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[left=27.5mm,right=16mm,top=30mm,bottom=30mm]{geometry}
\usepackage{filecontents}
\begin{filecontents}{BA.bib}
@online{polymer2020,
title = {Polymer},
author = {{N. N.}},
journaltitle = {Wikipedia},
url = {https://de.wikipedia.org/wiki/Polymer},
urldate = {2020-02-16},
langid = {german}
}
@thesis{kaddar2010,
title = {Die generative Fertigung mittels Laser-Sintern: Scanstrategien, Einfl\"usse verschiedener Prozessparameter auf die mechanischen und optischen Eigenschaften beim LS von Thermoplasten und deren Nachbearbeitungsm\"oglichkeiten},
author = {Kaddar, Wesam},
date = {2010},
institution = {{Universit\"at Duisburg-Essen}},
location = {{Duisburg}},
langid = {german},
type = {Dissertation}
}
@incollection{hans2020,
title = {Ein {{Qualit\"atsicherungskonzept}}},
booktitle = {Additive {{Fertigung}} von {{Bauteilen}}},
author = {Hans, Peter and Werner, Meier},
editor = {Furman, Bernd and Eder, Max},
date = {2020},
publisher = {{Springer}},
location = {{Berlin}}
}
@article{drummer2010,
title = {Untersuchung der Materialalterung bei pulverbasierten Schichtbauverfahren},
author = {Drummer, Dietmar and K\"uhnlein, Florian and Rietzel, Dom and H\"udler, Gerrit},
date = {2010},
journaltitle = {RTejournal - Forum f\"ur Rapid Technologie},
volume = {7},
langid = {german},
number = {1}
}
\end{filecontents}
\usepackage[backend=biber, style=ieee, citestyle=numeric, sorting=nyt, autocite=inline, isbn=false, dashed=false, url=false]{biblatex}
\addbibresource{BA.bib}
\DeclareNameAlias{sortname}{family-given}
\DeclareNameAlias{default}{family-given}
\DeclareFieldFormat[book,inbook,incollection,inproceedings]{series}{#1}
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\DeclareDelimFormat{editortypedelim}{\addspace}
\DeclareFieldFormat*[online]{title}{\textit{#1}}
\DeclareFieldFormat{url}{\url{#1}}
\DeclareFieldFormat{journaltitle}{#1}
\DeclareFieldFormat[article]{title}{\textit{#1}\addperiod}
\DeclareFieldFormat[thesis]{title}{\textit{#1}\addperiod}
\renewcommand{\mkbibnamefamily}[1]{\textsc{#1}}
\renewcommand{\multinamedelim}{\addsemicolon\space}
\renewcommand{\finalnamedelim}{\addsemicolon\space}
\renewcommand*{\labelnamepunct}{\addcolon\addspace}
\renewbibmacro*{publisher+location+date}{%
\printunit{\addperiod\space}%
\printlist{location}%
\iflistundef{publisher}
{\setunit*{\addcomma\space}}
{\setunit*{\addcolon\space}}%
\printlist{publisher}%
\setunit*{\addcomma\space}%
\usebibmacro{date}%
\newunit}
\DeclareFieldFormat[online]{date}{\mkbibparens{#1}}
\usepackage{xpatch}
\xpatchbibdriver{online}
{\printtext[parens]{\usebibmacro{date}}}
{\usebibmacro{date}}
{}{}
\xpatchbibdriver{online}
{\newunit\newblock
\usebibmacro{url+urldate}}
{\setunit{\addperiod\space}\newblock
\usebibmacro{url+urldate}}
{}{}
\begin{document}
\autocite{polymer2020} \autocite{hans2020} \autocite{kaddar2010} \autocite{drummer2010}
\printbibliography
\end{document}
答案1
正如我在回答中提到的那样Biblatex 标点符号在作者@article后面您对专门为重现 IEEE 要求而构建的样式进行了大量修改。通常,标准样式更容易修改。在这种情况下,样式biblatex-ext
会让我们的生活变得轻松很多,因为它们有一个简单的选项来做你想做的事情。
\documentclass[11pt, a4paper]{article}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[backend=biber,
style=ext-numeric, sorting=nyt,
autocite=inline,
innamebeforetitle=true,
isbn=false, url=false]{biblatex}
\DeclareNameAlias{sortname}{family-given}
\DeclareNameAlias{default}{family-given}
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\DeclareDelimFormat{editortypedelim}{\addspace}
\DeclareDelimFormat[bib]{nametitledelim}{\addcolon\addspace}
\begin{filecontents}{\jobname.bib}
@incollection{hans2020,
title = {Ein Qualitätsicherungskonzept},
booktitle = {Additive Fertigung von Bauteilen},
author = {Hans, Peter and Werner, Meier},
editor = {Furman, Bernd and Eder, Max},
date = {2020},
publisher = {Springer},
location = {Berlin},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\autocite{hans2020}
\printbibliography
\end{document}
但(几乎)为我的宠物项目做足够的广告……如果你想坚持下去style=ieee
(你可能觉得你已经陷得太深了),你需要做更多的工作。我将 MWE 缩减为处理@incollection
s 所需的位,使其更容易导航。我们可以从 窃取必要的代码biblatex-ext
并将其修补到ieee.bbx
的@incollection
驱动程序中xpatch
。
\documentclass[11pt, a4paper]{article}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[backend=biber,
bibstyle=ieee, citestyle=numeric, sorting=nyt,
autocite=inline,
isbn=false, dashed=false, url=false]{biblatex}
\DeclareNameAlias{sortname}{family-given}
\DeclareNameAlias{default}{family-given}
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\DeclareDelimFormat{editortypedelim}{\addspace}
\renewcommand*{\labelnamepunct}{\addcolon\addspace}
\DeclareDelimFormat{innametitledelim}{\labelnamepunct}
\DeclareNameAlias{ineditor}{default}
\newbibmacro*{bbx:in:editor}[1]{%
\ifboolexpr{
test \ifuseeditor
and
not test {\ifnameundef{editor}}
}
{\printnames[ineditor]{editor}%
\setunit{\printdelim{editortypedelim}}%
\usebibmacro{#1}%
\clearname{editor}}
{}}
\newbibmacro*{in:editor}{%
\usebibmacro{bbx:in:editor}{editorstrg}}
\newbibmacro*{in:editor+others}{%
\usebibmacro{bbx:in:editor}{editor+othersstrg}}
\usepackage{xpatch}
\xpatchbibdriver{incollection}
{\usebibmacro{maintitle+booktitle}%
\newunit\newblock}
{\usebibmacro{in:editor+others}%
\setunit{\printdelim{innametitledelim}}\newblock
\usebibmacro{maintitle+booktitle}%
\printunit{\addperiod\space}\newblock}
{}{}
\begin{filecontents}{\jobname.bib}
@incollection{hans2020,
title = {Ein Qualitätsicherungskonzept},
booktitle = {Additive Fertigung von Bauteilen},
author = {Hans, Peter and Werner, Meier},
editor = {Furman, Bernd and Eder, Max},
date = {2020},
publisher = {Springer},
location = {Berlin},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\autocite{hans2020}
\printbibliography
\end{document}