수학 모드 및 siunitx에서 libertine 숫자 사용

수학 모드 및 siunitx에서 libertine 숫자 사용

나는 당신의 도움을 구하기 위해 다시 여기에 왔습니다. 내 문서의 모든 숫자를 동일하게 만들고 싶습니다(텍스트 또는 수학 모드에서). 지금 나 한테있어

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

사이즈 차이도 있으니 참고하세요. 환경에 관계없이 Libertine에서 모든 숫자를 갖는 방법은 무엇입니까? siunitx 동작을 그대로 두고 수학 모드에서 숫자(및 숫자만)의 글꼴만 변경한다는 뜻인가요?

내가 시도하면

\DeclareSymbolFont{numbers}{T1}{LinuxLibertineO}{m}{n}
  \SetSymbolFont{numbers}{bold}{T1}{LinuxLibertineO}{bx}{n}
  \DeclareMathSymbol{0}\mathalpha{numbers}{"30}
  \DeclareMathSymbol{1}\mathalpha{numbers}{"31}
  \DeclareMathSymbol{2}\mathalpha{numbers}{"32}
  \DeclareMathSymbol{3}\mathalpha{numbers}{"33}
  \DeclareMathSymbol{4}\mathalpha{numbers}{"34}
  \DeclareMathSymbol{5}\mathalpha{numbers}{"35}
  \DeclareMathSymbol{6}\mathalpha{numbers}{"36}
  \DeclareMathSymbol{7}\mathalpha{numbers}{"37}
  \DeclareMathSymbol{8}\mathalpha{numbers}{"38}
  \DeclareMathSymbol{9}\mathalpha{numbers}{"39}

LuaLaTex는 그러한 모양이 없다고 불평합니다.

다음은 최소한의 예입니다.

% !Mode:: "TeX:UTF-8"
%
\documentclass[a4paper,11pt]{book}

\usepackage{fontspec}
\usepackage{unicode-math}
\setmainfont{Linux Libertine O}
\addfontfeatures{Numbers={Lining,Monospaced}}
\setsansfont{Linux Biolinum O}
\setmonofont{Consolas}
\setmathfont[math-style=ISO,bold-style=ISO]{Cambria Math}
\usepackage{siunitx}

\begin{document}
Now I have
 \begin{itemize}
    \item Libertine in text mode: 123456789
    \item Libertine using siunitx in text mode: \SI{123456789}{\km\per\hour}
    \item Cambria in math mode: $123456789$
    \item Libertine using siunitx in math mode: $\SI{123456789}{\km\per\hour}$
  \end{itemize}
I would like libertine in math mode too $123456789$.
\end{document} 

답변1

\documentclass[a4paper,11pt]{book}
\usepackage{unicode-math}
\usepackage{libertine}
\addfontfeatures{Numbers={Lining,Monospaced}}
%\setmonofont{Consolas}% not available for me
\setmathfont[math-style=ISO,bold-style=ISO]{Cambria Math}
\setmathfont[range=0048-0057]{Linux Libertine O}
\usepackage{siunitx}

\begin{document}
[ ... ]

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

관련 정보