TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 7 down vote accepted
share|improve this answer

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.

share|improve this answer

Your Answer


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.