16

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

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

put the xcolor package in the preamble,

\usepackage{xcolor}

then use a command like this:

\fcolorbox{gray}{gray}{TEXT}

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

2
  • No Problemo. Any time. Jan 1 '13 at 16:03
  • Seen many solutions around. This is so delightfully simple! Jan 29 '16 at 4:50

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.