0

I would like to update some bibliography modifications I got with an older LaTeX template. I do know that there where some changes with BibLaTeX 3.3, but I seem to be missing something since latex still tells me "Illegal parameter number in definition of \blx@defformat@d.". Maybe one of you can point me in the direction what has changed besides what's already mentioned in another thread.

\DeclareFieldFormat[inreference]{title}{\bibstring{inrefstring}\addspace#1}
\renewcommand*{\newunitpunct}{\addcomma\space}   %Comma instead of Point
\DeclareFieldFormat[article]{title}{{#1}} %keine Anführungszeichen mehr
\DeclareNameFormat{sortname}{
{\usebibmacro{name:given-family}{#1}{#3}{#5}{#7}}}
\AtBeginBibliography{%Bold Authors in Literature
  \renewcommand*\mkbibnamegiven[1]{\bfseries{#1}}
  \renewcommand*\mkbibnamefamily[1]{\bfseries{#1}}
  \renewcommand*\mkbibnameprefix[1]{\bfseries{#1}}
  \renewcommand*\mkbibnameaffix[1]{\bfseries{#1}}
  \DeclareFieldFormat{year}{\bfseries{#1}}
  \DeclareFieldFormat{labelyear}{\bfseries{\mkbibemph{\mknumalph{#1}}}}
}
  • https://tex.stackexchange.com/questions/299036/biblatex-3-3-name-formatting – Joseph Wright Jan 12 '22 at 12:40
  • That's the thread I meant. But the only changes I saw there don't seem to be enough to satisfy the compiler. As you can see I already made these changes. The question is what am I missing? – Richard Rosner Jan 12 '22 at 14:47

1 Answers1

1

The general advice for changes to pre-3.3 code is at Biblatex 3.3 name formatting. The main idea is that you have to replace arguments (like #1) by macros (like \namepartfamily). Here, however, some things are easier.


\DeclareNameFormat{sortname}{
{\usebibmacro{name:given-family}{#1}{#3}{#5}{#7}}}

should be

\DeclareNameAlias{sortname}{given-family}

with a reasonably new biblatex. (Even pre-3.3 it would have better been written as \DeclareNameAlias{sortname}{first-last} instead of resorting to \usebibmacro{name:...}.)


\renewcommand*\mkbibnamegiven[1]{\bfseries{#1}}
\renewcommand*\mkbibnamefamily[1]{\bfseries{#1}}
\renewcommand*\mkbibnameprefix[1]{\bfseries{#1}}
\renewcommand*\mkbibnameaffix[1]{\bfseries{#1}}

can be simplified to

\renewcommand*\mkbibcompletename[1]{\mkbibbold{#1}}

Note that \bfseries is a switch that should be used as {\bfseries <text>}. When used as \bfseries{<text>} the bold leaks out. The macro form is \textbf, but its biblatex version is \mkbibbold. So again, this would have been bad style pre-3.3.


\DeclareFieldFormat{labelyear}{\bfseries{\mkbibemph{\mknumalph{#1}}}}

looks extremely suspicious: The year is generally not given in "alphabetic" form. Since biblatex's \mknumalph cannot deal with numbers above 702, this will have never done what the name advertised. Plus, the labelyear format is not actually used, so this has no effect anyway.

moewe
  • 175,683
  • Thanks a lot for explanation. I have now made the suggested changes and it does compile without errors. For the labelyear part, I'm not sure what it's supposed to do. I just left it out. If somebody complains about the results, I can see what needs to be changed then and if necessary ask here again. – Richard Rosner Jan 13 '22 at 12:35