Beamer 风格主题的数学格式不正确

Beamer 风格主题的数学格式不正确

我正在这里准备一个数学演讲,在格式方面遇到了一些问题。我大学的主题似乎强制使用 Arial(我觉得还可以),但这也影响了数学符号和字母的外观。以下是一个例子:我写Most annoying are $\dot x$ and $L^1(0,T;\mathbb U)$并得到

在此处输入图片描述

为什么这么\mathbb U大?

以下是示例文件:

\documentclass[aspectratio=43]{beamer}
\usepackage{csquotes}
\usepackage{xcolor}
\usepackage{graphicx}

\title{I'm a Title}
\author{T. Author}
\institute{Great Uni}
\date{\today}

\def\footercontent{\insertsection}

% Load theme
\usetheme{TUIl}



\begin{document}
\titleframe

\frame{
    \frametitle{Outline}

    Hi folks. Try this: $\dot x$ and $\mathbb U$, while U.
}

以下是四个主题文件:

beamerthemeTUIl.sty:

\mode<presentation>

% If you don't intend to use pictures in the first and last frame, you can remove the following two lines
\RequirePackage{tikz} % (tikz is needed for absolute placement independent of aspect ratio)
\usetikzlibrary{calc, positioning}

% Don't edit the text below

% No monospace font for URLs
\RequirePackage{url}
\urlstyle{same}

\RequirePackage{xcolor}
\RequirePackage{ifthen}

% interpret empty string for pictures as undefined
\newcommand{\undefineEmpty}[1]{
    \ifdefined#1
        \ifthenelse{\equal{#1}{}}{
            \let #1 \undefined
        }{}
    \fi
}
\undefineEmpty{\titleimage}
\undefineEmpty{\lastimage}

\ifthenelse{ % If aspect ratio is 4:3
    \lengthtest{\dimexpr\paperwidth*254/7227\relax=12.8pt}
    \AND
    \lengthtest{\dimexpr\paperheight*254/7227\relax=9.6pt}
}{ % define dimensions specific to 4:3 aspect ratio
    \def\frametitlev{2.5mm}
    \def\framesubtitlev{1mm}
    \def\bottompicscale{1.3}
    \def\footerdp{6mm}
    \def\footerht{7mm}

    % scale down font
    \def\fontscale{0.8}

    % set global margins
    \setbeamersize{text margin left=7mm,text margin right=5mm}
    \def\beamerleftmargin{7mm}
}{ % define geometry specific to 16:9/16:10 aspect ratio
    \def\frametitlev{0mm}
    \def\framesubtitlev{2.5mm}
    \def\bottompicscale{1}
    \def\footerdp{5mm}
    \def\footerht{6mm}

    % increase margins
    \def\fontscale{1}
    \renewcommand{\baselinestretch}{1.1}

    % set margin for itemize
    \let\olditemize=\itemize
    \let\endolditemize=\enditemize
    \renewenvironment{itemize}{\olditemize \itemsep1mm \parskip1mm}{\endolditemize}

    % set margin for enumerate
    \let\oldenum=\enumerate
    \let\endoldenum=\endenumerate
    \renewenvironment{enumerate}{\oldenum \itemsep1mm \parskip1mm}{\endoldenum}

    % set margin for description
    \let\olddescr=\description
    \let\endolddescr=\enddescription
    \renewenvironment{description}{\olddescr \itemsep1mm \parskip1mm}{\endolddescr}

    % set global margins
    \setbeamersize{text margin left=8mm,text margin right=5mm}
    \def\beamerleftmargin{8mm}
}

\ifdefined\titlesize\else
    \def\titlesize{18}
\fi
\ifdefined\subtitlesize\else
    \def\subtitlesize{13}
\fi

\ifdefined\Umathchardef
    % If XeLaTeX or LuaTeX, setup fontspec
    % First try Arial, then Helvetica and TeX Gyre Heros, last fallback option is Liberation Sans
    \usepackage{fontspec}
    \IfFontExistsTF{Arial} {
        \setsansfont[
            Ligatures=TeX,
            Scale=\fontscale,
            BoldFont={Arial Bold},
            ItalicFont={Arial Italic},
            BoldItalicFont={Arial Bold Italic}
        ]{Arial}
    }{
        \IfFontExistsTF{Helvetica} {
            \setsansfont[
                Ligatures=TeX,
                Scale=\fontscale,
                BoldFont={Helvetica Bold},
                ItalicFont={Helvetica Italic},
                BoldItalicFont={Helvetica Bold Italic}
            ]{Helvetica}
        }{
            \IfFontExistsTF{TeX Gyre Heros} {
                \setsansfont[
                    Ligatures=TeX,
                    Scale=\fontscale,
                    BoldFont={TeX Gyre Heros Bold},
                    ItalicFont={TeX Gyre Heros Italic},
                    BoldItalicFont={TeX Gyre Heros Bold Italic}
                ]{TeX Gyre Heros}
            }{
                \setsansfont[
                    Ligatures=TeX,
                    Scale=\fontscale,
                    BoldFont={Liberation Sans Bold},
                    ItalicFont={Liberation Sans Italic},
                    BoldItalicFont={Liberation Sans Bold Italic}
                ]{Liberation Sans}
            }
        }
    }
\else
    % if fontspec is not available, include the font packages accordingly
    \usepackage[T1]{fontenc}
    % Only use arial if installed, else fall back to hevetica
    \IfFileExists{uarial.sty}{
        \RequirePackage[scaled=\fontscale]{uarial}
    }{
        \RequirePackage[scaled=\fontscale]{helvet}
    }
\fi

% Define picture placement on first and last frame (not intended to be used manually)
\newcommand{\bottompic}[2]{
    \usebackgroundtemplate{
        \begin{tikzpicture}[remember picture,overlay]
            \node[text width=\paperwidth, anchor=south west,inner sep=0pt] (A) at ($(current page.south west)+(-0.2pt,\dimexpr{\footerdp + \footerht + 0.4mm})$) {
                \includegraphics[width=\bottompicscale\paperwidth]{#1} % Include picture
            };
            \node[text width=\paperwidth](B)[above=0 mm of A]{ % Add text above picture
                \hspace{\beamerleftmargin}\parbox{0.9\textwidth}{
                    \textcolor{TUIl-grey}{\tiny #2}
        }
            };
        \end{tikzpicture}
    }
}

% User commands
% Creates the titlepage (Extra command needed because bottompic needs to be set before creating the frame)
\newcommand{\titleframe}{
    {
        \ifdefined\titleimage
            \bottompic{\titleimage}{} %<- Don't change this
        \fi
        \frame {
            \titlepage
        }
    }
}

\newcommand{\imageframe}[6][TUIl-orange]{
    {
        % Set background picture
        \usebackgroundtemplate{
            \vbox to \paperheight{
                \vspace{-#6}
                \hspace{\dimexpr #5 - 0.8mm \relax}
                \includegraphics[width=#4\paperwidth]{#2}
            }
        }
        % Set color of the title
        \setbeamercolor{frametitle}{fg=#1}

        % Create frame
        \frame{
            \frametitle{#3}
        }
    }
}

\newcommand{\lastframe}[3]{
    {
        % Redefine subtitle (unset bfseries)
        \setbeamerfont{framesubtitle}{size*={9}{11}\selectfont\normalfont}
        \ifdefined\lastimage
            \bottompic{\lastimage}{#3}
        \fi

        % Redefine frame title to have a larger gap between title and subtitle
        \setbeamertemplate{frametitle}{
            \vspace{\frametitlev}
          \usebeamerfont{frametitle}\usebeamercolor[fg]{frametitle}\insertframetitle

          \vspace{5mm}
          \usebeamerfont{framesubtitle}\usebeamercolor[fg]{framesubtitle}\insertframesubtitle
        }

        % Create frame
        \frame{
            \ifdefined\lastimage
                \frametitle{#1}
                \framesubtitle{#2}
            \else
                \usebeamerfont{frametitle}\usebeamercolor[fg]{frametitle}#1
                \vspace{5mm}

                \usebeamerfont{framesubtitle}\usebeamercolor[fg]{framesubtitle}#2
            \fi
        }
    }
}

\newcommand{\titlefont}[1]{
    \textcolor{TUIl-blue}{\textbf{#1}}
}

% Include other sty files
\useinnertheme{TUIl}
\useoutertheme{TUIl}
\usecolortheme{TUIl}

\mode<all>

beamerouterthemeTUIl.sty:

% Remove beamer navigation bar
\beamertemplatenavigationsymbolsempty

% footer/footline definition
\setbeamertemplate{footline}{
  \color{TUIl-green}{\rule{\textwidth}{0.3pt}} % Draw line
  \begin{beamercolorbox}[wd=\textwidth, dp=\footerdp, ht=\footerht]{footer}
    \begin{minipage}[t]{0.125\paperwidth} % Page number
      \hspace{7mm}
      \insertpagenumber
    \end{minipage}
    \begin{minipage}[t]{0.5\paperwidth} % Footer content
      \footercontent
    \end{minipage}
    \hfill
    \begin{minipage}[t]{42mm} % Logo
      \vspace{-5mm}
      \includegraphics[scale=.6]{images/tuil-logo.pdf}
    \end{minipage}
  \end{beamercolorbox}
}

beamerinnerthemeTUIls.sty

% frame title
\setbeamertemplate{frametitle}{
  \vspace{\frametitlev}
  \usebeamerfont{frametitle}\usebeamercolor[fg]{frametitle}\insertframetitle

  \vspace{\framesubtitlev}
  \usebeamerfont{framesubtitle}\usebeamercolor[fg]{framesubtitle}\insertframesubtitle
}

% title page
\setbeamertemplate{title page}
{
  \ifdefined\titleimage
    \frametitle{\inserttitle}
    \framesubtitle{\insertsubtitle}
  \else
    \begin{center}
      \usebeamerfont{frametitle}\usebeamercolor[fg]{frametitle}\inserttitle

      \vspace{\framesubtitlev}
      \usebeamerfont{framesubtitle}\usebeamercolor[fg]{framesubtitle}\insertsubtitle

      \vspace{1.5mm}
      \insertauthor\\
      {\scriptsize\insertinstitute}\\~\\
      {\small\insertdate}
    \end{center}
  \fi
}

beamercolorthemeTUIls.sty

% Color scheme definitions
\definecolor{TUIl-orange}{RGB}{255, 121, 0}
\definecolor{TUIl-blue}{RGB}{0, 51, 89}
\definecolor{TUIl-green}{RGB}{0, 116, 122}
\definecolor{TUIl-grey}{RGB}{165, 165, 165}

% = Font Colors =
% background
\setbeamercolor*{background canvas}{bg=white}

% title/subtitle
\setbeamercolor{frametitle}{fg=TUIl-orange}
\setbeamercolor{framesubtitle}{fg=TUIl-blue}

% text
\setbeamercolor*{normal text}{fg=TUIl-blue}

% itemize
\setbeamercolor*{itemize item}{fg=TUIl-orange}
\setbeamercolor*{itemize subitem}{fg=TUIl-blue}
\setbeamercolor*{itemize subsubitem}{fg=TUIl-blue}

% enumerate
\setbeamercolor*{enumerate item}{fg=TUIl-orange}
\setbeamercolor*{enumerate subitem}{fg=TUIl-blue}
\setbeamercolor*{enumerate subsubitem}{fg=TUIl-blue}

% block colors/style
\setbeamercolor{block body}{fg=TUIl-blue,bg=TUIl-blue!10!bg}
\setbeamercolor{block title}{parent=structure,fg=white,bg=TUIl-blue}
\setbeamertemplate{blocks}[rounded][shadow=false]

% alert
\setbeamercolor{alerted text}{fg=TUIl-orange}

% footer
\setbeamercolor*{footer}{bg=white, fg=TUIl-grey}
\setbeamercolor*{page number in head/foot}{fg=TUIl-grey}

% bibliography
\setbeamercolor{bibliography entry author}{fg=TUIl-blue}
\setbeamercolor{bibliography entry title}{fg=TUIl-blue}
\setbeamercolor{bibliography entry journal}{fg=TUIl-blue}
\setbeamercolor{bibliography entry note}{fg=TUIl-blue}

% = Font Sizes =
% title/subtitle
\setbeamerfont{frametitle}{size*={\the\numexpr \titlesize \relax}{\the\numexpr \titlesize + 1\relax}\selectfont,series=\bfseries}
\setbeamerfont{framesubtitle}{size*={\the\numexpr \subtitlesize \relax}{\the\numexpr \subtitlesize + 1 \relax}\selectfont}

% Font size for thebibliography environments
\setbeamerfont{bibliography entry author}{size=\footnotesize}
\setbeamerfont{bibliography entry title}{size=\footnotesize}
\setbeamerfont{bibliography entry journal}{size=\footnotesize}
\setbeamerfont{bibliography entry note}{size=\footnotesize}

% Font size for BibLaTeX (\printbibliography)
\@ifpackageloaded{biblatex}{\AtBeginBibliography{\footnotesize}}{}

% bullet points for itemize
\defbeamertemplate{itemize item}{image}{\tiny \raisebox{0.5ex}{$\bullet$}}
\defbeamertemplate{itemize subitem}{image}{\tiny \raisebox{0.5ex}{$\bullet$}}
\defbeamertemplate{itemize subsubitem}{image}{\tiny \raisebox{0.5ex}{$\bullet$}}

\setbeamertemplate{itemize item}[image]
\setbeamertemplate{itemize subitem}[image]
\setbeamertemplate{itemize subsubitem}[image]

% bibliography icons
\setbeamertemplate{bibliography item}{\lower3.5pt\hbox{\hskip2pt\scalebox{0.7}{\pgfuseimage{beamericonarticle}}\hskip1pt}}

相关内容