苦于ppt格式修改的繁瑣,最近在用beamer寫ppt,還在熟悉的過程當中,遇到一個block的樣式問題,查了一些資料,順便做點總結
\documentclass{beamer}
\begin{document}
\begin{frame}{Mathematics}
\begin{block}{Mathematics}
The function \(\phi \colon \mathbb{R} \to \mathbb{R}\) given by \(\phi(x) = 2x\) is continuous at the point \(x = \alpha\),
because if \(\epsilon > 0\) and \(x \in \mathbb{R}\) is such that \(\lvert x - \alpha \rvert < \delta = \frac{\epsilon}{2}\),
then
\begin{equation*}
\lvert \phi(x) - \phi(\alpha)\rvert = 2\lvert x - \alpha \rvert < 2\delta = \epsilon.
\end{equation*}
\end{block}
\end{frame}
\end{document}

由于沒什麼主題,顯示出來非常樸素
在\documentclass{beamer}後面加入下面這段代碼,對block的标題和主體部分的前景和背景顔色做一些修改
\definecolor{uibred} {HTML}{db3f3d}
\definecolor{uibblue} {HTML}{4ea0b7}
\definecolor{uibgreen}{HTML}{789a5b}
\definecolor{uibgray} {HTML}{d0cac2}
\definecolor{uiblink} {HTML}{00769E}
\setbeamercolor{block body} {bg = uibgray}
\setbeamercolor{block title}{fg = white,bg = uibred}
另外,删除代碼equation後的*号,會自動添加公式的編号,Latex确實靈活強大