# Rotation of mdframed box

TeX - LaTeX Asked on October 27, 2020

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.5textwidth}
Text
end{minipage}
begin{minipage}[t]{0.5textwidth}
rotatebox{20}{
begin{mdframed}
large{Text}
end{mdframed}
}
end{minipage}
end{document}


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.5textwidth}
Text
end{minipage}
begin{turn}{56}
begin{minipage}[t]{0.5textwidth}

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

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


Correct answer by user108724 on October 27, 2020

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=.5textwidth,
tikz={rotate=15,transform shape}
]%
Some fancy test.
end{tcolorbox}

end{document}


Answered by phil-elkabat on October 27, 2020

## Related Questions

### Writing on Images

0  Asked on July 11, 2021

### Trying to view citations in Bibtex as an import file from Mendely isn’t working

1  Asked on July 11, 2021 by vani

### Expanding a macro into index for sorting using expl3

2  Asked on July 11, 2021

### How do I change numbering from arabic letters to roman letters after ToC and set countering to 1?

1  Asked on July 11, 2021 by fendi

### On the proper use of tl_rescan

1  Asked on July 11, 2021

### How to format calculated number in siunitx within tikz?

1  Asked on July 11, 2021

### pgfplots use full textwidth in subfigure environment

2  Asked on July 11, 2021 by whiterock

### Autoscale tikzpicture to maximum size possible on a page

1  Asked on July 11, 2021

### How to get vdash with number in Latex

1  Asked on July 11, 2021 by angel-gonzlez

### Apply command to this area only

1  Asked on July 11, 2021

### Can tikz plot a recurrence relation using foreach and no global definitions?

2  Asked on July 11, 2021

### Problem with APA formating

0  Asked on July 11, 2021 by david-wagle

### Using LaTeX3’s xtemplate

4  Asked on July 10, 2021

### Pseudocode: Function vs. Procedure?

2  Asked on July 10, 2021

### Format reference and subref of subcaption

2  Asked on July 10, 2021

### Rules for space when using mathrm{}

2  Asked on July 10, 2021

### How to install Bickham font or similar font

3  Asked on July 10, 2021

### Creating a long table with large cells that wrap effectively

0  Asked on July 10, 2021 by tophodin

### How to get a bibliography to work in subfiles?

1  Asked on July 10, 2021 by shan-kasal

### Can I daemonize LaTeX or ConTeXt for performance boost?

0  Asked on July 10, 2021