Transfer of the macroscopic alignment of mesophases into the solid state