5

I am using \begin{framed} ... \end{framed} in my presentation, does anyone know how to make the frame dashed?

9

Here a solution with mdframed

\documentclass[english]{beamer}
\usepackage[style=1]{mdframed}[2011/08/22]
\begin{document}
\begin{frame}
\begin{mdframed}[tikzsetting={draw=blue,dashed,line width=2pt,dash pattern = on 10pt off 3pt},linecolor=yellow,backgroundcolor=yellow,outerlinewidth=1pt]
Text Text Text Text Text Text Text Text 
\end{mdframed}

\begin{mdframed}[tikzsetting={draw=blue,dashed,line width=2pt,dash pattern = on 10pt off 3pt},linecolor=yellow,backgroundcolor=yellow,outerlinewidth=1pt]
Text Text Text Text Text Text Text Text 
Text Text Text Text Text Text Text Text 
Text Text Text Text Text Text Text Text 
Text Text Text Text Text Text Text Text 
\end{mdframed}
\end{frame}
\end{document}

Sorry for the advertising.

enter image description here

EDIT: You can define the special environment in the header with the following code:

\newmdenv[tikzsetting={draw=blue,dashed,line width=2pt,dash pattern = on 10pt off 3pt},%
linecolor=yellow,backgroundcolor=yellow,outerlinewidth=1pt]{beamerframe}

Now you can use the environment as usual.

\begin{beamerframe}
Text Text Text Text Text Text Text Text 
\end{beamerframe}
  • Thanks for your reply... It says File mdframed.sty not found... – SoftTimur Aug 29 '11 at 17:43
  • What do you use? TexLive or MikTeX and which version do you have? – Marco Daniel Aug 29 '11 at 17:44
  • If I type latex -version in a terminal, it returns TeX Live 2009/Debian. And I am using Emacs and LaTeX... – SoftTimur Aug 29 '11 at 19:47
  • THe example works only with Texlive 2011 and the newest version of mdframed. For beamer you can use a solution of the threat which is linked by doncherry in the comment above. – Marco Daniel Aug 29 '11 at 19:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.