Nutrition intake summary table

Purpose

The ### Summary table is a derived view of the currently logged nutrition items for that day.

After each nutrition-item write, rebuild the table and totals row from the item entries present in ## Nutrition.

Required table shape

### Summary

| Time {.whitespace-nowrap} | Item name | Calories {.whitespace-nowrap} | Carbs {.whitespace-nowrap} | Protein {.whitespace-nowrap} | Fats {.whitespace-nowrap} |
| --- | --- | ---: | ---: | ---: | ---: |
| [19:50](#1950) | grilled chicken breast, 5 small potatoes, roasted squash, and roasted peppers | 530-600 kcal | 45-55 g | 46-53 g | 14-20 g |
| **Total** |  | **2276-2506 kcal** | **229.25-263.75 g** | **101.75-115.25 g** | **106.25-121.25 g** |

Row-building rules

  • Use one row per logged item entry.
  • Link the time cell to the item heading anchor.
  • Use the human-readable Item: value as the item name.
  • Parse the Estimated intake: line for calories, carbohydrate, protein, and fat.
  • Preserve ranges when the item estimate is a range.
  • Keep rows in chronological order.

Totals rule

  • Recalculate totals from the currently logged summary rows, not from stale cached values.
  • If all items are single values, totals may be single values.
  • If any item uses a range, totals should remain ranges where appropriate.
  • Use the same unit formatting already used in the table.

Nutrition section order reminder

Keep ### Summary above the item-level entries and below any day-level synthesis subsections.