0

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.

Thanks.

    \documentclass[a4paper,12pt]{memoir}
\usepackage[T1]{fontenc}     
\usepackage{lipsum}
\nonzeroparskip
\begin{document}
\section
lorem non justo. Nam lacus libero, pretium at, lobortis vitae, ultricies et, tellus.
Donec aliquet, tortor sed accumsan bibendum, erat ligula aliquet magna, vitae
Nam
ornare odio metus a mi.

Nam
%how to autobold the word "Nam" ?
\end{document}
TexisHard
  • 313
  • 2
    Related/duplicate: http://tex.stackexchange.com/questions/16996/is-it-possible-to-have-certain-words-in-the-document-always-in-bold?rq=1 – Torbjørn T. Aug 03 '14 at 11:03
  • I've seen \patchcmd do subtitutions that could maybe also mimic this functionality. It would require embedding the body text in a macro though. – 1010011010 Aug 03 '14 at 12:49

1 Answers1

2

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