4

When I render this code on overleaf:

\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}

I get (note missing ")" in first equation, missing "/" in second and missing "-" in third):

Render

I don't know what I am doing wrong.

4

In the screenshot you posted, the fact that the math font is not a Times Roman clone should be a dead give-away that the stix2 package wasn't loaded properly. You need to provide the instruction \usefonttheme{professionalfonts} before running \usepackage{stix2}.

enter image description here

\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}

Addendum: In case you're wondering what \usefonttheme{professionalfonts} does and/or why it's needed, here's an excerpt from pp. 196 f. of the beamer user guide:

enter image description here enter image description here

Note the final instruction. Do contact the package's maintainer(s) and ask them to add stix2 to the list of font packages which automatically prompt beamer to execute \usefonttheme{professionalfonts}.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.