# How to create another styling format like \emph

I read how to change \emph and changed it to \DeclareTextFontCommand{\emph}{\bfseries}.

Now I want to create another command like \secondstyleformat which I can configure aswell. Such a format could be bold and italic. After writing the document I could change it easily to for example italic and blue. How can I do that?

-
A number in a LaTeX command does not work, so \emph2 is a syntax error. Try \BetterEmph or something similar –  Christian Hupfer Jul 3 '14 at 10:03
You could teach \emph to look for the next token and, if it finds a 2 then use \itshape and, otherwise, \bfseries… But, why wouldn't you use a semantic command? What are you going to emphasize with this “\emph2”. –  Manuel Jul 3 '14 at 10:06
@Manuel: I would not redefine the standard command \emph anyway. Better use logical markup, say for some text, which should be formated in special way, at first \textit{foo} and later on the decision to make in blue color and bold, it is better do use a command \newcommand{\makeitboldandcoloured}[1]{\textbf{\textcolor{blue}{#1}}}, in the preamble, so you can 1st easily detect and replace such markup to change the name or change the color etc, if needed. This requires a little categorization how certain text is to be formatted –  Christian Hupfer Jul 3 '14 at 10:29
@ChristianHupfer I'm not recommending to redefine it: since he already did, I'm just asking to clarify what's his real problem… But you seem to have solved the “un-question” :P –  Manuel Jul 3 '14 at 10:32
@user50224 You can use the same system you said at first: \DeclareTextFontCommand\makeitboldandcoloured{\bfseries\color{blue}}. –  Manuel Jul 3 '14 at 10:36

\DeclareTextFontCommand\makeitboldandcoloured{\bfseries\color{blue}}