Looking for the best way of creating a string-processing command in latex to achieve things like below:
- Given a long piece of normal text, and a set of keywords, automatically format the matching words inside the text (e.g. by adding \emph or \textbf etc..) based on some configurable options
- Given a long piece of normal text, convert each line into a list item (e.g. convert each \\ into an \item and enclose the whole inside \begin{itemize} etc...
I am creating a style package that needs this feature to auto-format the plain text supplied by my package users (based on their keywords and other options supplied through command parameters etc.)
What is the best approach? It looks like the \SearchList is only for xelatex. Interested in a generic implementation.
Does latex have string replacement commands that help achieve this? Any existing packages or code samples would be of great help.

awkorperlorpythonor ... – Ethan Bolker Jul 17 '13 at 12:10