1

I am facing a problem regarding using \mathcal in my beamer presentation and could not make none of the solutions proposed for similar cases work.

Here is the content of my presentation.sty file:

% --- Fonts ---
\usefonttheme{professionalfonts}
\usepackage[english]{babel}
\usepackage[round,authoryear]{natbib} 
\usepackage{sourcesanspro}
\usepackage{sourcecodepro}
\usepackage[T1]{fontenc}
\usepackage{amsmath,
amssymb, amsthm, 
eucal, bbold, bm
}
\usepackage{gensymb}
\usepackage{arydshln}

\newcommand*\dif{\mathop{}!\textnormal{\slshape d}} \usepackage[italic,eulergreek,symbolmisc]{mathastext} \usepackage{url}

% Microtypography \usepackage{microtype} \DisableLigatures[f]{encoding = , family = }

% Correct spacing around letters in math \MTsetmathskips{f}{\thinmuskip}{0mu} \MTsetmathskips{y}{\thinmuskip}{0mu} \MTsetmathskips{p}{\thinmuskip}{0mu} \MTsetmathskips{l}{0mu}{\thinmuskip} \MTsetmathskips{j}{\thinmuskip}{\thinmuskip}

% --- Beamer theme --- \usetheme{Boadilla} \usecolortheme[]{seagull} \setbeamercovered{transparent} \setbeamertemplate{navigation symbols}{}

% --- Font sizes and shapes --- \setbeamerfont{title}{size=\huge, series=\scshape} \setbeamerfont{author}{size=\large} \setbeamerfont{frametitle}{series=\scshape} \setbeamertemplate{frametitle}{\MakeLowercase{\insertframetitle}} \setbeamerfont{itemize/enumerate subbody}{size=\normalsize} \setbeamerfont{button}{size=\footnotesize}

% --- Spacing --- \usepackage[onehalfspacing]{setspace} \setbeamertemplate{title page}[default][left,leftskip=-8pt] \addtobeamertemplate{frametitle}{\vskip3mm}{} \setbeamersize{text margin left=5mm,text margin right=5mm}

% --- Color --- \colorlet{myblack}{black!85!} \colorlet{mygray}{gray!60!} \setbeamercolor{title}{fg=myblack} \setbeamercolor{frametitle}{fg=myblack} \setbeamercolor{normal text}{fg=myblack} \setbeamercolor{itemize item}{fg=mygray} \setbeamercolor{itemize subitem}{fg=mygray} \setbeamercolor{enumerate item}{fg=mygray} \setbeamercolor{enumerate subitem}{fg=mygray} \setbeamercolor{footline}{fg=mygray} \setbeamercolor{button}{fg=mygray, bg=white}

% --- Title slide --- \let\oldtitle\title \renewcommand{\title}[1]{\oldtitle[]{\MakeLowercase{#1}\vspace{-5mm}\\color{myblack}{\rule{\textwidth}{2pt}}\vspace{1cm}}}

% Paper information \usepackage{xparse} \NewDocumentCommand{\information}{o g g}{% \author[]{#2% \IfValueT{#3}{\vspace{5mm}\#3}% \IfValueT{#1}{\vspace{5mm}\\color{mygray}{\footnotesize \url{#1}}}% }\date[]{}}

and here is a MWE:

\documentclass[11pt,xcolor={dvipsnames,table},hyperref={pdftex, pdfpagemode=UseNone, hidelinks, pdfdisplaydoctitle=true},usepdftitle=false]{beamer}

\usepackage{presentation} \hypersetup{pdftitle={Presentation Title}} \newcommand{\pdf}{figures.pdf}

\begin{document}

\title{presentation title} \information {first-name last-name} {place and date} \frame[plain]{\titlepage}

\begin{frame}{This is a math slide} \begin{itemize} \item Function: $\mathcal{g}: \mathcal{X} \mapsto \mathcal{y}$ \end{itemize} \end{frame}

\end{document}

I compile it on overleaf (pdfLatex) and here is what it displays:

enter image description here

It would be highly appreciated if you could give me some hints to address this issue.

1 Answers1

2

You need a font that has lower case \mathcal letters. The default (Computer Modern Sans) for Beamer does not have them. (This would also be mentioned in the compilation logs.)

Relatively few fonts have lower case \mathcal. Some previous questions about this include

and include some suggestions on fonts that do have this range, as well as how to load them.

Willie Wong
  • 24,733
  • 8
  • 74
  • 106