Catalysts in syntheses of carbon and carbon precursors