使用 biblatex 在投影機中發出小寫字母字體警告

使用 biblatex 在投影機中發出小寫字母字體警告

考慮以下 MWE

\documentclass{beamer}
\usepackage{silence}
\WarningFilter{biblatex}{Patching footnotes failed}

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

\usepackage[style=authoryear-comp,backend=biber]{biblatex}
\addbibresource{biblatex-examples.bib}

\begin{document}
\begin{frame}
  \fullcite{sarfraz}
\end{frame}
\end{document}

這會產生警告:

LaTeX Font Warning: Font shape `T1/lmss/m/sc' in size <10.95> not available
(Font)              Font shape `T1/lmr/m/sc' tried instead on input line 28.

有沒有辦法在不使用silence套件的情況下避免警告?

答案1

消除警告並不是解決辦法:輸出不正確,因為使用了襯線字體而不是無襯線字體。問題是 Latin Modern Sans 字體沒有小型大寫字母變體。

這是你得到的輸出

在此輸入影像描述

這清楚地顯示了錯誤的字體。

重新定義\mkbibacro,改為:

\documentclass{beamer}
\usepackage{silence}
\WarningFilter{biblatex}{Patching footnotes failed}

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

\usepackage[style=authoryear-comp,backend=biber]{biblatex}
\addbibresource{biblatex-examples.bib}

\renewcommand\mkbibacro[1]{{\footnotesize\MakeUppercase{#1}}}

\begin{document}
\begin{frame}
  \fullcite{sarfraz}
\end{frame}
\end{document}

在此輸入影像描述

由於這僅用於首字母縮略詞,因此“錯誤”字體不應該太明顯。

相關內容