text: Ketones are pervasive in nature. The formation of organic compounds in photosynthesis occurs via the ketone ribulose-1,5-bisphosphate. Many sugars are ketones, known collectively as ketoses. The best known ketose is fructose; it mostly exists as a cyclic hemiketal, which masks the ketone functional group. Fatty acid synthesis proceeds via ketones. Acetoacetate is an intermediate in the Krebs cycle which releases energy from sugars and carbohydrates.
  In medicine, acetone, acetoacetate, and beta-hydroxybutyrate are collectively called ketone bodies, generated from carbohydrates, fatty acids, and amino acids in most vertebrates, including humans. Ketone bodies are elevated in the blood (ketosis) after fasting, including a night of sleep; in both blood and urine in starvation; in hypoglycemia, due to causes other than hyperinsulinism; in various inborn errors of metabolism, and intentionally induced via a ketogenic diet, and in ketoacidosis (usually due to diabetes mellitus). Although ketoacidosis is characteristic of decompensated or untreated type 1 diabetes, ketosis or even ketoacidosis can occur in type 2 diabetes in some circumstances as well.