# New command to insert a couple of red XXX as placeholder?

I seem to misunderstand the documentation, as

\newcommand\ph{\textcolor{red}{XXX}}


causes pdflatex to halt. I'm not sure if this is the error:

! Argument of \sf@@subfloat has an extra }.


And I also don't know what it is referring to.

What I want to achieve is that

\myshortcommand


turns into

\textcolor{red}{XXX}


so the output is

XXX (in red)

-
Your suggested command works just fine, as my answer indicates. You will need to provide more detail, preferably with a minimal working example. – Harald Hanche-Olsen Jan 14 '11 at 20:41
in your caption needs one command a \protect – Herbert Jan 14 '11 at 20:45
This \newcommand definition doesn't cause the problem. \sf@@subfloat is defined by the subfig package. So I guess, the problem is caused by a fragile command within a subfigure caption. You might look for that. – Stefan Kottwitz Jan 14 '11 at 20:51
@None: You may also want to go ahead and delete this question (I read from your comment to the answer that it was just a problem with a typo, so the question is no longer relevant). For being able to delete, you have to register I guess. – Hendrik Vogt Jan 14 '11 at 20:54
@Hendrik: The question is no longer relevant with regard to the problem caused by my typo, but it's a valid question with a valid answer, so it may solve somebody's problem. I should have commented the cause here instead of in Harald's answer though. – None Jan 15 '11 at 16:30

\documentclass{minimal}