4

In this thread I asked about how to produce a bibliography with a different style compared to the one I had in footnotes. Working on, I noticed that something goes wrong (in bibliography, not in footnotes) with spaces at the second occurrence of the same editor. In my MWE I miss a space between the Id. and the bibstring "editor".

This is what I get ATM:

Id.(Hrsg.), Photius. De Spiritus Sancti Mystagogia, G. J. Manz, Ratisbonae 1857 (Patrologia Series Graeca 102), coll. 279-401.

But I would like to have:

Id. (Hrsg.), Photius. De Spiritus Sancti Mystagogia, G. J. Manz, Ratisbonae 1857 (Patrologia Series Graeca 102), coll. 279-401.

Any ideas about how to fix this issue?

MWE:

% !BIB TS-program = biber
% !BIB program = biber
% !TEX encoding = UTF-8 Unicode
% !TeX TS-program = xelatexmk

\begin{filecontents}{archivio.bib}


@book{Her:Mon,
    Address = {Ratisbonae},
    Editor = {Joseph Hergenröther},
    Langid = {german},
    Publisher = {Manz},
    Title = {Monumenta graeca ad Photium},
    Year = {1869}}

@book{Foz:Mys,
    Address = {Ratisbonae},
    Editor = {Joseph Hergenröther},
    Langid = {german},
    Pages = {coll. 279-401},
    Publisher = {G. J. Manz},
    Series = {Patrologia Series Graeca},
    Title = {Photius. De Spiritus Sancti Mystagogia},
    Number = {102},
    Year = {1857}}


\end{filecontents}

\documentclass[11pt, openany]{book}
\usepackage{polyglossia}
\setmainlanguage[babelshorthands=true]{italian}
\setotherlanguages{latin, english, french, german}

\usepackage[]{csquotes}
\usepackage{xpatch}
\usepackage[style=verbose-trad2,
            language=auto,
            ibidpage=true,
            autolang=other,% use new option name
            useprefix=true,
            giveninits=true,
            indexing=true,% or cite?
            citepages=separate,%
            dateabbrev=false,
            backend=biber,
        ]{biblatex}

\DeclareFieldFormat[book, inbook, incollection, inproceedings]{volume}{#1}

% This is to kill a comma between Editor and (Ed.)
\DeclareDelimFormat{editortypedelim}{\addspace}
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\DeclareDelimFormat{translatortypedelim}{\addspace}
\DeclareFieldFormat{translatortype}{\mkbibparens{#1}}
\renewcommand*{\newunitpunct}{\addcomma\space}
\xpatchbibmacro{name:andothers}{%
  \bibstring{andothers}%
}{%
  \bibstring[\emph]{andothers}%
}{}{}


\NewBibliographyString{ibidemloccit,ibidemnoloccit}

\newcommand*{\mklangidem}[1]{%
  \DefineBibliographyStrings{#1}{%   era \DefineBibliographyStrings{italian}{%
    idem   = {Id\adddot},
    idemsm = {Id\adddot},
    idemsf = {Ead\adddot},
    idemsn = {Id\adddot},
    idempm = {Id\adddot},
    idempf = {Id\adddot},
    idempn = {Id\adddot},
    idempp = {Id\adddot},
    ibidemloccit   = {\mkbibemph{\autocap{i}bid\adddot}},
    ibidemnoloccit = {Ivi},
    opcit  = {cit\adddot}, %tolto \nopunct per avere la virgola 30 mag 2018
    loccit = {loc\adddotspace cit\adddot},
  }}

\forcsvlist{\mklangidem}{english,italian, german}

%%%%%%%%%%%%%%%%%%%%%%%%%%%CAMPO EDITOR TRA PARENTESI CON EDD%%%%%%%%%%%

\DefineBibliographyStrings{german}{                 
    editor = {Hrsg\adddot},
    editors={Hrsg\adddot},
    byeditor = {Hrsg\adddot},
    page = {p\adddot},
    pages = {pp\adddot},
    andothers = {et al\adddot},
    opcit  = {cit\adddot} %tolto \nopunct per avere la virgola 30 mag 2018
}



\xpatchbibmacro{author}
  {\printnames{author}}
  {\ifcitation
     {\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
       {\usebibmacro{cite:idem}}
       {\printnames{author}}}
     {\printnames{author}}}
  {}{}
\xpatchbibmacro{bbx:editor}
  {\printnames{editor}}
  {\ifcitation
     {\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
        {\usebibmacro{cite:idem}}
        {\printnames{editor}}}
     {\printnames{editor}}}
  {}{}
\xpatchbibmacro{bbx:translator}
  {\printnames{translator}}
  {\ifcitation
     {\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
        {\usebibmacro{cite:idem}}
        {\printnames{translator}}}
     {\printnames{translator}}}
  {}{}

\renewbibmacro*{cite:ibid}{%
  \printtext{%
    \bibhyperlink{cite\csuse{cbx@lastcite@\thefield{entrykey}}}{%
      \ifloccit
        {\bibstring[\mkibid]{ibidemloccit}%
         \global\toggletrue{cbx:loccit}}
        {\bibstring[\mkibid]{ibidemnoloccit}}}}}



\renewbibmacro*{publisher+location+date}{%
  \printlist{publisher}%
  \setunit*{\addcomma\space}%
  \printlist{location}%
  \setunit*{\space}%
  \usebibmacro{date}%
  \newunit}

\renewbibmacro*{series+number}{%
  \iffieldundef{series}
    {}
    {\setunit{\addspace}%
     \printtext[parens]{%
       \printfield{series}%
       \setunit*{\addspace}%
       \printfield{number}}}%
  \newunit}




% modified driver
\DeclareBibliographyDriver{book}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/editor+others/translator+others}%
  \setunit{\labelnamepunct}\newblock
  \usebibmacro{maintitle+title}%
    \newunit
  \iffieldundef{maintitle}
    {\printfield{volume}%
     \printfield{part}}
    {}%
  \newunit
  \printlist{language}%
  \newunit\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{edition}%
  \newunit
  \printfield{volumes}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \usebibmacro{publisher+location+date}%
  \newunit\newblock
  \usebibmacro{series+number}%
  \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}}


%%%%%%%%%%%% SCHIZOFRENIA---> CAMBIO DI STILE QUANDO SI STAMPA LA BIBLIOGRAFIA%%%%%%%%%%%%%%%%

\AtBeginBibliography{\renewcommand*{\revsdnamepunct}{}}                                 % No virgola tra nome e cognome
\AtBeginBibliography{\renewcommand*{\bibnamedash}{\bibstring[\mkibid]{idem\thefield{gender}}}}

\DeclareNameFormat{sortname}{%                                                          %Nomi smallcaps, ma non editor!
  \renewcommand{\mkbibnamefamily}[1]{\textsc{\MakeLowercase{##1}}}%
  \renewcommand{\mkbibnamegiven}[1]{\textsc{\MakeLowercase{##1}}}%
  \ifgiveninits
    {\usebibmacro{name:given-family}
      {\namepartfamily}
      {\namepartgiveni}
      {\namepartprefix}
      {\namepartsuffix}}
    {\usebibmacro{name:given-family}
      {\namepartfamily}
      {\namepartgiven}
      {\namepartprefix}
      {\namepartsuffix}}%
  \usebibmacro{name:andothers}}


\addbibresource{archivio.bib}  

\begin{document}
First, I'm citing this\footcite{Her:Mon}\\
Then same editor\footcite{Foz:Mys}
\printbibliography
\end{document}
6

\bibnamedash is normally not supposed to print text, it is assumed to be just punctuation. Due to that assumption some punctuation commands are moved such that they are not printed after \bibnamedash to avoid weird double punctuation. If \bibnamedash should print text we need to modify the macros that call it a bit to allow the punctuation macros to come after \bibnamedash.

These redefinitions are based on the original definitions of these macros from authortitle.bbx. authoryear styles need a different modification.

\makeatletter
\renewbibmacro*{author}{%
  \ifboolexpr{
    test \ifuseauthor
    and
    not test {\ifnameundef{author}}
  }
    {\usebibmacro{bbx:dashcheck}
       {\bibnamedash}
       {\printnames{author}%
        \usebibmacro{bbx:savehash}}%
     \setunit{\printdelim{authortypedelim}}%
     \usebibmacro{authorstrg}}
    {\global\undef\bbx@lasthash}}

\renewbibmacro*{bbx:editor}[1]{%
  \ifboolexpr{
    test \ifuseeditor
    and
    not test {\ifnameundef{editor}}
  }
    {\usebibmacro{bbx:dashcheck}
       {\bibnamedash}
       {\printnames{editor}%
        \usebibmacro{bbx:savehash}}%
     \setunit{\printdelim{editortypedelim}}%
     \usebibmacro{#1}%
     \clearname{editor}}
    {\global\undef\bbx@lasthash}}

\renewbibmacro*{bbx:translator}[1]{%
  \ifboolexpr{
    test \ifusetranslator
    and
    not test {\ifnameundef{translator}}
  }
    {\usebibmacro{bbx:dashcheck}
       {\bibnamedash}
       {\printnames{translator}%
        \usebibmacro{bbx:savehash}}%
     \setunit{\printdelim{translatortypedelim}}%   
     \usebibmacro{#1}%
     \clearname{translator}}
    {\global\undef\bbx@lasthash}}
\makeatother

As far as I can see there is no benefit from using \AtBeginBibliography{\renewcommand*{\bibnamedash}{\bibstring[\mkibid]{idem\thefield{gender}}}} over

\renewcommand*{\bibnamedash}{\bibstring[\mkibid]{idem\thefield{gender}}}

so you can drop the \AtBeginBibliography here.

enter image description here

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.