I have the following construction for a figure. The background is, when \submit is defined, only the caption is included, but no figure. Otherwise the figure is included.
The problem is that I have two places in which the same caption needs to be put. It is a pain to keep this in sync. I'm hoping there is a easy way to save the text to a value, and input it to both places. I have multiple such figures, so I'd like to do this in as generic a way as possible. So, if I have n figures, I'd like one command or function, not n, to do the job. Also, this is for a journal which doesn't like extra packages, so I need a solution that doesn't require a special package. I'd also be interested in solutions that use a different approach.
\newcommand{\figlegend}{% figure legend
\refstepcounter{figure}% Increment counter for correct referencing
}
\ifdefined\submit \figlegend
Caption text
\label{schema}
\else
\par \mbox{}
\par
\begin{figure}[tp]
\begin{center}
\tikzsetnextfilename{Figure1-schema}
\input{SCHEMA}
\caption{%
Caption text
}
\label{schema}
\end{center}
\end{figure}
\fi
EDIT: I've edited the title to reflect more accurately what I'm trying to do here. @Mike Renfro thought that one could solve the issue by not including the figure if \submit was active. So, I've changed the code to what I'm actually using. The \input{SCHEMA} inputs a SCHEMA.tex file which contains TikZ/PGF code.
EDIT2: Edited title again. Unusually, I've accepted an answer that did not answer my original question. @Mike Renfro made a compelling case that I was asking the wrong question. I think his is a better answer to the question I wasn't asking, which was how to abstract out my conditional construct. Thanks Mike!
For reference, I'm including the Guidelines for Figure and Table Preparation of the journal in question, in question, PLoS ONE.



