1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
{{ range .Data.publications }}
<div class="item">
{{- if .link }}
<a href="{{ .link }}">
{{- end -}}
{{- if eq $.Feature.style "IEEE" }}
<span>
{{- range .authors -}}
{{- substr .first_name 0 1 }}. {{ with .middle_name }}{{ substr . 0 1 }}. {{ end }}{{ .last_name }},
{{- end -}}
</span>
<span>"{{ .title }}",</span>
{{- if .journal }}
<span>
{{- "" -}}
<i>{{ .journal }}</i>,
{{- with .vol }} vol. {{.}},{{ end -}}
{{- with .page }} pp. {{.}},{{ end -}}
</span>
{{- else if .thesis }}
<span>{{ .thesis }},</span>
{{- end }}
<span>{{ .date }}</span>.
{{- else if eq $.Feature.style "APA" }}
<span>
{{- $last_index := sub (.authors | len) 1 -}}
{{- range $i, $e := .authors -}}
{{- if and (gt $i 0) (eq $i $last_index) }}& {{ end -}}
{{- $e.last_name }}, {{ substr $e.first_name 0 1 }}.{{ with $e.middle_name }} {{ substr . 0 1 }}.{{ end -}}
{{- if ne $i $last_index }}, {{ end -}}
{{- end -}}
</span>
<span>({{ .date }}).</span>
<span>{{ .title }}.</span>
{{- if .journal }}
<span>
{{- "" -}}
<i>{{- .journal -}}</i>
{{- if .vol }}, <i>{{.vol}}</i>{{with .issue}}({{.}}){{end}}{{ end -}}
{{- with .page }}, pp.{{.}}{{ end -}}
.
{{- "" -}}
</span>
{{ end }}
{{- else }}
<span>
{{- $last_index := sub (.authors | len) 1 -}}
{{- range $i, $e := .authors -}}
{{- if and (gt $i 0) (eq $i $last_index) }}and {{ end -}}
{{- $e.last_name }}, {{ substr $e.first_name 0 1 }}.{{ with $e.middle_name }} {{ substr . 0 1 }}.{{ end -}}
{{- if ne $i $last_index }}, {{ end -}}
{{- end -}}
,
{{- "" -}}
</span>
{{ with .date }}<span>{{.}}.</span>{{ end }}
<span>{{ .title }}</span>
{{- end -}}
{{- if .link }}
</a>
{{- end }}
</div>
{{ end }}
|