simplified theorem code
This commit is contained in:
parent
4d110dcc0c
commit
9ffbb28a3e
@ -380,32 +380,32 @@
|
||||
|
||||
%%%%% block environments:
|
||||
|
||||
\newcommand{\block@lines@begin}[3]{%
|
||||
\newcommand{\block@lines@begin}[4]{%
|
||||
\par\vskip\medskipamount%
|
||||
\usebeamerfont{block title#1}%
|
||||
\setbox0=\hbox{\insertblocktitle\unskip}% does not work for theorem?!
|
||||
\usebeamerfont{#1 title#2}%
|
||||
\setbox0=\hbox{\insertblocktitle\unskip}%
|
||||
\ifdim\wd0=0pt\else%
|
||||
\beamer@horizontal@line@top{block line#1 top}{#2}
|
||||
\begin{beamercolorbox}[wd=\linewidth,ht=2.4ex,dp=0.9ex,leftskip=2mm,rightskip=2mm]{block title#1}
|
||||
\beamer@horizontal@line@top{#1 line#2 top}{#3}
|
||||
\begin{beamercolorbox}[wd=\linewidth,ht=2.4ex,dp=0.9ex,leftskip=2mm,rightskip=2mm]{#1 title#2}
|
||||
\strut\insertblocktitle
|
||||
\end{beamercolorbox}
|
||||
\fi
|
||||
\nointerlineskip
|
||||
\beamer@horizontal@line@top{block line#1 middle}{#3}
|
||||
\usebeamerfont{block body#1}%
|
||||
\begin{beamercolorbox}[wd=\linewidth,colsep=2mm]{block body#1}
|
||||
\beamer@horizontal@line@top{#1 line#2 middle}{#4}
|
||||
\usebeamerfont{#1 body#2}%
|
||||
\begin{beamercolorbox}[wd=\linewidth,colsep=2mm]{#1 body#2}
|
||||
}
|
||||
|
||||
\newcommand{\block@lines@end}[2]{%
|
||||
\newcommand{\block@lines@end}[3]{%
|
||||
\vspace{-0.4ex}%
|
||||
\end{beamercolorbox}%
|
||||
\beamer@horizontal@line@bottom{block line#1 bottom}{#2}
|
||||
\beamer@horizontal@line@bottom{#1 line#2 bottom}{#3}
|
||||
}
|
||||
|
||||
%%%%% block environment:
|
||||
|
||||
\defbeamertemplate{block begin}{lines}[2]{\block@lines@begin{}{#1}{#2}}
|
||||
\defbeamertemplate{block end}{lines}[1]{\block@lines@end{}{#1}}
|
||||
\defbeamertemplate{block begin}{lines}[2]{\block@lines@begin{block}{}{#1}{#2}}
|
||||
\defbeamertemplate{block end}{lines}[1]{\block@lines@end{block}{}{#1}}
|
||||
|
||||
\setbeamertemplate{block begin}[lines]{0.5pt}{0.5pt}
|
||||
\setbeamertemplate{block end}[lines]{0.5pt}
|
||||
@ -413,8 +413,8 @@
|
||||
|
||||
%%%%% block alerted environment:
|
||||
|
||||
\defbeamertemplate{block alerted begin}{lines}[2]{\block@lines@begin{ alerted}{#1}{#2}}
|
||||
\defbeamertemplate{block alerted end}{lines}[1]{\block@lines@end{ alerted}{#1}}
|
||||
\defbeamertemplate{block alerted begin}{lines}[2]{\block@lines@begin{block}{ alerted}{#1}{#2}}
|
||||
\defbeamertemplate{block alerted end}{lines}[1]{\block@lines@end{block}{ alerted}{#1}}
|
||||
|
||||
\setbeamertemplate{block alerted begin}[lines]{0.5pt}{0.5pt}
|
||||
\setbeamertemplate{block alerted end}[lines]{0.5pt}
|
||||
@ -422,8 +422,8 @@
|
||||
|
||||
%%%%% block example environment:
|
||||
|
||||
\defbeamertemplate{block example begin}{lines}[2]{\block@lines@begin{ example}{#1}{#2}}
|
||||
\defbeamertemplate{block example end}{lines}[1]{\block@lines@end{ example}{#1}}
|
||||
\defbeamertemplate{block example begin}{lines}[2]{\block@lines@begin{block}{ example}{#1}{#2}}
|
||||
\defbeamertemplate{block example end}{lines}[1]{\block@lines@end{block}{ example}{#1}}
|
||||
|
||||
\setbeamertemplate{block example begin}[lines]{0.5pt}{0.5pt}
|
||||
\setbeamertemplate{block example end}[lines]{0.5pt}
|
||||
@ -431,25 +431,6 @@
|
||||
|
||||
%%%%% theorem environments (theorem, corollary, fact, lemma, definition, example):
|
||||
|
||||
\newcommand{\theorem@lines@begin}[3]{%
|
||||
\par\vskip\medskipamount%
|
||||
\usebeamerfont{#1 title}%
|
||||
\beamer@horizontal@line@top{#1 line top}{#2}
|
||||
\begin{beamercolorbox}[wd=\linewidth,ht=2.4ex,dp=0.9ex,leftskip=2mm,rightskip=2mm]{#1 title}
|
||||
\strut \insertblocktitle
|
||||
\end{beamercolorbox}
|
||||
\nointerlineskip
|
||||
\beamer@horizontal@line@top{#1 line middle}{#3}
|
||||
\usebeamerfont{#1 body}%
|
||||
\begin{beamercolorbox}[wd=\linewidth,colsep=2mm]{#1 body}
|
||||
}
|
||||
|
||||
\newcommand{\theorem@lines@end}[2]{%
|
||||
\vspace{-0.4ex}%
|
||||
\end{beamercolorbox}%
|
||||
\beamer@horizontal@line@bottom{#1 line bottom}{#2}
|
||||
}
|
||||
|
||||
\newenvironment<>{theoremblock}[1]{%
|
||||
\begin{actionenv}#2%
|
||||
\def\insertblocktitle{#1}%
|
||||
@ -462,8 +443,8 @@
|
||||
\renewcommand{\inserttheoremblockenv}{theoremblock}
|
||||
\renewcommand{\inserttheoremheadfont}{}
|
||||
|
||||
\defbeamertemplate{block theorem begin}{lines}[2]{\theorem@lines@begin{theorem}{#1}{#2}}
|
||||
\defbeamertemplate{block theorem end}{lines}[1]{\theorem@lines@end{theorem}{#1}}
|
||||
\defbeamertemplate{block theorem begin}{lines}[2]{\block@lines@begin{theorem}{}{#1}{#2}}
|
||||
\defbeamertemplate{block theorem end}{lines}[1]{\block@lines@end{theorem}{}{#1}}
|
||||
|
||||
\setbeamertemplate{block theorem begin}[lines]{0.5pt}{0.5pt}
|
||||
\setbeamertemplate{block theorem end}[lines]{0.5pt}
|
||||
|
Loading…
Reference in New Issue
Block a user