Altere o tamanho da fonte da saída do siunitx

Altere o tamanho da fonte da saída do siunitx

Ao escrever números com unidades usando o pacote siunitx, \SI{1064}{\um}os números e unidades são visivelmente menores que o texto, porém o mu parece ter o tamanho correto. Estou usando Verdana como fonte de texto principal e fonte LaTeX padrão para matemática. MiKTeX e compilado com LuaLaTeX.

MWE

\documentclass[10pt,a4paper]{article}
\usepackage{siunitx}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}
\setsansfont{Verdana} % Setting sans font
\renewcommand*{\familydefault}{\sfdefault} % Making sans serif font the default
\linespread{1.16} % Increasing the linespacing
\usepackage{unicode-math}

\begin{document} 
This is some text \SI{1064}{\um} m $m$
\end{document}

Texto sem escala

Eu tento escalar usando\defaultfontfeatures{Scale=MatchLowercase}

\documentclass[10pt,a4paper]{article} \usepackage{siunitx}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}
\setsansfont{Verdana} % Setting sans font
\renewcommand*{\familydefault}{\sfdefault} % Making sans serif font the default
\linespread{1.16}        % Increasing the linespacing
\usepackage{unicode-math}
\defaultfontfeatures{Scale=MatchLowercase}

\begin{document}
This is some text with scaling \SI{1064}{\um} m $m$
\end{document}}

Texto com escala

Os números e o m escritos no modo matemático tornaram-se maiores, mas o m nas unidades não. Eu tentei \sisetup{detect-all}, mas isso apenas muda tudo o que está escrito \SIem Verdana, o que não é o que procuro. Existe uma maneira de aumentar o tamanho da fonte nas unidades?

Responder1

Seu problema é que a fonte do modo matemático tem um tamanho diferente da fonte do corpo. Eu consertei isso dimensionando, por exemplo

\documentclass[10pt,a4paper]{article}
\usepackage{siunitx}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures = TeX, Scale = MatchLowercase}
\setsansfont{Verdana} % Setting sans font
\renewcommand*{\familydefault}{\sfdefault} % Making sans serif font the default
\usepackage{unicode-math}
\begin{document} 
This is some text \qty{1064}{\um}.
\end{document}

Responder2

Minha sugestão seria carregar siunitxcom a opção mode=text. Dessa forma, a fonte do texto (aqui: Verdana) será utilizada automaticamente nas diretivas \nume .\unit

insira a descrição da imagem aqui

% !TEX TS-program = lualatex
\documentclass{article} 

\usepackage{unicode-math}
\setmainfont{Verdana} % main font

\usepackage[mode=text]{siunitx}

\begin{document}
This is some text \dots\ \qty{1064}{\um}.
\end{document}

Responder3

Inicialmente marquei a resposta de @JosephWright como a solução, mas isso pareceu diminuir a fonte principal (Verdana) para corresponder ao tamanho da fonte matemática.

Então, usando a resposta dele junto com o comentário de @Mico sobre como alterar a fonte matemática principal, encontrei uma solução que parece funcionar:

\documentclass[10pt,a4paper]{article}
\usepackage{siunitx}
\usepackage{unicode-math}

\defaultfontfeatures{Ligatures=TeX}
\setsansfont{Verdana} % Setting sans font
\renewcommand*{\familydefault}{\sfdefault} % Making sans serif font the default
\setmathfont{Cambria Math}[Scale=MatchUppercase] % Setting the maths font and scaling to match Verdana size
\setmathrm{Cambria Math}[Scale=MatchUppercase] % Setting the upright maths font used by siunitx
\newfontfamily{\mufont}{Cambria Math} % Selecting the mu from the Cambria Math font...
\DeclareSIPrefix\micro{\ensuremath{\mufont μ}}{-6} % ...and the selecting it for use with siunitx and make it represent 10^-6

\begin{document}
This is some text \dots\ \qty{1064}{\um}.
\end{document}

Eu precisava definir a fonte matemática vertical para Cambria Math e dimensionar\setmathrm{Cambria Math}[Scale=MatchUppercase]

informação relacionada