我怎么能够删除第一作者前的标记空格在我的参考书目中,除了我自己创建的条目 dinvdi(第一个条目)之外,其他条目都没有空格了?这是默认的吗?还是我无意中添加了一些代码导致出现这个空格?
这是我的代码:
% = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
%
%
% Preamble
%
%
% = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
%Definition des Dokumentes
\documentclass[12pt,a4paper,twoside,openright]{report}
%Seitenlayout
\usepackage[top=2.5cm, bottom=2.5cm, left=2.5cm, right=2.5cm]{geometry} %showframe
%Deutsche Umlaute, Englisch, griechische Symbole
\usepackage[main=ngerman, english]{babel}
% = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
% Literaturverzeichnis und Zitationen
% = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
%Literaturverzeichnis
\usepackage[style = alphabetic-verb,
backend = biber,
maxbibnames = 2,
minbibnames = 2,
maxalphanames = 1,
minalphanames = 1,
useeditor = false,
giveninits = true
]{biblatex}
%Name, V.
\DeclareNameAlias{default}{family-given}
%Doppelpunkt nach letztem Verfasser
\DeclareDelimFormat[bib]{nametitledelim}{\addcolon\addspace}
%Änderungen von Strings
\DefineBibliographyStrings{ngerman}{
andothers = {et\addabbrvspace al\adddot}, %et al.
urlseen = {Abruf\addcolon}, %Anpassung in "Abruf:" bei URLs
references = {Literaturverzeichnis},
bibliography = {Literaturverzeichnis},
}
%Kapitälchen Nachame und Vorname von Autoren in Bibliografie und in Zitationen
\renewcommand*{\mkbibnamefamily}[1]{\ifmknamesc{\textsc{#1}}{#1}}
\renewcommand*{\mkbibnamegiven}[1]{\ifmknamesc{\textsc{#1}}{#1}}
\def\ifmknamesc{ \ifboolexpr{ test {\ifcurrentname{author}} } }
\DeclareFieldFormat{labelalpha}{\textsc{#1}}
%Komma bei mehreren Quellen in Zitation
\renewcommand*{\multicitedelim}{\addcomma\space}
%Semikolon bei mehreren Autoren
\AtBeginBibliography{%
\renewcommand*{\multinamedelim}{\addsemicolon}%
\renewcommand*{\finalnamedelim}{\addsemicolon}%
}
%Formatierung von Regular Database Entry Types
\DeclareFieldFormat
[article,inbook,incollection,inproceedings,patent,thesis,unpublished,suppbook,suppcollection,suppperiodical]
{title}{\textit{#1\isdot}}
%Formatierung von Zitation bei mehreren Autoren
\renewcommand*{\labelalphaothers}{}
%Formatierung von DIN/ VDI Entries
\DeclareLabelalphaTemplate[dinvdi]{\labelelement{\field{note}}}
\DeclareBibliographyDriver{dinvdi}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\printfield{booktitleaddon}%
\setunit{\addcolon\space}%
\usebibmacro{title}%
\printlist{location}
\setunit{\addcolon\space}
\printlist{organization}
\setunit{\addcomma\space}
\printdate
\usebibmacro{finentry}}
\DeclareFieldFormat
[dinvdi]
{booktitleaddon}{\textsc{#1}}
\addbibresource{Literaturverzeichnis_Masterarbeit_CN.bib} % Dateiname anpassen!
\usepackage{citeall} %Zum Testen von Literaturverzeichnis: \citeall
% = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
% Abstände und Platzierungen
% = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
%Formatierung Inhaltsverzeichnis
\usepackage[notindex, nottoc]{tocbibind}
\usepackage{titletoc}
\contentsmargin{2em}
\dottedcontents{chapter}[21pt]{\addvspace{15pt plus .2pt}\bfseries}{20pt}{9.5pt}
\dottedcontents{section}[50pt]{\addvspace{3pt plus .2pt}}{2.3em}{9.5pt}
\dottedcontents{subsection}[89pt]{\addvspace{3pt plus .2pt}}{3.2em}{9.5pt}
%add stretchable glue (Overfull-/ & Underfull-\hbox-Warnings)
\usepackage{microtype}
\emergencystretch=1em
% = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
%
%
% Anfang von Dokumententext
%
%
% = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
\begin{document}
\pagenumbering{Roman}
% = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
%
%
%
%
% Beginn des Inhalts
%
%
%
%
% = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
\pagenumbering{arabic}
\chapter{Einleitung}
\cites{DINEN12976-2}{GRA18}{WER17}
% = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
% Literaturverzeichnis - ACHTUNG: Use Biber (instead of BibTeX)!
% = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
\printbibliography[heading=bibintoc]
\cleardoublepage
\end{document}
这是我的 biblatex 书目的摘录:
@Dinvdi{DINEN12976-2,
booktitleaddon = {Din en 12976-2},
annote = {Din En 12976-2},
note = {Din 12976},
title = {Thermische Solaranlagen und ihre Bauteile - Vorgefertigte Anlagen - Teil 2: Pr{\"u}fverfahren},
year = {2017},
date = {2017-04},
organization = {DIN Deutsches Institut f{\"u}r Normung e. V.},
location = {Berlin},
}
@Book{GRA18,
author = {Grassi, Walter},
title = {Heat Pumps},
year = {2018},
date = {2018},
subtitle = {Fundamentals and Applications},
series = {Green Energy and Technology},
publisher = {Springer Nature},
location = {Cham, Schweiz},
isbn = {978-3-319-62198-2},
}
@Article{WER17,
author = {Werner, Sven},
title = {International review of district heating and cooling},
journal = {Energy},
journaltitle = {Energy},
year = {2017},
date = {2017-04-12},
pages = {617-631},
issue = {137},
}
答案1
宏
\def\ifmknamesc{ \ifboolexpr{ test {\ifcurrentname{author}} } }
留下空格。
如果改为
\def\ifmknamesc{\ifboolexpr{ test {\ifcurrentname{author}}}}
空间消失了