我在方程式或 pgfplots 中使用 Linux libertine 字体时遇到了一些问题,并尝试过这答案是,但是没有作用。
\documentclass{article}
\usepackage{fontspec}
\usepackage{pgfplots}
\setmainfont{Linux Libertine O}
\setsansfont{Linux Biolinum O}
\usepackage{blindtext}
\begin{document}
\blindtext[1]
\begin{equation}
x = 4 \cdot 3
\end{equation}
\begin{tikzpicture}
\begin{axis}
\addplot {x};
\end{axis}
\end{tikzpicture}
\end{document}
答案1
\documentclass{article}
\usepackage{unicode-math}
\usepackage{pgfplots}
\usepackage{libertine}%% lOADS ROMAN/SANS/MONO
\usepackage{blindtext}
\begin{document}
\blindtext[1]
\begin{equation}
x = 4 \cdot 3
\end{equation}
\begin{tikzpicture}
\begin{axis}
\addplot {x};
\end{axis}
\end{tikzpicture}
\setmathfont[range=\mathit]{LinLibertineOI}
\setmathfont[range={\mathrm,0048-0057}]{LinLibertineO}
%% We now use Libertine for math characters
\begin{equation}
x = 4 \cdot 3
\end{equation}
\begin{tikzpicture}
\begin{axis}
\addplot {x};
\end{axis}
\end{tikzpicture}
\end{document}