Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm new user in LaTeX, and I would like to know which is the better code to do a colored squared round box with text in a page?

I would like to show important notes for example.

Best Regards.

share|improve this question
2  
tcolorbox....??? –  Harish Kumar Apr 23 at 10:42
    
Welcome to the site. –  Harish Kumar Apr 23 at 10:48
    
See if Colored box around sentences helps you. –  Christoph Apr 23 at 12:01
    
better code -- better compared to what? There are many ways to do such a colored box with texts. –  Christian Hupfer Apr 23 at 12:05
    
Thanks everyboby for your help and to @ChristianHupfer for getting to me a best sample. –  Eyesandpixel Apr 24 at 22:47

1 Answer 1

up vote 2 down vote accepted

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

share|improve this answer
    
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 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 at 22:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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