{% macro ingredient(ingredient) %}
{%- set quantity = ingredient.quantity -%}
{%- if quantity is object -%}
{%- set value = quantity.value %}
{%- if value.decimal is defined -%}
{{ value.decimal.int }}.{{ value.decimal.frac }}
{%- elif value.fraction is defined -%}
{{ value.fraction.numer }}⁄{{ value.fraction.denom }}
{%- else -%}
{{ value.integer }}
{%- endif -%}
{%- if quantity.unit is string -%}
{{ " " }}{{ quantity.unit }}
{%- endif -%}
{%- endif -%}
{{ lf -}}
{{ lf -}}
{{ ingredient.name }}
{%- if ingredient.kind is string -%}
, {{ ingredient.kind }}
{%- endif %}
{%- if quantity is object and quantity.note is string -%}
{{ " ("}}{{ quantity.note }})
{%- endif -%}
{% endmacro ingredient %}