1

How can I remove the marked space before the first author in my bibliography with any entry except for my self-made entry dinvdi (first entry) where there already is no space? Is this by default or did I add some code accidentially which causes this space?

enter image description here

This is my code:

% = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
%
%
% 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}

This is the extract of my biblatex-bibliography:

    @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
    Remove the irrelevant spaces from \ifmknamesc – daleif Jan 14 at 15:51
2

The macro

\def\ifmknamesc{ \ifboolexpr{ test {\ifcurrentname{author}} } }

leaves spaces behind.

If changed to

\def\ifmknamesc{\ifboolexpr{ test {\ifcurrentname{author}}}}

the spaces disappear

  • Thanks a lot! This solved my problem. – TeXlearner Jan 14 at 16:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.