{{ define "title" }}{{ .Title }} - {{ .Site.Title }}{{ end }} {{ define "content" }} {{ partial "research/styles.html" . }} {{- $segments := split (strings.TrimPrefix "/" (strings.TrimSuffix "/" .RelPermalink)) "/" -}} {{- $depth := len $segments -}} {{- if eq $depth 1 -}} {{/* Research root: optional intro (content of _index.md), then data-driven publication list. */}} {{- with .Content }}
{{ . }}
{{ end -}} {{- $pubs := hugo.Data.publications.publications -}} {{- $groups := slice (dict "type" "phdthesis" "label" "PhD Theses" "prefix" "T") (dict "type" "journal" "label" "Journal Articles" "prefix" "J") (dict "type" "conference" "label" "Conference Publications" "prefix" "C") (dict "type" "lecture" "label" "Lectures" "prefix" "L") -}} {{- range $groups -}} {{- $group := . -}} {{- $filtered := where $pubs "type" $group.type -}} {{- $grouped := sort $filtered "year" "desc" -}} {{- with $grouped -}}

{{ $group.label }}

{{- $count := len . -}} {{- range $i, $pub := . -}} {{- $num := sub $count $i -}} {{- $prefix := printf "%s%d" $group.prefix $num -}} {{ partial "research/publication-entry.html" (dict "pub" $pub "prefix" $prefix) }} {{- end -}}
{{- end -}} {{- end -}} {{- else if eq $depth 2 -}} {{/* Paper landing page. */}} {{ partial "research/paper-body.html" . }} {{- else -}} {{/* Nested notebook section (e.g. tikz/_index.md). */}}

{{ .Title }}

{{ partial "research/toc.html" . }}
{{ .Content }} {{- if .Pages }}

Pages

{{- end }}
{{- end -}} {{ end }}