0

Possible Duplicate:
How to highlight keywords?

I'm building a presentation with some keywords. These keywords are somehow confusing (LL-parsing, LR-parsing,...). Therefore I was thinking to assign a color to each of them.

However one can easily make mistakes by coloring the text manually. Therefore I am looking for a system who detects automatically these keywords and gives them automatically the right layout?

Is their a way to specify a set of keywords together with their layout?

  • 6
    It's a lot easier and more robust if you allow markup eg \kw{LL-parsing} \kw{LR-parsing} then it is easy to define \kw to check its argument and choose a color. If you mean you want to make tex parse free paragraph text and find the keywords itself, it's not impossible but it would be very delicate and likely to clash with other packages loaded. – David Carlisle Oct 03 '12 at 14:28
  • True, the problem is one might skip to add the command for some keywords. – willeM_ Van Onsem Oct 03 '12 at 16:50
  • 1
    If the number of your keywords is somewhat limited, you could just define a shortcut for everyone of them that already includes some sort of highlighting, such as \newcommand{LR}{\emph{LR-parsing}}. Within the text it's then enough to call just \LR to get your word including highlight. Of course this has the same drawback as the suggestion by @DavidCarlisle: you must think of the highlighting by yourself. – Benedikt Bauer Oct 03 '12 at 17:35
  • Indeed a duplicate of How to highlight keywords? Thanks diabonas. – willeM_ Van Onsem Oct 03 '12 at 17:43

0 Answers0