Ich bin neu hier, also bitte haben Sie Geduld mit mir. Ich möchte dieFamilienname, Nachnamedesnur Erstautorin der Bibliografie fett gedruckt, d. h. im MWE möchte ich, dass „Fox“ nur in der Bibliografie (nicht im Zitat) fett gedruckt ist.
MWE:
\documentclass[a4paper,twoside,hidelinks]{article}
\usepackage[backend=biber,
natbib=true,
uniquename=false,
uniquelist=false,
firstinits=true,
style=authoryear,
sorting=nyt,
maxcitenames=2,
minbibnames=1,
maxbibnames=100,
block=none]{biblatex}
\bibliography{sample.bib}
\begin{document}
Here is some sample text \parencite{Fox2011}.
\printbibliography
\end{document}
\RequirePackage{filecontents}
\begin{filecontents}{sample.bib}
@ARTICLE{Fox2011,
author = {Peter Fox and Richard Rabbit and Franc Bird},
title = {Animals are the better humans},
journal = {Horse and Hound},
year = {2011},
volume = {10},
pages = {11--15}
}
\end{filecontents}
Antwort1
Wir definieren ein neu bibmacro
. Die Änderungen sind eigentlich sehr gering: das Einfügen einer Prise von \mkbibbold
.
\renewbibmacro*{name:last-first}[4]{%
\ifuseprefix
{\usebibmacro{name:delim}{#3#1}%
\usebibmacro{name:hook}{#3#1}%
\ifblank{#3}{}{%
\ifcapital
{\mkbibbold{\mkbibnameprefix{\MakeCapital{#3}}\isdot}}
{\mkbibbold{\mkbibnameprefix{#3}\isdot}}%
\ifpunctmark{'}{}{\bibnamedelimc}}%
\mkbibbold{\mkbibnamelast{#1}\isdot}%
\ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}%
\ifblank{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibnamefirst{#2}\isdot}}
{\usebibmacro{name:delim}{#1}%
\usebibmacro{name:hook}{#1}%
\mkbibbold{\mkbibnamelast{#1}\isdot}%
\ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}%
\ifblank{#2#3}{}{\revsdnamepunct}%
\ifblank{#2}{}{\bibnamedelimd\mkbibnamefirst{#2}\isdot}%
\ifblank{#3}{}{\bibnamedelimd\mkbibnameprefix{#3}\isdot}}}
Antwort2
Ich denke, dies lässt sich am besten mit einem speziellen Namensformat erreichen.
Die Idee besteht darin, das Makro \mkbibnamefamily
, das den Familiennamen nur für den Vornamen druckt, neu zu definieren und es dann wiederherzustellen.
Standardmäßig authoryear
wird verwendet family-given/given-family
, also definieren wir family-given/given-family-bf
.
\DeclareNameFormat{family-given/given-family}{%
\ifnumequal{\value{listcount}}{1}
{\renewcommand*{\mkbibnamefamily}[1]{\mkbibbold{##1}}%
\ifgiveninits
{\usebibmacro{name:family-given}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefix}
{\namepartsuffix}}
{\usebibmacro{name:family-given}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}%
\ifboolexpe{%
test {\ifdefvoid\namepartgiven}
and
test {\ifdefvoid\namepartprefix}}
{}
{\usebibmacro{name:revsdelim}}}
{\renewcommand*{\mkbibnamefamily}[1]{##1}%
\ifgiveninits
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefix}
{\namepartsuffix}}
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}}%
\usebibmacro{name:andothers}}
Wenn Sie alle Namen infamily-given
\DeclareNameFormat{family-given-fb}{%
\ifnumequal{\value{listcount}}{1}
{\renewcommand*{\mkbibnamefamily}[1]{\mkbibbold{##1}}}
{\renewcommand*{\mkbibnamefamily}[1]{##1}}%
\ifgiveninits
{\usebibmacro{name:family-given}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefix}
{\namepartsuffix}}
{\usebibmacro{name:family-given}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}%
\usebibmacro{name:andothers}}
Odergiven-family
\DeclareNameFormat{given-family-fb}{%
\ifnumequal{\value{listcount}}{1}
{\renewcommand*{\mkbibnamefamily}[1]{\mkbibbold{##1}}}
{\renewcommand*{\mkbibnamefamily}[1]{##1}}%
\ifgiveninits
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefix}
{\namepartsuffix}}
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}%
\usebibmacro{name:andothers}}
Dann verwenden Sie eines der oben genannten Formate über \DeclareNameAlias{sortname}{format}
beispielsweise
\DeclareNameAlias{sortname}{family-given-fb}
MWE
\documentclass{article}
\usepackage[backend=biber, style=authoryear]{biblatex}
\DeclareNameAlias{sortname}{family-given-fb}
\DeclareNameFormat{family-given-fb}{%
\ifnumequal{\value{listcount}}{1}
{\renewcommand*{\mkbibnamefamily}[1]{\mkbibbold{##1}}}
{\renewcommand*{\mkbibnamefamily}[1]{##1}}%
\ifgiveninits
{\usebibmacro{name:family-given}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefix}
{\namepartsuffix}}
{\usebibmacro{name:family-given}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}%
\usebibmacro{name:andothers}}
\bibliography{biblatex-examples.bib}
\begin{document}
Here is some sample text \parencite{baez/article}.
\printbibliography
\end{document}
Bearbeitet für biblatex
>= 3.3, die alte Version ist im Bearbeitungsverlauf zu finden. Übrigens sollte es \mkbibnamefamily
in zukünftigen Versionen (also > 3.11) nicht notwendig sein, die alte Definition wiederherzustellen, da die Namen gruppiert werden solltenhttps://github.com/plk/biblatex/pull/731.