Direct ink writing techniques for in situ gelation and solidification