beamer中block样式修改

tech2022-07-05  262

苦于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确实灵活强大

最新回复(0)