biblatex:名称粗体,等用斜体

biblatex:名称粗体,等用斜体

我希望参考书目中的名称以及“et al.”都加粗。但是,我还希望“et al.”用斜体。这似乎行不通。如果我注释掉注释下方的所有内容,它就会起作用%%--names bold。有趣的是,如果我注释掉以下行,它也会起作用\babelfont{rm}{Garamond}同时保留作者的粗体,则也可行。在正文中,斜体在 Garamond 中可以正常工作。

更新:Garamond 根本不提供粗体斜体。如果有人想这样做,有一种方法,我在下面的回答中列出了它。

梅威瑟:

\documentclass[bibliography=leveldown]{scrreprt}

\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}

\babelprovide[main,import,language=Default]{english}
\babelprovide[import,language=Chinese Simplified]{chinese-simplified}


\babelfont{rm}{Garamond}
\babelfont{sf}{Gill Sans MT}
\babelfont[chinese-simplified]{rm}{SimSun}
\babelfont[chinese-simplified]{sf}{SimSun}

%%%---bibliography
\usepackage[
backend=biber,
refsection=chapter,
style=numeric-comp,
giveninits=true,
maxbibnames=3,
date=year,
sorting=none,
isbn=false,
doi=false,
url=false
]{biblatex}

\DefineBibliographyStrings{english}{%
    bibliography = {References},
}

\renewcommand*{\bibfont}{\normalfont\footnotesize}

%%-- et al. in italics
\DefineBibliographyStrings{english}{
    andothers = {\mkbibemph{et\addabbrvspace al\adddot}}
}

%%---names bold
\DeclareNameWrapperFormat{sortname}{\mkbibbold{#1}}
\DeclareNameWrapperAlias{author}{sortname}
\DeclareNameWrapperAlias{editor}{sortname}
\DeclareNameWrapperAlias{translator}{sortname} 

%%--calling bib file
\addbibresource{biblatex-examples.bib}

\begin{document}

    \chapter{Title of a chapter}

    It works with in-text \emph{italics}. But not when citing \fullcite{herrmann}

    \printbibliography  

\end{document}

答案1

Garamond 不提供粗斜体选项。可以从以下网址下载 Adob​​e Garamond 粗斜体字体http://fontsgeek.com/fonts/Adobe-Garamond-Bold-Italic并通过添加到序言中将其设置为粗体斜体选项\setmainfont[BoldItalicFont={AGaramond-Bolditalic}]{Garamond}。但这仅适用于单语文档。

梅威瑟:

\documentclass[bibliography=leveldown]{scrreprt}

\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{fontspec}

\setmainfont[
BoldItalicFont={AGaramond-Bolditalic}
]{Garamond}     

%%%---bibliography
\usepackage[
backend=biber,
refsection=chapter,
style=numeric-comp,
giveninits=true,
maxbibnames=3,
date=year,
sorting=none,
isbn=false,
doi=false,
url=false
]{biblatex}

\DefineBibliographyStrings{english}{%
    bibliography = {References},
}

\renewcommand*{\bibfont}{\normalfont\footnotesize}

%%-- et al. in italics
\DefineBibliographyStrings{english}{
    andothers = {\mkbibemph{et\addabbrvspace al\adddot}}
}

%%---names bold
\DeclareNameWrapperFormat{sortname}{\mkbibbold{#1}}
\DeclareNameWrapperAlias{author}{sortname}
\DeclareNameWrapperAlias{editor}{sortname}
\DeclareNameWrapperAlias{translator}{sortname} 

%%--calling bib file
\addbibresource{biblatex-examples.bib}

\begin{document}
\chapter{Title of a chapter}
It works with in-text \emph{italics} and with
\textbf{\emph{bold italics}}.
Also when citing \fullcite{herrmann}

\printbibliography
\end{document}

相关内容