16

I would like to know which is the preferred way to make a colored, rounded text box?

I would like to show important notes for example.

Keelan
  • 5,425

1 Answers1

24

A small example...

\documentclass{book}

\usepackage{blindtext}
\usepackage{tcolorbox}
\usepackage{graphicx}
\begin{document}    

\begin{tcolorbox}[width=\textwidth,colback={green},title={With rounded corners},colbacktitle=yellow,coltitle=blue]    
   \blindtext[1]
\end{tcolorbox}    

\begin{tcolorbox}[width=\textwidth,colback={red},title={With true corners},outer arc=0mm,colupper=white]    
    \blindtext[1]     
    %\includegraphics[scale=0.5]{frogimage.png}
\end{tcolorbox}    

\end{document}

I hope, you do not mind using your profile photo ;-)

enter image description here

  • thanks for your example, your first with round corner was exactly what I was looking for. In fact I want to include in this part a rule for my course. Sorry for my profile photo it was my state of mind during my holidays. – Eyesandpixel Apr 24 '14 at 21:33
  • thanks to help me in my spelling mistake. It is not easy to describe a problem. So it's true some words was written with careless mistake... – Eyesandpixel Apr 24 '14 at 22:41
  • @Thanos: I don't like my answers being edited unless there is an error. Just leave a comment and I'll do the editing myself! –  Feb 25 '15 at 20:53