\newif\ifcc\IfFileExists{cc.cls}{\cctrue}{\ccfalse}\ifcc %%% Include your document here %%% (formatted as described in this documentation or %%% sketched by the template file cctemplate.tex). \else %%% Include cc-cls-inline.tex here. \typeout{Please call latex again.} \makeatletter\expandafter\@@end \fi