Carbon-based materials are important components of organic electronics, energy-harvesting devices, batteries, and sensors. Among the methods developed to produce well-defined carbon-rich materials, the pyrolysis of carbon precursors (CO2, ethanol, CO,...