{{- with $.Page.Scratch.Get "marginnoteCounter" -}}
{{- $.Page.Scratch.Set "marginnoteCounter" (add . 1) -}}
{{- else -}}
{{- $.Page.Scratch.Set "marginnoteCounter" 1 -}}
{{- end -}}
{{- $label := $.Page.Scratch.Get "marginnoteCounter" -}}
{{- $ind := .Get "ind" | default .Site.Params.marginNoteInd -}}
{{ .Inner | markdownify}}