Is there a way to color keywords into a document?
For instance, I want all the occurrences of a given word to appear in red in the whole document.
something like :
\colorize{red}{keywords={foo,bar}}
Is there a way to color keywords into a document?
For instance, I want all the occurrences of a given word to appear in red in the whole document.
something like :
\colorize{red}{keywords={foo,bar}}
Just to elaborate a little on my comment. You could use spelling with LuaLaTeX like this:
\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.spb}
foo
bar
\end{filecontents*}
\documentclass{article}
\usepackage{fontspec}
\usepackage{spelling}
\begin{document}
Keyword foo in text.
Keyword bar in text.
\end{document}
This will highlight foo and bar. You'll need two compilations.
AFAIK there is no such way, the easiest would be to use search & replace. Using LuaTeX however it should be possible. I have seen a presentation about the chickenize package once which showed similar features. LuaTeX is able to hook into the text output before it is written to the PDF.
Here's a link to the German presentation PDF: http://www.dante.de/events/mv45/Programm/atrautmann/folien-trautmann.pdf
awk (or python or ...) script that processed your TeX source prior to compilation.
– Ethan Bolker
Feb 07 '13 at 19:38
\jobname.spb. Then set\spellinghighlightcolorto red. This only works with LuaLaTeX, though. – Martin Heller Feb 07 '13 at 21:35