I was just making my resume and I wanted to highlight the different sections. I used the color package. This is the code:



To work in areas like Embedded systems, Hardware Design in an established firm and to apply the knowledge for personal and professional benefit\

What I get is something like this: enter image description here

What I want is this:

enter image description here

Any ideas?

2 Answers 2


Here's a definition of \Colorbox[<width>]{<colour>}{<stuff>} using xparse:

enter image description here

\usepackage{xparse}% http://ctan.org/pkg/xparse
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}% http://ctan.org/pkg/xcolor
\NewDocumentCommand{\Colorbox}{O{\dimexpr\linewidth-2\fboxsep} m m}{%

The default width <width> is \linewidth-2\fboxsep, where \fboxsep is the gap between the text and the colour box boundary.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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