
當我使用 Roboto 字體時,參考書目編號的大小不相等:使用這個最小的範例
\documentclass{article}
\usepackage[backend=bibtex,style=ieee, sorting=none]{biblatex}
\usepackage[sfdefault]{roboto}
\begin{filecontents*}{./example.bib}
@article{nice,
author={B. C. Dull},
title={All functions are {$C^{\infty}$}},
journal={J. False Results},
year={2033},
}
@article{nice2,
author={B. C. Dull},
title={All functions are {$C^{\infty}$}},
journal={J. False Results},
year={2033},
}
\end{filecontents*}
\addbibresource{example.bib}
\begin{document}
Test~\cite{nice,nice2}.
\printbibliography
\end{document}
輸出是這樣的:
如何使它們大小相等?
答案1
您可以在任何地方使用表格數字,可以透過使用roboto
以下tabular
選項載入套件來實現:
\usepackage[sfdefault,tabular]{roboto}
或者您可以透過在加載後添加以下內容來更改參考書目中標籤的數字類型biblatex
:
為了pdflatex
\DeclareFieldFormat{labelnumber}{%
\ifbibliography
{\fontfamily{Roboto-TLF}\selectfont}
{}#1}
對於xelatex
或lualatex
\DeclareFieldFormat{labelnumber}{%
\ifbibliography
{\addfontfeatures{Numbers=Monospaced}}
{}#1}