I would like to auto bold some keywords in my file.tex without writing \keyword. For instance, I would like to bold all the word "example" in my text without doing anything.

I don't know if it possible to do such a thing without using the \newcommand{}

Does anyone help me please ?

In my researchs I have read that the \def command might help.


lorem non justo. Nam lacus libero, pretium at, lobortis vitae, ultricies et, tellus.
Donec aliquet, tortor sed accumsan bibendum, erat ligula aliquet magna, vitae
ornare odio metus a mi.

%how to autobold the word "Nam" ?

Probably the easiest approach is to do a global search and replace on Nam, and replace it with \nam. Then use \newcommand{\nam} etc.

| improve this answer | |
  • Replace it with \nam{}, otherwise spaces would be gobbled. – egreg Aug 3 '14 at 12:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.