# Can't include child document in subfigure

I'd like to save the PSTicks code for my images in seperate files and then include them with \include{image.tex}. This works fine with normal figure floats. But when I use subfloats, I get the error:

(./newfile1.aux (./file.tex.aux))
! Missing } inserted.
<inserted text>
}
l.11    }


This minimal example works fine (file.tex can be also empty), but throws an error when the comment marks are removed:

\documentclass[english]{article}
\usepackage{pst-plot}
\usepackage{pstricks}
\usepackage{pst-node}
\usepackage{subfig}
\begin{document}
\begin{figure}

%\subfloat[]{
\include{file.tex}
%}

\caption{Caption}

\end{figure}

\end{document}


The minimal example works as expected also if the include command is replaced by the content of the file.

-

\include is the wrong command for sure. It's meant for parts of the document structure like chapters which get their own .aux files.
Try \input.
Thanks, that solved everything. I didn't think about that, because it was working with out subfloats and I was using \include a lot before, but it was wrong everywhere... – lumbric Mar 26 '12 at 7:55