A study of the relation between surface alignment of polymers and liquid-crystal pretilt angle