Is it possible to parse the whole document automatically, looking for buzzwords (which I will maintain in a special list), and replace the buzzwords with links to a predefined page e.g. a glossary?
Asked
Active
Viewed 184 times
4
-
3Automatically? Your editor should provide a search-and-replace feature so you can find these words and modify them (to whatever) as you like. Since this seems too straight-forward an answer, I assume you actually mean something else. Please elaborate and provide an MWE. – Werner Dec 16 '11 at 15:22
-
Looks like a duplicate of How to highlight keywords?. – Martin Scharrer Dec 16 '11 at 15:47
-
Also a possible duplicate of Own table of contents?, since you want to define a term and reference it somewhere. The hyperlink is from the "Glossary" though, not from within the text. – Werner Dec 16 '11 at 16:59
-
Perhaps TeX is not the right tool. How about sed/awk? – Boris Bukh Dec 16 '11 at 18:37
-
Its not a duplicate of Own table of contents. I would like to define a list if buzzwords and I would like any occurence of thebuzzwords to link to a special page - the glossar page. I dont want to explicitely mark every occurence by a tag like in the table of contents. – Skip Dec 16 '11 at 18:44
1 Answers
4
It's possible with XeTeX and the package xesearch that works with Plain XeTeX, XeLaTeX and ConTeXt.
However I think it's better to mark the document, by saying something like
\buzzword{Hello}
that will make your intentions clearer.
egreg
- 1,121,712
-
Thnx for the tipp with XeTeX. Marking every occurence of teh word is not a solution for me. I want every every occurence to be marked automagically, because I have a long list and the words occur in the text really often. – Skip Dec 17 '11 at 00:22