Merge pull request #194 from rchurchley/fix-empty-alertblock
Allow user to define empty (e.g.) alertblock background
This commit is contained in:
commit
3033dd3126
|
@ -401,10 +401,13 @@
|
||||||
% |block title alerted|, and |block title example| have an empty
|
% |block title alerted|, and |block title example| have an empty
|
||||||
% background).
|
% background).
|
||||||
%
|
%
|
||||||
% If the |block title| background is empty, we just need to set a rightskip
|
% If the |block title| background is empty, or the user has explicitly
|
||||||
% for a nice ragged-right block title.
|
% removed the background from (e.g.) |block title alerted|, we just need to
|
||||||
|
% set a rightskip for a nice ragged-right block title.
|
||||||
%
|
%
|
||||||
% \begin{macrocode}
|
% \begin{macrocode}
|
||||||
|
\ifbeamercolorempty[bg]{block title#1}{%
|
||||||
|
\begin{beamercolorbox}[rightskip=0pt plus 4em]{block title#1}}{%
|
||||||
\ifbeamercolorempty[bg]{block title}{%
|
\ifbeamercolorempty[bg]{block title}{%
|
||||||
\begin{beamercolorbox}[rightskip=0pt plus 4em]{block title#1}%
|
\begin{beamercolorbox}[rightskip=0pt plus 4em]{block title#1}%
|
||||||
}%
|
}%
|
||||||
|
@ -422,7 +425,7 @@
|
||||||
leftskip=\metropolis@blockadjust,
|
leftskip=\metropolis@blockadjust,
|
||||||
rightskip=\dimexpr\metropolis@blockadjust plus 4em\relax
|
rightskip=\dimexpr\metropolis@blockadjust plus 4em\relax
|
||||||
]{block title#1}%
|
]{block title#1}%
|
||||||
}%
|
}}%
|
||||||
% \end{macrocode}
|
% \end{macrocode}
|
||||||
%
|
%
|
||||||
% We can now set the contents of the |block title|. The zero-width but
|
% We can now set the contents of the |block title|. The zero-width but
|
||||||
|
@ -443,12 +446,14 @@
|
||||||
%
|
%
|
||||||
% \begin{macrocode}
|
% \begin{macrocode}
|
||||||
\nointerlineskip%
|
\nointerlineskip%
|
||||||
\ifbeamercolorempty[bg]{block body}{
|
\ifbeamercolorempty[bg]{block body#1}{%
|
||||||
|
\begin{beamercolorbox}[vmode]{block body#1}}{
|
||||||
|
\ifbeamercolorempty[bg]{block body}{%
|
||||||
\begin{beamercolorbox}[vmode]{block body#1}%
|
\begin{beamercolorbox}[vmode]{block body#1}%
|
||||||
}{%
|
}{%
|
||||||
\begin{beamercolorbox}[sep=\metropolis@blocksep, vmode]{block body#1}%
|
\begin{beamercolorbox}[sep=\metropolis@blocksep, vmode]{block body#1}%
|
||||||
\vspace{-\metropolis@parskip}
|
\vspace{-\metropolis@parskip}
|
||||||
}%
|
}}%
|
||||||
\usebeamerfont{block body#1}%
|
\usebeamerfont{block body#1}%
|
||||||
\setlength{\parskip}{\metropolis@parskip}%
|
\setlength{\parskip}{\metropolis@parskip}%
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue