I am using beamer in Latex to make a presentation. I use a block for definition like:

  Some text here

Let us say I wish to highlight a word "Some". By highlight, I mean something like which is performed by \hl{text}. However, hl does not work in a block in latex. So what should I do, if I want to highlight text in block in beamer.

I don't want to change the color of text but I want to highlight it as shown in attached image. alert changes the text color. hl does not work in a block. So how should I do it? enter image description here

  • 3
    Hello, did you consider using the \alert{text} command which colors your text using the colors defined by the beamer theme ? – J Coulet Nov 19 '18 at 12:13
  • @JCoulet alert changes the text color, but I want too highlight it like a marker does. I have edited the question to show what exactly I want – ShiS Nov 19 '18 at 14:47
  • Did that image come out of Cool Text Highlighting in LaTeX? That's a neat one! Still, if soul's \hl does not work in your case, most of those answers will also not work, for they rely on soul. – gusbrs Nov 19 '18 at 15:10

You can apply the answer https://tex.stackexchange.com/a/41693/36296 to your problem:



  Some \hl{text} here


enter image description here

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.