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

How can I write a few words with a grey highlighting box in the background, as shown in the picture below ("TEXT 4")?

share|improve this question
Can you show what you have up to now? – egreg Jan 1 '13 at 15:56
I reworded your question a bit, since you didn't seem to be looking for a solution for the rest of the picture at all. Focused on the highlighting, as it is now, it's a better fit for our "one feature" question style. Hope you don't mind. – doncherry Jan 1 '13 at 17:46
@doncherry No problem. Its absolutely fine :) – S.C. Jan 1 '13 at 18:55
up vote 16 down vote accepted

put the xcolor package in the preamble,


then use a command like this:


Change 'gray' to the shade that suits your gods liking.

share|improve this answer
Thanks a lot for the help. – S.C. Jan 1 '13 at 16:03
No Problemo. Any time. – Nicholas Hamilton Jan 1 '13 at 16:03
Seen many solutions around. This is so delightfully simple! – stackovergio Jan 29 at 4:50

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.