update thm appearance

This commit is contained in:
Yu Cong 2025-03-03 20:16:34 +08:00
parent 18bb1fc4bb
commit 26eabe0ae5
3 changed files with 21 additions and 60 deletions

View File

@ -23,23 +23,11 @@
\RequirePackage{CJKutf8}
\def\zh#1{\begin{CJK}{UTF8}{gbsn}#1\end{CJK}}
\RequirePackage{aliascnt}
% % copied from one of UIUC courses by Chandra Chekuri. I can't find the exact link now...https://courses.grainger.illinois.edu/cs598cci/sp2020/
% \def\begin@lg{\begin{minipage}{1in}\begin{tabbing}
% \quad\=\qquad\=\qquad\=\qquad\=\qquad\=\qquad\=\qquad\=\kill}
% \def\end@lg{\end{tabbing}\end{minipage}}
% \newenvironment{algorithm}
% {\begin{tabular}{|l|}\hline\begin@lg}
% {\end@lg\\\hline\end{tabular}}
% \newenvironment{algo}
% {\begin{center}\begin{algorithm}}
% {\end{algorithm}\end{center}}
% a color box
\RequirePackage[breakable, theorems, skins]{tcolorbox}
\tcbset{enhanced}
\DeclareRobustCommand{\mybox}[2][gray!20]{%
\DeclareRobustCommand{\boxfill}[2][oliver!20]{%
\begin{tcolorbox}[ %% Adjust the following parameters at will.
breakable,
left=0pt,
@ -73,27 +61,7 @@
% footline
% delete navigation below
\setbeamertemplate{navigation symbols}{}
% define footline
% \makeatother
% \setbeamertemplate{footline}
% {
% \leavevmode%
% \hbox{%
% \begin{beamercolorbox}[wd=.38\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
% \usebeamerfont{author in head/foot}\insertshortauthor
% \end{beamercolorbox}
% \begin{beamercolorbox}[wd=.62\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
% \usebeamerfont{title in head/foot}\insertshorttitle
% \end{beamercolorbox}
% % \begin{beamercolorbox}[wd=.1\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
% % \usebeamerfont{title in head/foot}\insertframenumber{} / \inserttotalframenumber\hspace*{0ex}
% % \end{beamercolorbox}
% }
% \vskip0pt%
% }
\useoutertheme{tree}
\makeatletter
\setbeamertemplate{headline}
@ -130,11 +98,11 @@
\end{beamercolorbox}
}
\makeatother
% \makeatletter
% footline color
\setbeamercolor{author in head/foot}{fg=black, bg=mygrey!5!white}
\setbeamercolor{title in head/foot}{fg=black, bg=mygrey!5!white}
\setbeamercolor*{title}{fg=beamer@simple@color, bg=white}
% item settings
\setbeamertemplate{itemize item}{$\color{beamer@simple@color}\bullet$}
\setbeamertemplate{itemize subitem}{$\color{beamer@simple@color}\bullet$}
@ -163,30 +131,23 @@
\setbeamerfont{title}{series=\bfseries\boldmath}
\setbeamertemplate{frametitle}{\vskip2pt\hskip-6pt\underline{\insertframetitle}} % add line under frametitle
% % metropolis
% % \definecolor{beamer@simple@color}{RGB}{35 54 58}
% % no outer theme
% \setbeamerfont{frametitle}{series=\bfseries}
% \setbeamercolor{frametitle}{fg=white, bg=beamer@simple@color}
% \setbeamerfont{block title}{series=\bfseries}
% \setbeamerfont{block title alerted}{series=\bfseries}
% \definecolor{alertcol}{RGB}{232 133 52}
% \setbeamercolor{block title alerted}{fg=alertcol,bg=white}
% \setbeamerfont{alerted text}{series=\mdseries}
% \setbeamercolor{alerted text}{fg=alertcol}
% \setbeamercolor{block title}{bg=mygrey!15!white}
% \setbeamercolor{block body}{fg=black,bg=mygrey!5!white}
\newtheoremstyle{sfbreak}
{\topsep} % ABOVESPACE
{\topsep} % BELOWSPACE
{\normalfont} % BODYFONT
{0pt} % INDENT
{\sffamily\scshape\bfseries} % HEADFONT
{.} % HEADPUNCT
{\newline} % AFTER HEAD SPACE
{\thmname{#1}\thmnumber{ #2}\thmnote{ (#3)}} % HEAD SPEC
\theoremstyle{sfbreak}
\makeatletter
\setbeamertemplate{theorem begin}
{%
\begin{\inserttheoremblockenv}
{}{ % does not work without specifying the CambridgeUS theme
\usebeamerfont*{block title}%
\selectfont
\usebeamercolor[fg]{block title}%
\inserttheoremname
\inserttheoremnumber
\ifx \inserttheoremaddition \empty \else\ [\inserttheoremaddition]\fi
\inserttheorempunctuation}
\selectfont
}
\setbeamertemplate{theorem end}{\end{\inserttheoremblockenv}}
\makeatother
% more theorem env
\newtheorem{observation}{Observation}
\newtheorem{question}{Question}

BIN
main.pdf

Binary file not shown.

View File

@ -92,7 +92,7 @@ However, observe that in our problem the piecewise linear convex function is not
\section{LP in Low Dimensions}
\begin{frame}[allowframebreaks]{Megiddo's algorithm}%
\mybox[oliver!20]{
\boxfill{
\tiny
\url{https://people.inf.ethz.ch/gaertner/subdir/texts/own_work/chap50-fin.pdf}
}
@ -173,7 +173,7 @@ However, observe that in our problem the piecewise linear convex function is not
\end{align*}
Our linear program has \emph{dimension} $n+d$.
\textbf{\href{https://www.sciencedirect.com/science/article/abs/pii/0020019084900140}{Zemel}} showed that this kind of problem can be solved in linear time.
\mybox[oliver!20]{
\boxfill[oliver!20]{
This is a \emph{$d$-dimensional search problem} with $n+d$ hyperplanes.
}
\end{frame}