((* import "components/entry.tex.j2" as entry with context *))

((* macro section_contents(title, entries, entry_type, link_text=none)*))
    ((* for value in entries *))
        ((* if title in theme_options.show_timespan_in *))
            ((* set date_and_location_strings = value.date_and_location_strings_with_timespan *))
        ((* else *))
            ((* set date_and_location_strings = value.date_and_location_strings_without_timespan *))
        ((* endif *))
        ((* if entry_type == "EducationEntry" *))
    <<entry["education"](
        study_type=value.study_type,
        institution=value.institution,
        area=value.area,
        highlights=value.highlight_strings,
        date_and_location_strings=date_and_location_strings
    )|indent(4)>>
        ((* elif entry_type == "ExperienceEntry" *))
    <<entry["experience"](
        company=value.company,
        position=value.position,
        highlights=value.highlight_strings,
        date_and_location_strings=date_and_location_strings
    )|indent(4)>>
        ((* elif entry_type == "NormalEntry" *))
    <<entry["normal"](
        name=value.name,
        highlights=value.highlight_strings,
        date_and_location_strings=date_and_location_strings,
        markdown_url=value.markdown_url,
        link_text=link_text,
    )|indent(4)>>
        ((* elif entry_type == "OneLineEntry" *))
    <<entry["one_line"](
        name=value.name,
        details=value.details,
        markdown_url=value.markdown_url,
        link_text=link_text,
    )|indent(4)>>
        ((* elif entry_type == "PublicationEntry" *))
    <<entry["publication"](
        title=value.title,
        authors=value.authors,
        journal=value.journal,
        date=value.month_and_year,
        doi=value.doi,
        doi_url=value.doi_url,
    )|indent(4)>>
        ((* endif *))
        ((* if not loop.last *))
    \vspace*{<<theme_options.margins.entry_area.vertical_between>>}
    
        ((* endif *))
    ((* endfor *))
((* endmacro *))
