% (c) 2002 Matthew Boedicker <mboedick@mboedick.org> (original author)
%     http://mboedick.org
% (c) 2003-2007 David J. Grant <davidgrant-at-gmail.com> http://www.davidgrant.ca
% (c) 2008 Nathaniel Johnston <nathaniel@nathanieljohnston.com>
%     http://www.nathanieljohnston.com
%
% This work is licensed under the Creative Commons Attribution-Noncommercial-Share
% Alike 2.5 License. To view a copy of this license, visit
% http://creativecommons.org/licenses/by-nc-sa/2.5/ or send a letter to Creative
% Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA.
{% raw %}
\documentclass[letterpaper,11pt]{article}
\newlength{\outerbordwidth}
\pagestyle{empty}
\raggedbottom
\raggedright
\usepackage[svgnames]{xcolor}
\usepackage{framed, array}
\usepackage{tocloft}
\usepackage[backend=bibtex,maxnames=99]{biblatex}
\usepackage{hyperref}
\usepackage{times}
\usepackage{enumitem}
\usepackage[utf8]{inputenc}
\setlist{nosep} % or \setlist{noitemsep} to leave space around whole list

%-----------------------------------------------------------
% Hyperlink setup
\hypersetup{
    colorlinks=true,        % false: boxed links; true: colored links
    linkcolor=gray,          % color of internal links
    citecolor=green,        % color of links to bibliography
    filecolor=magenta,      % color of file links
    urlcolor=gray            % color of external links
}

%-----------------------------------------------------------
%Edit these values as you see fit

% Width of border outside of title bars
\setlength{\outerbordwidth}{3pt}
% Outer background color of title bars (0 = black, 1 = white)
\definecolor{shadecolor}{gray}{0.75}
% Inner background color of title bars
\definecolor{shadecolorB}{gray}{0.93}


%-----------------------------------------------------------
%Margin setup

\setlength{\evensidemargin}{-0.25in}
\setlength{\headheight}{0in}
\setlength{\headsep}{0in}
\setlength{\oddsidemargin}{-0.25in}
\setlength{\paperheight}{11in}
\setlength{\paperwidth}{8.5in}
\setlength{\tabcolsep}{0in}
\setlength{\textheight}{9.5in}
\setlength{\textwidth}{7in}
\setlength{\topmargin}{-0.3in}
\setlength{\topskip}{0in}
\setlength{\voffset}{0.1in}


%-----------------------------------------------------------
%Custom commands
\newcommand{\resitem}[1]{\item #1 \vspace{-2pt}}
\newcommand{\resheading}[1]{\vspace{8pt}
  \parbox{\textwidth}{\setlength{\fboxsep}{\outerbordwidth}
    \begin{shaded}
    \setlength{\fboxsep}{0pt}\framebox[\textwidth][l]{\setlength{\fboxsep}{4pt}\fcolorbox{shadecolorB}{shadecolorB}{\textbf{\sffamily{\mbox{~}\makebox[6.762in][l]{\large #1} \vphantom{p\^{E}}}}}}
    \end{shaded}
  }\vspace{-5pt}
}

\newcommand{\ressubheadingshort}[3]{
    \begin{center}
    \begin{tabular*}{6.5in}{l@{\extracolsep{\fill}}r}
        \multicolumn{2}{c}{\textbf{#1} \cftdotfill{\cftdotsep} #2} \\
        \textit{#3} & \\
        \vphantom{E}
    \end{tabular*}
    \end{center}
    \vspace{-24pt}
}

\newcommand{\ressubheading}[4]{
    \begin{center}
    \begin{tabular*}{6.5in}{l@{\extracolsep{\fill}}r}
        \multicolumn{2}{c}{\textbf{#1} \cftdotfill{\cftdotsep} #2} \\
        \multicolumn{2}{c}{\textit{#3} \cftdotfill{\cftdotsep} \textit{#4}} \\
        \vphantom{E}
    \end{tabular*}
    \end{center}
    \vspace{-24pt}
}

\newcommand{\ressubheadingitems}[5]{
    \begin{center}
    \begin{tabular*}{6.5in}{l@{\extracolsep{\fill}}r}
        \multicolumn{2}{c}{\textbf{#1} \cftdotfill{\cftdotsep} #2} \\
        \multicolumn{2}{p{6.5in}}{\textit{#3} \cftdotfill{\cftdotsep} \textit{#4}} \\
        \vphantom{E}
    \end{tabular*}
    \end{center}
    \vspace{-32pt}
    \begin{itemize}[label=$-$]\renewcommand{\labelitemi}{}
        \item\begin{itemize}[label=$-$]
        #5
        \end{itemize}
    \end{itemize}
}

\newcommand{\wideitem}[1]{\ \ \ \textemdash\ \ \  #1\par}
%-----------------------------------------------------------
{% endraw %}

% Bibliography
%\bibliography{ {{-p['_id']-}} }{}
%\bibliographystyle{nsf_simon}
\addbibresource{ {{-p['_id']-}} }
\begin{document}


\begin{tabular*}{7in}{l@{\extracolsep{\fill}}r}
\textbf{\Large {{p['title']}} {{p['name']}}} & \textbf{\today} \\
%{{employment[0]['organization'] if employment else ''}} & {{p['email']}} \\
%{{p.get('address', '')}} & {{p.get('phone', '')}} \\
\end{tabular*}
\\
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{Highlights from the period from {{ p["begin_period"] }} to {{ p["end_period"]}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{% for pr in projects %}
    {% if pr['current_highlights'] %}
\subsection*{Project: {{latex_safe(pr['name'])-}} }
    {% for h in pr['highlights'] %}
        {% if h["is_current"] %}
        \wideitem{  {{latex_safe(h["description"])-}} }
        {% endif %}
    {% endfor%}
        {% endif %}
{%endfor%}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{ Major research focus area(s) and current projects.}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection*{Research Focus Areas}
\begin{itemize}[label=$-$]
{% for areas in p["research_focus_areas"]%}
\item {{ latex_safe(areas["description"]) }}
{% endfor%}
\end{itemize}

%\subsection*{Current Projects}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{ Current and Pending grants and declined proposals in this period}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{% for grant_block, name in zip([pending, current, declined], ['Pending', 'Current', 'Declined']) %}
{% if len(grant_block) > 0 %}
{% for g in grant_block %}
\vskip 12pt\noindent
\textbf{Investigator:} {{ latex_safe(pi['name']) }}\
\textbf{Other Agencies to which proposal submitted:}
{{ latex_safe(g['cpp_info'].get("other_funders_submitted", 'None')) }}

\textbf{Support:}\ {{ name }}

\textbf{Project/Proposal Title:}  {{ latex_safe(g['title'])-}}
{% if g.get('multi_pi') %}
\ (multi-PI grant.  {{latex_safe(pi['initials'])}}
amt = \${{"{:,}".format(g['subaward_amount'])}})
{% endif %}

\textbf{Source of Support:}\
{{ g.get('funder', 'None') }}

\textbf{Total Award Amount}:
\${{-"{:,}".format(g.get('amount', 0)) }}\\
\textbf{Total Award Period Covered:}
{{g.get('award_start_date')}} - {{g.get('award_end_date')}}

\textbf{Location of Project:} {{ g['cpp_info'].get('institution' ) }}

\textbf{Person Months per Year Committed to Project:}
\textbf{Academic:} {{ g['cpp_info'].get('person_months_academic', 0) }}\
\textbf{Summer:} {{ g['cpp_info'].get('person_months_summer', 0) }}

\textbf{Describe Research Including Synergies and Delineation with
Respect to this Proposal/Award:} {{ g['cpp_info'].get('scope', 'N/A')-}}
{% endfor %}
{% endif %}
\vskip 14pt
{% endfor %}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{ Invited, key and plenary talks in the period from {{ p["begin_period"] }} to {{ p["end_period"]}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection*{Key Presentations (Award, Plenary or Keynote)}
{% if len(keypres) > 0 %}
\begin{enumerate}
{% for pres in keypres %}
\item {{ latex_safe(pres['authors'])-}}, {\bf {{ latex_safe(
sentencecase(pres['title']))-}} },
{%-set inst = pres['institution'] %}
{%-if pres['type'] in ['colloquium', 'seminar']%}
{\it {{ latex_safe(pres['type']).title()-}} },
{\it {{ latex_safe(pres['department']['name'])-}} },
{\it {{ latex_safe(inst['name'])-}} },
{\it {{ latex_safe(inst['city'])-}} }\
{\it {{ latex_safe(inst['state'])-}}},
{%-else %}
{\it {{ latex_safe(pres['meeting_name'])-}} },
{\it {{ latex_safe(pres['location'])-}} },
{%-endif %}
{ {{ latex_safe(monthstyle.get(pres['begin_month'],'None'))}} }
{{-pres['begin_day']-}}%
{%-if not pres['end_day'] or pres['end_day'] == pres['begin_day']%}
$^\mathrm{ {{ pres['begin_day_suffix']}} }$
{%-else %}
--{{ pres['end_day']-}}
$^\mathrm{ {{ pres['end_day_suffix']-}} }$
{%-endif %}
( {{-pres['begin_year']-}} ).
{% endfor %}
\end{enumerate}
{% else %}
None
{%-endif %}

\subsection*{Invited Talks}
{% if len(invpres) > 0 %}
\begin{enumerate}
{% for pres in invpres %}
\item {{ latex_safe(pres['authors'])-}}, {\bf {{ latex_safe(
sentencecase(pres['title']))-}} },
{%-set inst = pres['institution'] %}
{%-if pres['type'] in ['colloquium', 'seminar']%}
{\it {{ latex_safe(pres['type']).title()-}} },
{\it {{ latex_safe(pres['department']['name'])-}} },
{\it {{ latex_safe(inst['name'])-}} },
{\it {{ latex_safe(inst['city'])-}} }\
{\it {{ latex_safe(inst['state'])-}}},
{%-else %}
{\it {{ latex_safe(pres['meeting_name'])-}} },
{\it {{ latex_safe(pres['location'])-}} },
{%-endif %}
{ {{ latex_safe(monthstyle.get(pres['begin_month'],'None'))}} }
{{-pres['begin_day']-}}%
{%-if not pres['end_day'] or pres['end_day'] == pres['begin_day']%}
$^\mathrm{ {{ pres['begin_day_suffix']}} }$
{%-else %}
--{{ pres['end_day']-}}
$^\mathrm{ {{ pres['end_day_suffix']-}} }$
{%-endif %}
( {{-pres['begin_year']-}} ).
{% endfor %}
\end{enumerate}
{% else %}
None
{%-endif %}


\subsection*{Seminars and Colloquia}
{% if len(sempres) > 0 %}
\begin{enumerate}
{% for pres in sempres %}
\item {{ latex_safe(pres['authors'])-}}, {\bf {{ latex_safe(
sentencecase(pres['title']))-}} },
{%-set inst = pres['institution'] %}
{%-if pres['type'] in ['colloquium', 'seminar']%}
{\it {{ latex_safe(pres['type']).title()-}} },
{\it {{ latex_safe(pres['department']['name'])-}} },
{\it {{ latex_safe(inst['name'])-}} },
{\it {{ latex_safe(inst['city'])-}} }\
{\it {{ latex_safe(inst['state'])-}}},
{%-else %}
{\it {{ latex_safe(pres['meeting_name'])-}} },
{\it {{ latex_safe(pres['location'])-}} },
{%-endif %}
{ {{ latex_safe(monthstyle.get(pres['begin_month'],'None'))}} }
{{-pres['begin_day']-}}%
{%-if not pres['end_day'] or pres['end_day'] == pres['begin_day']%}
$^\mathrm{ {{ pres['begin_day_suffix']}} }$
{%-else %}
--{{ pres['end_day']-}}
$^\mathrm{ {{ pres['end_day_suffix']-}} }$
{%-endif %}
( {{-pres['begin_year']-}} ).
{% endfor %}
\end{enumerate}
{% else %}
None
{%-endif %}


\subsection*{Declined Invitations}
{% if len(declpres) > 0 %}
\begin{enumerate}
{% for pres in declpres %}
\item {{ latex_safe(pres['authors'])-}}, {\bf {{ latex_safe(
sentencecase(pres['title']))-}} },
{%-set inst = pres['institution'] %}
{%-if pres['type'] in ['colloquium', 'seminar']%}
{\it {{ latex_safe(pres['type']).title()-}} },
{\it {{ latex_safe(pres['department']['name'])-}} },
{\it {{ latex_safe(inst['name'])-}} },
{\it {{ latex_safe(inst['city'])-}} }\
{\it {{ latex_safe(inst['state'])-}}},
{%-else %}
{\it {{ latex_safe(pres['meeting_name'])-}} },
{\it {{ latex_safe(pres['location'])-}} },
{%-endif %}
{ {{ latex_safe(monthstyle.get(pres['begin_month'],'None'))}} }
{{-pres['begin_day']-}}%
{%-if not pres['end_day'] or pres['end_day'] == pres['begin_day']%}
$^\mathrm{ {{ pres['begin_day_suffix']}} }$
{%-else %}
--{{ pres['end_day']-}}
$^\mathrm{ {{ pres['end_day_suffix']-}} }$
{%-endif %}
( {{-pres['begin_year']-}} ).
{% endfor %}
\end{enumerate}
{% else %}
None
{%-endif %}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{ Honors and awards in the period from {{ p["begin_period"] }} to {{ p["end_period"]}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{% if len(ahs) == 0 %}
    {{ None }}
{% else %}
\begin{itemize}[label=$-$]
{% for ah in ahs %}
    \item {{ah['description']-}} \textemdash {{-ah['year']-}} \\
{% endfor %}
    \vphantom{E}
\end{itemize}\vspace*{-16pt}
{% endif %}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{ Publications in journals in the period from {{ p["begin_period"] }} to {{ p["end_period"]}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{% if len(pubs) == 0 %}
    {{ None }}
{% else %}
\begin{enumerate}
{% for pub in pubs %}
    \item \fullcite{ {{-pub['_id']-}} }
{% endfor %}
\end{enumerate}
{% endif %}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{ Publications in peer reviewed conferences in the period from {{ p["begin_period"] }} to {{ p["end_period"]}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{% if len(peer_rev_conf_pubs) == 0 %}
    {{ None }}
{% else %}
\begin{enumerate}
{% for pub in peer_rev_conf_pubs %}
    \item \fullcite{ {{-pub['_id']-}} }
{% endfor %}
\end{enumerate}
{% endif %}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{ Other published material in the period from {{ p["begin_period"] }} to {{ p["end_period"]}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{% if len(nonarticles) == 0 %}
    {{ None }}
{% else %}
\begin{enumerate}
{% for pub in nonarticles %}
    \item \fullcite{ {{-pub['_id']-}} }
{% endfor %}
\end{enumerate}
{% endif %}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{ Patents (appeared, granted, submitted) in the period from
             {{ p["begin_period"] }} to {{ p["end_period"] }} }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\textbf{Active Patents}
{% if len(patents) == 0 %}
    {{ None }}
{% else %}
\begin{itemize}[label=$-$]
{% for patent in patents %}
    \item \textbf{ {{-latex_safe(patent['title']) }} }, Inventors:
    {% for inventor in patent["inventors"] %}
    {{-inventor-}},\,\,
    {% endfor %}\\
    Status: {{ patent['status'] }}\\
    Events in this period:\\
    {% if not patent.get('events') %}
    {{ None }}
    {% else %}
    {% for event in patent["events"] %}
    {{ event["description"] }} \textemdash {{ event["year"] }}/{{ event["month"] }}/{{ event["day"] }}
    {% endfor %}
    {% endif %}
    \vphantom{E}
{% endfor %}
\end{itemize}\vspace*{-16pt}
{% endif %}

{% if ossoftware %}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{ Open source tools in the period from {{ p["begin_period"] }} to {{ p["end_period"]}} }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{% for pr in projects %}
{% if pr['type'] == "ossoftware" %}
    {% if pr['current_highlights'] %}
    \textbf{ {{ pr['name'] }} }\\
    {{ pr['description'] }}
    {% for h in pr.get('highlights', ()) %}
    {% if h["is_current"] %}
        \wideitem{  {{latex_safe(h['description'])-}} }
{% endif %}
    {% endfor%}
{% endif %}
{% endif %}
{%endfor%}
{% endif %}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{ Technology transfer, licensing, startups in the period from {{ p["begin_period"] }} to {{ p["end_period"]}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\textbf{License Distributions}
{% if len(licenses) == 0 %}
    {{ None }}
{% else %}
\begin{itemize}[label=$-$]
{% for license in licenses %}
    \item \textbf{ {{-latex_safe(license['title']) }} }\\ Developers:
    {% for inventor in license["inventors"] %}
    {{-inventor-}},\,\,
    {% endfor %}\\
    \textit{Proceeds:}\\
    Total Amount to date: \${{license["total_amount"]}}\\
    Amount this period:
    \begin{itemize}[label=$-$]
    {% for event in license["events"] %}
    \item {{ event["year"] }}/{{ event["month"] }}: \${{ event["amount"] }}
    {% endfor %}
    \end{itemize}
    \vphantom{E}
{% endfor %}
\end{itemize}\vspace*{-16pt}
{% endif %}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{ Key metrics or mechanisms to assess impact}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\textbf{ Metrics:}
{% if len(p["miscellaneous"]["metrics_for_success"]) == 0 %}
    {{ None }}
{% else %}
    \begin{itemize}[label=$-$]
       {% for metric in p["miscellaneous"]["metrics_for_success"] %}
            \item   {{latex_safe(metric)-}}
       {% endfor%}
    \end{itemize}
    {% if hindex %}
\textbf{ h-index:}
    \begin{itemize}[label=$-$]
            \item   h = {{ str(hindex['h']) }}
(since = {{hindex['since']}}, total citations = {{ hindex["citations"]-}} )\\
h-last five years = {{ str(hindex['h_last_five']) }}
(since = {{ hindex['year']-5 }}, total citations = {{ hindex["citations_last_five"]-}} )\\
pulled: {{ hindex["month"] }}/{{ hindex["day"] }}/{{ hindex["year"] }}\\
Google Scholar profile URL: {{ latex_safe_url(latex_safe(p["google_scholar_url"])) }}\\
    \end{itemize}{% endif %}{% endif %}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{ Courses taught in {{ p["pre_begin_period"][-4:] }} - {{ p["begin_period"][-4:] }} }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection*{Fall {{p["pre_begin_period"][-4:]}} }
{% for c in p['teaching'] %}
{% if c['year']|string in p["pre_begin_period"]  and c['semester'] == 'Fall'%}
\begin{itemize}[label=$-$]
        \item  {\bf {{latex_safe(c['course'])-}} }\\
                {% if 'none' not in c['courseid'] %}
                Enrollment: {{ latex_safe(c['enrollment']|string) }} \\
                {% if c.get('evaluation')%}
                Course overall evaluation score: {{ latex_safe(c['evaluation']['course_overall']|string)}}\\
                Instructor overall evaluation score: {{ latex_safe(c['evaluation']['instructor_overall']|string)}}\\
                Selected student comment:
                \begin{itemize}[label=$-$]\item {{ latex_safe(c['evaluation']['comments'][0])}}\end{itemize}
                {% endif%}{%endif%}
\end{itemize}
{% endif %}
{%endfor%}
\subsection*{Spring {{p["begin_period"][-4:]}} }
{% for c in p['teaching'] %}
{% if c['year']|string in p["begin_period"] and c['semester'] == 'Spring' %}
\begin{itemize}[label=$-$]
        \item  {\bf {{latex_safe(c['course'])-}} }\\
                {% if 'none' not in c['courseid'] %}
                Enrollment: {{ latex_safe(c['enrollment']|string) }} \\
                {% if c.get('evaluation')%}
                Course overall evaluation score: {{ latex_safe(c['evaluation']['course_overall']|string)}}\\
                Instructor overall evaluation score: {{ latex_safe(c['evaluation']['instructor_overall']|string)}}\\
                Selected student comment:
                \begin{itemize}[label=$-$]\item {{ latex_safe(c['evaluation']['comments'][0])}}\end{itemize}
                {% endif%}{%endif%}
\end{itemize}
{% endif %}
{%endfor%}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{ Courses taught in {{ p["begin_period"][-4:] }} - {{ p["end_period"][-4:]}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection*{Fall {{p["begin_period"][-4:]}} }
\begin{itemize}[label=$-$]
{% for c in p['teaching'] %}
    {% if c['year'] == p["begin_period"][-4:]|int and c['semester'] == 'Fall' %}
        \item  {\bf {{latex_safe(c['course'])-}} }\\
                {% if 'none' not in c['courseid'] %}
                Enrollment: {{ latex_safe(c['enrollment']|string) }} \\
                {% if c.get('evaluation')%}
                Course overall evaluation score: {{ latex_safe(c['evaluation']['course_overall']|string)}}\\
                Instructor overall evaluation score: {{ latex_safe(c['evaluation']['instructor_overall']|string)}}\\
                Selected student comment:
                \begin{itemize}[label=$-$]\item {{ latex_safe(c['evaluation']['comments'][0])}}\end{itemize}
                {% endif%}{%endif%}
    {% endif %}
{%endfor%}
\end{itemize}
\subsection*{Spring {{p["end_period"][-4:]}} }
\begin{itemize}[label=$-$]
{% for c in p['teaching'] %}
    {% if c['year'] == p["end_period"][-4:]|int and c['semester'] == 'Spring' %}
        \item  {\bf {{latex_safe(c['course'])-}} }\\
                {%- if 'none' not in c['courseid'] -%}
                Enrollment: {{ latex_safe(c['enrollment']|string) }} \\
                {%- if c.get('evaluation')-%}
                Course overall evaluation score: {{ latex_safe(c['evaluation']['course_overall']|string)}}\\
                Instructor overall evaluation score: {{ latex_safe(c['evaluation']['instructor_overall']|string)}}\\
                Selected student comment:
                \begin{itemize}[label=$-$]\item {{ latex_safe(c['evaluation']['comments'][0])}}\end{itemize}
                {%- endif-%}{%-endif-%}
    {%- endif -%}
{%endfor%}
\end{itemize}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{ Courses expected to teach in {{ p["end_period"][-4:] }} to {{ p["post_end_period"][-4:]}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection*{Fall {{p["end_period"][-4:]}} }
\begin{itemize}[label=$-$]
{% for c in p['teaching'] %}
    {% if c['year']|string in p["end_period"]  and c['semester'] == 'Fall' %}
        \item  {\bf {{latex_safe(c['course'])-}} }\\
    {% endif %}
{%endfor%}
\end{itemize}
\subsection*{Spring {{p["post_end_period"][-4:]}} }
\begin{itemize}[label=$-$]
{% for c in p['teaching'] %}
    {% if c['year']|string in p["post_end_period"]  and c['semester'] == 'Spring' %}
        \item  {\bf {{latex_safe(c['course'])-}} }\\
    {% endif %}
{%endfor%}
\end{itemize}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{ Current undergraduate advising }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{% if len(undergrads) == 0 %}
    {{ None }}
{% else %}
    \begin{itemize}[label=$-$]
    {% for ugr in undergrads %}
        \item   {{latex_safe(ugr['name'])-}} \textemdash {{latex_safe(ugr['role'])}}  \\
    {%endfor%}
    \end{itemize}
{% endif %}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{ Current MS advising }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{% if len(masters) == 0 %}
    {{ None }}
{% else %}
    \begin{itemize}[label=$-$]
    {% for ugr in masters %}
        \item   {{latex_safe(ugr['name'])-}} \textemdash {{latex_safe(ugr['role'])}}  \\
    {%endfor%}
    \end{itemize}
{% endif %}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{ Graduate and Postgraduate advising}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection*{ Primarily advised Ph.D. students who graduated in the past 5 years }
{% if len(graduatedphds) == 0 %}
    {{ None }}
{% else %}
    \begin{itemize}[label=$-$]
    {% for ugr in graduatedphds %}
        \item   {{latex_safe(ugr['name']) }}\textemdash Graduated {{ugr['end_year']}}  \\
    {%endfor%}
    \end{itemize}
{% endif %}
\subsection*{ Primarily advised Ph.D. students with dissertations in progress }
{% if len(currentphds) == 0 %}
    {{ None }}
{% else %}
    \begin{itemize}[label=$-$]
    {% for ugr in currentphds %}
        \item   {{latex_safe(ugr['name'])-}}  \\
    {%endfor%}
    \end{itemize}
{% endif %}
\subsection*{ Other (examination committees, GSAS, CUMC advising etc.) }
{% if len(phd_defenses) == 0 %}
     No PhD defense committees this period\\
{% else %}
     PhD defense committees:\\
    \begin{itemize}[label=$-$]
    {% for ugr in phd_defenses %}
        \item   PhD defense for {{latex_safe(ugr['name'])-}}
            {% if ugr.get("unit")%} ({{- ugr.get("unit") -}}){%endif%}\\
    {%endfor%}
    \end{itemize}
{% endif %}
{% if len(phd_proposals) == 0 %}
{% else %}
     PhD proposal committees:\\
    \begin{itemize}[label=$-$]
    {% for ugr in phd_proposals %}
        \item   PhD proposal for {{latex_safe(ugr['name'])-}}
            {% if ugr.get("unit")%} ({{- ugr.get("unit") -}}){%endif%}\\
    {%endfor%}
    \end{itemize}
{% endif %}
{% if len(phd_orals) == 0 %}
{% else %}
     PhD oral committees:\\
    \begin{itemize}[label=$-$]
    {% for ugr in phd_orals %}
        \item   PhD oral for {{latex_safe(ugr['name'])-}}
            {% if ugr.get("unit")%} ({{- ugr.get("unit") -}}){%endif%}\\
    {%endfor%}
    \end{itemize}
{% endif %}


\subsection*{ Postdoctoral researchers and research scientists supported on grants}
{% if len(postdocs) == 0 %}
    {{ None }}
{% else %}
    \begin{itemize}[label=$-$]
    {% for ugr in postdocs %}
        \item   {{latex_safe(ugr['name'])-}}  \\
    {%endfor%}
    \end{itemize}
{% endif %}
\subsection*{ Self-funded visitors contributing to research}
{% if len(visitors) == 0 %}
    {{ None }}
{% else %}
    \begin{itemize}[label=$-$]
    {% for ugr in visitors %}
        \item   {{latex_safe(ugr['name'])-}}\textemdash {{ugr['position']}}  \\
    {%endfor%}
    \end{itemize}
{% endif %}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{ Activities for developing and improving curriculum, teaching materials and methodologies}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{% if len(curric_dev) == 0 %}
    {{ None }}
{% else %}
    \begin{itemize}[label=$-$]
    {% for ugr in curric_dev %}
        {% for s in ugr['activities'] %}
            \item   {{ s['name']-}}{%-if s['role']-%}
                \\ {\it {{s['role']}} }
                {%endif-%}
                {%-if s['other']-%}
                \\ {{s['other']}}
                {%-endif-%}
                        {% endfor%}
    {%endfor%}
    \end{itemize}
{% endif %}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{ Service to the Department in the period from {{ p["begin_period"] }} to {{ p["end_period"]}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{% if len(dept_service) == 0 %}
    {{ None }}
{% else %}
    \begin{itemize}[label=$-$]
        {% for s in dept_service %}
            \item   {{ s['name']-}}  \\
        {% endfor%}
    \end{itemize}
{% endif %}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{ Service to the School or University in the period from {{ p["begin_period"] }} to {{ p["end_period"]}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{% if len(uni_service) == 0 %}
    {{ None }}
{% else %}
    \begin{itemize}[label=$-$]
        {% for s in uni_service %}
            \item   {{ s['name']-}}
                {% if s['month'] and s['year'] %}
                \textemdash {{s['month']}}/{{s['year']}}
                {% endif %}
                {%-if s['other']-%}
                \\ {{s['other']}}
                {%-endif-%}
                        {% endfor%}
    \end{itemize}
{% endif %}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{ Service to the profession in the period from {{ p["begin_period"] }} to {{ p["end_period"]}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{% if len(prof_service) == 0 %}
    {{ None }}
{% else %}
    \begin{itemize}[label=$-$]
        {% for s in prof_service %}
            \item   {{ latex_safe(s['name'])-}}{%-if s['role']-%}
                \\ {\it {{s['role']}} }
                {%endif-%}
                {%-if s['other']-%}
                    \begin{itemize}[label=$-$]
                            {% for otherthing in s['other'] %}
                \item {{latex_safe(otherthing)}}
                {% endfor %}
                \end{itemize}
                {%-endif-%}
                        {% endfor%}
    \end{itemize}
{% endif %}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{ Outreach to communities in the period from {{ p["begin_period"] }} to {{ p["end_period"]}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{% if len(outreach) == 0 %}
    {{ None }}
{% else %}
    \begin{itemize}[label=$-$]
        {% for s in outreach %}
            \item   {{ s['name']-}}{%-if s['role']-%}
                \\ {\it {{s['role']}} }
                {%endif-%}
                {%-if s['other']-%}
                    \begin{itemize}[label=$-$]
                            {% for otherthing in s['other'] %}
                \item {{latex_safe(otherthing)}}
                {% endfor %}
                \end{itemize}
                {%-endif-%}
                        {% endfor%}
    \end{itemize}
{% endif %}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{ Laboratory space I currently utilize to conduct research}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{% if len(lab) == 0 %}
    {{ None }}
{% else %}
    \begin{itemize}[label=$-$]
    {% for ugr in lab %}
        {% for s in ugr['facilities'] %}
            \item   {{ s['name']-}}{%-if s['role']-%}
                \\ {\it {{s['role']}} }
                {%endif-%}
                {%-if s['other']-%}
                \\ {{s['other']}}
                {%-endif-%}
                        {% endfor%}
    {%endfor%}
    \end{itemize}
{% endif %}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{ Shared laboratory space I currently utilize to conduct research}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{% if len(shared) == 0 %}
    {{ None }}
{% else %}
    \begin{itemize}[label=$-$]
    {% for ugr in shared %}
        {% for s in ugr['facilities'] %}
            \item   {{ s['name']-}}{%-if s['role']-%}
                \\ {\it {{s['role']}} }
                {%endif-%}
                {%-if s['other']-%}
                \\ {{s['other']}}
                {%-endif-%}
                        {% endfor%}
    {%endfor%}
    \end{itemize}
{% endif %}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{ Other resources utilized in the Department, School and University }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{% if len(facilities_other) == 0 %}
    {{ None }}
{% else %}
    \begin{itemize}[label=$-$]
    {% for ugr in facilities_other %}
        {% for s in ugr['facilities'] %}
              \item   {{ s['name']-}}
               {%-if s['role']-%}
              \\ {\it {{s['role']}} }
                {%endif-%}
                {%-if s['other']-%}
                \\ {{s['other']}}
                {%-endif-%}
           {% endfor%}
    {%endfor%}
    \end{itemize}
{% endif %}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{ Additional resources and enhancements that would have a large impact on research}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{% if len(fac_wishlist) == 0 %}
    {{ None }}
{% else %}
    \begin{itemize}[label=$-$]
    {% for ugr in fac_wishlist %}
        {% for s in ugr['facilities'] %}
            \item   {{ s['name']-}}{%-if s['role']-%}
                \\ {\it {{s['role']}} }
                {%endif-%}
                {%-if s['other']-%}
                \\ {{s['other']}}
                {%-endif-%}
                        {% endfor%}
    {%endfor%}
    \end{itemize}
{% endif %}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{ Resources utilized for teaching }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{% if len(fac_teaching) == 0 %}
    {{ None }}
{% else %}
    \begin{itemize}[label=$-$]
    {% for ugr in fac_teaching %}
        {% for s in ugr['facilities'] %}
            \item   {{ s['name']-}}{%-if s['role']-%}
                \\ {\it {{s['role']}} }
                {%endif-%}
                {%-if s['other']-%}
                \\ {{s['other']}}
                {%-endif-%}
                        {% endfor%}
    {%endfor%}
    \end{itemize}
{% endif %}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{ Additional resources and enhancements that would have a large impact on teaching}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{% if len(tch_wishlist) == 0 %}
    {{ None }}
{% else %}
    \begin{itemize}[label=$-$]
    {% for ugr in tch_wishlist %}
        {% for s in ugr['facilities'] %}
            \item   {{ s['name']-}}{%-if s['role']-%}
                \\ {\it {{s['role']}} }
                {%endif-%}
                {%-if s['other']-%}
                \\ {{s['other']}}
                {%-endif-%}
                        {% endfor%}
    {%endfor%}
    \end{itemize}
{% endif %}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{ Additional activities or Information }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{% if len(other_activities) == 0 %}
    {{ None }}
{% else %}
    \begin{itemize}[label=$-$]
    {% for ugr in other_activities %}
        {% for s in ugr['activities'] %}
            \item   {{ s['name']-}}{%-if s['role']-%}
                \\ {\it {{s['role']}} }
                {%endif-%}
                {%-if s['other']-%}
                \\ {{s['other']}}
                {%-endif-%}
                        {% endfor%}
    {%endfor%}
    \end{itemize}
{% endif %}

\end{document}
{% for pr in projects %}
\ressubheadingitems{Project: {{-latex_safe(pr['name'])-}} }
    { Columbia University }
    { PhD }
    { June 1968 }
    { {% for h in pr.get('highlights', ()) %}
        \resitem{ {{-latex_safe(h['description'])-}} }
      {% endfor%}
    }
{%endfor%}
{% for pr in projects %}
\ressubheading{Project: {{-latex_safe(pr['name'])-}} }
    { Columbia University }
    { PhD }
    { {% for h in pr.get('highlights', ()) %}
        { {{-latex_safe(h['description'])-}} }
      {% endfor%}
    }
{%endfor%}
{% for pr in projects %}
\ressubheadingshort{Project: {{-latex_safe(pr['name'])-}} }
    { Columbia University }
    { {% for h in pr.get('highlights', ()) %}
        { {{-latex_safe(h['description'])-}} }
      {% endfor%}
    }
{%endfor%}

\end{document}
