A new restriction effect of hard templates for the shrinkage of mesoporous polymer during carbonization.