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

  • Can you show what you have up to now?
    – egreg
    Commented Jan 1, 2013 at 15:56
  • 1
    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
    Commented Jan 1, 2013 at 17:46
  • @doncherry No problem. Its absolutely fine :)
    – C.S.
    Commented Jan 1, 2013 at 18:55

1 Answer 1


put the xcolor package in the preamble,


then use a command like this:


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

  • No Problemo. Any time. Commented Jan 1, 2013 at 16:03
  • Seen many solutions around. This is so delightfully simple! Commented Jan 29, 2016 at 4:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .