{%- extends 'base.jinja2' -%}

{%- block header -%}
{% if number_string %}<span class="number">{{ number_string }}</span> {% endif %}<span class="title">{% autoescape false %}{{ title }}{% endautoescape %}</span>{% if link %}<span class="link"><a href="{{ link }}" target="_blank" title="{{ link }}"></a></span>{% endif %}
{%- endblock -%}

{%- block figure -%}
<div class="content">{% autoescape false %}{{ content }}{% endautoescape %}</div>
<p class="caption"><span class="prefix">{{ prefix }}</span> {% if number_string %}<span class="number">{{ number_string }}</span>{% endif %}
{% if title %}<span class="title">{% autoescape false %}{{ title }}{% endautoescape %}</span>{% endif %}</p>
{%- endblock -%}

{%- block other -%}
<p class="caption"><span class="prefix">{{ prefix }}</span> {% if number_string %}<span class="number">{{ number_string }}</span>{% endif %}
{% if title %}<span class="title">{% autoescape false %}{{ title }}{% endautoescape %}</span>{% endif %}</p>
<div class="content">{% autoescape false %}{{ content }}{% endautoescape %}</div>
{%- endblock -%}

{%- block equation -%}
<p>
{% autoescape false %}{{ "\\begin{" + environment + "}\n" + content }}
{% if tag %}{{ "\\label{" + tag + "}\n" }}{% endif %}{{ "\\end{" + environment +"}\n" }}{% endautoescape %}
</p>
{%- endblock -%}
