Field theory of strings in nonconformal gauges