AnswerBun.com

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}

2 Answers

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}

enter image description here

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}

rotated box

Answered by phil-elkabat on October 27, 2020

Add your own answers!

Related Questions

On the proper use of `tl_rescan`

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

   

Problem with APA formating

0  Asked on July 11, 2021 by david-wagle

       

Using LaTeX3’s xtemplate

4  Asked on July 10, 2021

   

How to get a bibliography to work in subfiles?

1  Asked on July 10, 2021 by shan-kasal

   

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir