Phase transition of nematic to smectic C through an intermediate boundary induced smectic A structure