{{ $ := .root }} {{ $page := .page }} {{ $pubs_len := len (where $.Site.RegularPages "Type" "publication") }}
{{ . | markdownify }}
{{ end }} {{ if gt $pubs_len $page.Params.count }} {{ end }}{{ . | markdownify }}
{{ end }} {{ if and ($page.Params.publication_type) (ne $page.Params.publication_type "-1") }} {{ $.Scratch.Set "recent_pubs" (where (where $.Site.RegularPages "Type" "publication") ".Params.publication_types" "intersect" (slice $page.Params.publication_type)) }} {{ else }} {{ $.Scratch.Set "recent_pubs" (where $.Site.RegularPages "Type" "publication") }} {{ end }} {{ if $page.Params.exclude_selected }} {{ $.Scratch.Set "recent_pubs" ( ($.Scratch.Get "recent_pubs") | intersect (where (where $.Site.RegularPages "Type" "publication") ".Params.selected" "!=" true) ) }} {{ end }} {{ $recent_pubs := $.Scratch.Get "recent_pubs" }} {{ range first $page.Params.count $recent_pubs }} {{ if eq $page.Params.list_format 1 }} {{ partial "publication_li_detailed" . }} {{ else if eq $page.Params.list_format 2 }} {{ partial "publication_li_apa" . }} {{ else if eq $page.Params.list_format 3 }} {{ partial "publication_li_mla" . }} {{ else }} {{ partial "publication_li_simple" . }} {{ end }} {{ end }}