siunitx는 서체와 크기를 감지하지 못합니다

siunitx는 서체와 크기를 감지하지 못합니다

PNAS의 템플릿을 사용하고 있습니다(http://www.pnas.org/site/authors/LaTex.xhtml) sharelatex에서 다음과 같은 단위를 추가할 때:

\SI{15}{\mL}

첨부된 이미지에서 볼 수 있듯이 크기가 제대로 조정되지 않았습니다.
siunitx의 크기가 제대로 조정되지 않은 예
또한 siunitx가 주변 글꼴을 사용하도록 강제할 수 있는 방법이 있습니까? 나는 서문에서 다음을 사용하려고 했습니다.

\sisetup{detect-weight=true, detect-family=true}

운없이.
어떤 도움이라도 주시면 감사하겠습니다.

편집 1: 최소한의 예제가 추가되었습니다.

\documentclass{pnastwo}
\usepackage[dvips]{graphicx}
\usepackage{amssymb,amsfonts,amsmath}
\usepackage{gensymb,fixltx2e}
\usepackage{fontspec}
\usepackage{siunitx}
\sisetup{detect-weight=true, detect-family=true}

\begin{document}
\begin{article}
\begin{materials}
This is a minimal example. The following units \SI{15}{\mL} do not render with the same typeface and size as the surrounding text. 
\end{materials}
\end{article}
\end{document}

답변1

클래스는 글꼴을 정의하기 위해 nfss를 사용하지 않으므로 siunitx는 글꼴을 감지할 기회가 전혀 없습니다. (그리고 부수적인 경고로 ASCII가 아닌 문자에 주의하십시오. xelatex/lualatex와 결합하면 잘못되거나 잘못 나올 수 있습니다. 모두 함께 누락되었습니다). 글꼴 명령을 다시 정의하여 문제를 해결할 수 있습니다.

\documentclass{pnastwo}

\usepackage{graphicx}
\usepackage{amssymb,amsfonts,amsmath}
\usepackage{gensymb,fixltx2e}
\usepackage{fontspec}
\renewcommand\materialfont{\sffamily\fontsize{7pt}{\baselineskip}\selectfont}
\usepackage{siunitx}
\sisetup{detect-weight=true, detect-family=true}

\begin{document}
\begin{article}
\begin{materials}
This is a minimal example. The following units \SI{15}{\mL} do not render with the same typeface and size as the surrounding text.
\end{materials}
\end{article}
\end{document}

답변2

(댓글이 너무 길어서 일종의 답변으로 게시되었습니다.)

문서 설정에 지금까지 알려주지 않은 뭔가가 있을 것입니다. 문서 pnastwo클래스 자체는 적어도 패키지의 매크로에 영향을 미치는 방식으로 글꼴을 엉망으로 만들지 않습니다 \siunitx.

우리에게 알려주십시오 - 이상적으로는MWE-- 텍스트 글꼴을 산세리프로 변경하는 방법.

여기에 이미지 설명을 입력하세요

\documentclass{pnastwo}
\usepackage[detect-family=true]{siunitx}
\begin{document}
\sffamily
abc

\SI{15}{\milli\liter}
\end{document}

관련 정보