# Rotation of mdframed box

I’d like to rotate a fancy box made with mdframed for a take home message on a poster. This is a MWE where rotatebox fails. Also tried package rotation with same effect. Left the minipage environment I’d like to use in the poster.

\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{microtype}
\usepackage{lmodern}
\usepackage{tikz}
\usepackage{tcolorbox}
\usepackage[framemethod=TikZ]{mdframed

\begin{document}
\begin{minipage}[t]{0.5\textwidth}
Text
\end{minipage}
\begin{minipage}[t]{0.5\textwidth}
\rotatebox{20}{
\begin{mdframed}
\large{Text}
\end{mdframed}
}
\end{minipage}
\end{document}

• Unrelated: since you are already loading tcolorbox why use mdframed at all? It is my impression that tcolorbox is vastly more powerful. Aug 7, 2020 at 8:57

I don't know why it doesn't work but you can use \usepackage{rotating} and turn environment instead.

\documentclass{scrartcl}

\usepackage{microtype}
\usepackage{lmodern}
\usepackage{tikz}
\usepackage{tcolorbox}
\usepackage[framemethod=TikZ]{mdframed}
\usepackage{rotating}

\begin{document}
\begin{minipage}[t]{0.5\textwidth}
Text
\end{minipage}
\begin{turn}{56}
\begin{minipage}[t]{0.5\textwidth}

\begin{mdframed}
\large{Text}
\end{mdframed}%

\end{minipage}
\end{turn}
\end{document}


• turn-environment does’t work inside the minipage wrapping the mdframed-box, but since I don’t need this, this solution is fine for me
– Alex
Aug 8, 2020 at 14:57

I agree with daleif, just use tcolorbox:

\documentclass{scrartcl}
\usepackage[T1]{fontenc}
\usepackage{microtype}
\usepackage{lmodern}
\usepackage{tcolorbox}
\tcbuselibrary{skins}

\begin{document}

\begin{tcolorbox}[%
enhanced,
width=.5\textwidth,
tikz={rotate=15,transform shape}
]%
Some fancy test.
\end{tcolorbox}

\end{document}


• Probably a good idea but I have a fully specified mdframed-box at hand already and wanted to use it
– Alex
Aug 8, 2020 at 15:00