[texhax] boldfacing words from a list

tom sgouros tomfool at as220.org
Fri Sep 29 02:31:22 CEST 2006


Christopher W. Ryan <cryan at binghamton.edu> wrote:

> My hope was to be able to bold them somewhat automatically, only having
> to type any markup commands once.
> 
> Thus, typing \vocabulary{profits} every time that word appears in the
> source is no easier than typing \textbf{profits} every time it appears.
>  In fact, the former is more keystrokes.

I think what you're trying to do isn't really something that TeX or
LaTeX is well suited for.  I know how you could get it to react to a
particular word, but doing something general for a whole list of words
would pretty hairy.

But there is a world of text-manipulating tools out there specifically
built for what you're after.  People have already submitted shell script
solutions using sed.  Perl also provides plenty of text-processing
options, and has a generalization in its regular expression syntax for
identifying words.  And then there's emacs, which has a similar regular
expression feature, and with which you can write pretty arbitrary lisp
programs to do stuff like that, assign them to a keystroke and then
they're at your fingertips forever after.

This is a TeX list, not an emacs list.  If you're using emacs and would
like suggestions about such a program, email me offline.

Cheers,

 -tom


-- 
 ------------------------
 tomfool at as220 dot org
 http://sgouros.com  
 http://whatcheer.net


More information about the texhax mailing list