multiline messagebox

This commit is contained in:
Jan Benda 2021-03-04 19:25:55 +01:00
parent 9609c70bcf
commit a8068f2fce
3 changed files with 44 additions and 33 deletions

View File

@ -73,8 +73,10 @@
\setbeamercolor{theorem line middle}{fg=utorange}
\setbeamercolor{theorem line bottom}{fg=utorange}
\setbeamercolor{message}{fg=white, bg=utred}
\setbeamercolor{message symbol}{fg=utgold}
\setbeamercolor{message}{fg=utred, bg=utgold}
\setbeamercolor{message symbol}{fg=utblack}
\setbeamercolor{message line top}{fg=}
\setbeamercolor{message line bottom}{fg=}
\setbeamercolor{section in toc}{parent={normal text}}
\setbeamercolor{subsection in toc}{parent={normal text}}

View File

@ -345,22 +345,22 @@
\IfStrEq{\insertblocktitle}{}{}{% % IfStrEq does not work for theorems!
\ifbeamercolorempty[fg]{block line#1 top}{}{%
\nointerlineskip
\begin{beamercolorbox}[wd=\columnwidth,ht=#2]{block line#1 top}
\rule{\columnwidth}{#2}
\begin{beamercolorbox}[wd=\linewidth,ht=#2]{block line#1 top}
\rule{\linewidth}{#2}
\end{beamercolorbox}
\nointerlineskip%
}
\begin{beamercolorbox}[wd=\columnwidth,ht=2.4ex,dp=0.9ex,leftskip=2mm,rightskip=2mm]{block title#1}
\begin{beamercolorbox}[wd=\linewidth,ht=2.4ex,dp=0.9ex,leftskip=2mm,rightskip=2mm]{block title#1}
\strut\insertblocktitle
\end{beamercolorbox}}
\nointerlineskip
\ifbeamercolorempty[fg]{block line#1 middle}{}{%
\begin{beamercolorbox}[wd=\columnwidth,ht=#3]{block line#1 middle}
\rule{\columnwidth}{#3}
\begin{beamercolorbox}[wd=\linewidth,ht=#3]{block line#1 middle}
\rule{\linewidth}{#3}
\end{beamercolorbox}
\nointerlineskip}%
\usebeamerfont{block body#1}%
\begin{beamercolorbox}[wd=\columnwidth,colsep=2mm]{block body#1}
\begin{beamercolorbox}[wd=\linewidth,colsep=2mm]{block body#1}
}
\newcommand{\block@lines@end}[2]{%
@ -368,8 +368,8 @@
\end{beamercolorbox}%
\ifbeamercolorempty[fg]{block line#1 bottom}{}{%
\nointerlineskip
\begin{beamercolorbox}[wd=\columnwidth,ht=#2]{block line#1 bottom}
\rule{\columnwidth}{#2}
\begin{beamercolorbox}[wd=\linewidth,ht=#2]{block line#1 bottom}
\rule{\linewidth}{#2}
\end{beamercolorbox}
}%
}
@ -408,22 +408,22 @@
\usebeamerfont{#1 title}%
\ifbeamercolorempty[fg]{#1 line top}{}{%
\nointerlineskip
\begin{beamercolorbox}[wd=\columnwidth,ht=#2]{#1 line top}
\rule{\columnwidth}{#2}
\begin{beamercolorbox}[wd=\linewidth,ht=#2]{#1 line top}
\rule{\linewidth}{#2}
\end{beamercolorbox}
\nointerlineskip%
}
\begin{beamercolorbox}[wd=\columnwidth,ht=2.4ex,dp=0.9ex,leftskip=2mm,rightskip=2mm]{#1 title}
\begin{beamercolorbox}[wd=\linewidth,ht=2.4ex,dp=0.9ex,leftskip=2mm,rightskip=2mm]{#1 title}
\strut \insertblocktitle
\end{beamercolorbox}
\nointerlineskip
\ifbeamercolorempty[fg]{#1 line middle}{}{%
\begin{beamercolorbox}[wd=\columnwidth,ht=#3]{#1 line middle}
\rule{\columnwidth}{#3}
\begin{beamercolorbox}[wd=\linewidth,ht=#3]{#1 line middle}
\rule{\linewidth}{#3}
\end{beamercolorbox}
\nointerlineskip}%
\usebeamerfont{#1 body}%
\begin{beamercolorbox}[wd=\columnwidth,colsep=2mm]{#1 body}
\begin{beamercolorbox}[wd=\linewidth,colsep=2mm]{#1 body}
}
\newcommand{\theorem@lines@end}[2]{%
@ -431,8 +431,8 @@
\end{beamercolorbox}%
\ifbeamercolorempty[fg]{#1 line bottom}{}{%
\nointerlineskip
\begin{beamercolorbox}[wd=\columnwidth,ht=#2]{#1 line bottom}
\rule{\columnwidth}{#2}
\begin{beamercolorbox}[wd=\linewidth,ht=#2]{#1 line bottom}
\rule{\linewidth}{#2}
\end{beamercolorbox}
}%
}
@ -459,18 +459,29 @@
%%%%% new message box command:
\defbeamertemplate{message symbol}{default}{}
\defbeamertemplate{message symbol}{circle}{\raisebox{0.1ex}{$\bullet$}\thickspace}
\defbeamertemplate{message symbol}{arrow}{\itemarrow\thickspace}
\defbeamertemplate{message symbol}{circle}{\raisebox{0.1ex}{$\bullet$}}
\defbeamertemplate{message symbol}{arrow}{\itemarrow}
\setbeamertemplate{message symbol}[circle]
\newcommand{\message@box@body}{
\begin{beamercolorbox}[wd=\linewidth,colsep=1mm,leftskip=1mm,rightskip=1mm]{message}
\setbox0=\hbox{\usebeamertemplate{message symbol}\unskip}%
\ifdim\wd0=0pt%
\strut\insertmessage
\else
\usebeamercolor[fg]{message symbol}
\parbox[t][][t]{1.8ex}{\usebeamertemplate{message symbol}}%
\usebeamercolor[fg]{message}
\parbox[t][][t]{\dimexpr\hsize-3.5ex\relax}{\raggedright\insertmessage}
\fi
\end{beamercolorbox}
}
\defbeamertemplate{message}{default}{%
\par\vskip\medskipamount%
\usebeamerfont{message}%
\begin{beamercolorbox}[wd=\columnwidth,ht=2.4ex,dp=0.9ex,leftskip=2mm,rightskip=2mm]{message}
{\usebeamercolor[fg]{message symbol}\usebeamertemplate{message symbol}}%
\strut\insertmessage
\end{beamercolorbox}
\message@box@body
}
\defbeamertemplate{message}{lines}[2]{%
@ -478,18 +489,15 @@
\usebeamerfont{message}%
\ifbeamercolorempty[fg]{message line top}{}{%
\nointerlineskip
\begin{beamercolorbox}[wd=\columnwidth,ht=#1]{message line top}
\rule{\columnwidth}{#1}
\begin{beamercolorbox}[wd=\linewidth,ht=#1]{message line top}
\rule{\linewidth}{#1}
\end{beamercolorbox}
\nointerlineskip}%
\begin{beamercolorbox}[wd=\columnwidth,ht=2.4ex,dp=0.9ex,leftskip=2mm,rightskip=2mm]{message}
{\usebeamercolor[fg]{message symbol}\usebeamertemplate{message symbol}}%
\strut\insertmessage
\end{beamercolorbox}
\message@box@body
\ifbeamercolorempty[fg]{message line bottom}{}{%
\nointerlineskip%
\begin{beamercolorbox}[wd=\columnwidth,ht=#2]{message line bottom}
\rule{\columnwidth}{#2}
\begin{beamercolorbox}[wd=\linewidth,ht=#2]{message line bottom}
\rule{\linewidth}{#2}
\end{beamercolorbox}}%
\medskip
}

View File

@ -68,12 +68,13 @@
\setbeamertemplate{title page institute and}[line] % default, space, comma, line
\setbeamertemplate{message symbol}[arrow] % default, circle, arrow
\setbeamertemplate{message}[lines]{0.5pt}{0.5pt} % default, lines
\setbeamertemplate{message}[lines]{0.5pt}{0.5pt} % default, lines
\setbeamertemplate{section name separator}[text][2pt] % space, text
\setbeamertemplate{subsection name separator}[text][2pt] % space, text
\setbeamerfont{footline}{size=\tiny}
\setbeamerfont{message}{size=\normalsize}
\usecolortheme{ut}