
當我在背面呈現此程式碼時:
\documentclass{beamer}
\mode<presentation> {
\setbeamertemplate{footline}[page number]
\setbeamertemplate{navigation symbols}{}
}
\usepackage{appendixnumberbeamer}
\usepackage{stix2}
\usepackage{url}
\usepackage{media9}
\usepackage[croatian]{babel}
\usepackage{graphicx} % Allows including images
\usepackage{booktabs} % Allows the use of \toprule, \midrule and \bottomrule in tables
\usepackage{amsmath}
\def\DJ{{\fontencoding{T1}\selectfont\char208}}
\begin{document}
\begin{frame}
\frametitle{some text}
\begin{itemize}
\item $ \mu_0 M = \chi_p\left(B_a + B_E \right)$
\item $\chi_p= C / T$
\item lalalaal:
\begin{equation}
\chi = \frac{M}{B_a} = \frac{C}{T-C\lambda}.
\end{equation}
\end{itemize}
\end{frame}
\end{document}
我得到(注意第一個方程中缺少“)”,第二個方程中缺少“/”,第三個方程中缺少“-”):
我不知道我做錯了什麼。
答案1
在您發布的螢幕截圖中,數學字體是不是Times Roman 的克隆應該是一個明顯的洩露,表明stix2
包沒有正確加載。您需要\usefonttheme{professionalfonts}
在運行之前提供指令\usepackage{stix2}
。
\documentclass{beamer}
\mode<presentation> {
\setbeamertemplate{footline}[page number]
\setbeamertemplate{navigation symbols}{}
}
\usepackage{appendixnumberbeamer}
\usepackage{xurl}
\usepackage{media9}
\usepackage[croatian]{babel}
\usepackage{graphicx} % Allows including images
\usepackage{booktabs} % Allows the use of \toprule, \midrule and \bottomrule in tables
\usepackage{amsmath}
\def\DJ{{\fontencoding{T1}\selectfont\char208}}
\usefonttheme{professionalfonts}
\usepackage{stix2}
\begin{document}
\begin{frame}[t]
\frametitle{some text}
\begin{itemize}
\item $\mu_0 M = \chi_p(B_a + B_E )$
\item $\chi_p= C / T$
\item lalalaal:
\begin{equation}
\chi = \frac{M}{B_a} = \frac{C}{T-C\lambda}.
\end{equation}
\end{itemize}
\end{frame}
\end{document}
附錄:如果您想知道它的\usefonttheme{professionalfonts}
作用和/或為什麼需要它,請參閱第 196 f 頁的摘錄。使用者指南的內容beamer
:
請注意最後的說明。請聯絡包的維護者並要求他們新增到自動提示執行的stix2
字體包清單中。beamer
\usefonttheme{professionalfonts}