This question already has an answer here:

I want to use something like this:

\newcommand{\favouritealgorithm}{\texttt{Gaussian elimination}}

so that

My favourite algorithm is \favouritealgorithm written in C.


My favourite algorithm is \texttt{Gaussian elimination} written in C.

However, the space after the word "elimination" is omitted. Which macro provides the correct behaviour?

marked as duplicate by Gonzalo Medina, egreg, Qrrbrbirlbel, barbara beeton, mafp Jun 25 '13 at 16:46

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Browse other questions tagged or ask your own question.