LaTeX Error: Command \foo already defined
TeX Output
./example.tex:2: LaTeX Error: Command \textbf already defined.
Or name \end... illegal, see p.192 of the manual.
l.2 \newcommand{\textbf}
[1]{#1}
Explanation
The \newcommand macro creates a new command, but protects existing definitions by aborting if a command with that name already exists in LaTeX or a loaded package.
How to Fix
- If you intend to override the existing command, use
\renewcommand:\renewcommand{\textbf}[1]{#1} - If you intended to define a new unique macro, rename it:
\newcommand{\mycustombold}[1]{#1} - If the macro might or might not already exist depending on engine/packages, use
\providecommand.