rbell,
if you are waiting for your "foreigner card", whether it's a student or permanent type residency, you must have some kind of stamped receipt from the Spanish authorities from when you turned in your application paperwork or when you signed and fingerprinted your card. THAT receipt SHOULD be enough to get you back into Spain, now, I say should because that is what the law says, that this is proof that you are in the process of getting more paperwork and until you either receive it or the government denies it, you are still legal. However, not all the custom officials know this

and the airline people most likely don't know it either or would know how to recognize it

but still, that is another good piece of paper to take with you if you're leaving Spain.
And like mariposita says, take copies of your matrícula and anything else that you have from the Complu that looks official and has lots of seals. And don't be afraid to question officials and to politely ask them to get their superiors or call the police office at General Pardiñas or wherever you're processing your papers so that they can confirm what you're telling them.
Good luck on your travels.
Lena
"que me quiten lo bailao"