1

Is it possible to draw a beamercolorbox with a dashed border? I cannot find in the Beamer documentation the possibility of such kind of decoration.

1
  • 3
    You may have to redefine the underneath beamerboxesrounded environment, see tex.stackexchange.com/a/75903. Alternatively, you can use tcolorbox to draw such colored boxes. Commented Dec 5, 2021 at 2:14

1 Answer 1

0

You can use tcolorbox:

\documentclass[aspectratio=169]{beamer}
\usetheme{default}
\usepackage[most]{tcolorbox}

\setbeamertemplate{blocks}[rounded][shadow=true]
%\setbeamercolor{block body example}{bg=red!20!white}
%\setbeamercolor{block title example}{fg=red, bg=red!40!white}
% \definecolor{bitsdeepBlue}{RGB}{42, 42, 134}



\newtcolorbox{myblock}[1][]{%
    enhanced jigsaw,%
    colback=red!20!white!90!,%
%    colframe=red!85!white!90!,%
    colbacktitle=red!45!white!90!,
    % size=small,%
    % boxrule=1pt,%
    title=\textbf{\textit{Example}},%
    halign title=flush left,%
    coltitle=red,%
    breakable,%
    drop fuzzy shadow=black!70!white,%
    left=0pt,
    titlerule=0pt,
    top=1pt,
    bottom=0pt,
    enlarge left by=-0.1cm,
    grow to right by=0.21cm,
    frame empty,
    borderline={0.5mm}{0mm}{red!85!white!90!,dashed},
}

\begin{document}
\begin{frame}{Frame Title}
\begin{myblock}
    this is default.
    \end{myblock}
\end{frame}
\end{document}

enter image description here


With the new tcolorbox inner theme (https://www.ctan.org/pkg/beamertheme-tcolorbox ), adding a dashed border is now much simpler:

\documentclass[aspectratio=169]{beamer}

\usetheme{Warsaw}
\useinnertheme{tcolorbox}

\tcbset{
  borderline={1.5pt}{-1.5pt}{block title.bg,dashed},
}
   
\begin{document}
\begin{frame}
\begin{block}{title}
    this is default.
\end{block}
\end{frame}
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .