Composition and preparation for hafnium carbide ceramic precursor