{%- if inline -%}
<span id="{{ 'equation' | id }}" class="cd-katex-equation"></span>
{%- else -%}
<div id="{{ 'equation' | id }}" class="cd-katex-equation"></div>
{%- endif -%}
<script>
  window.CAULDRON.on.ready.then(function () {
    katex.render(
        '{{ source }}',
        window.document.getElementById('{{ 'equation' | id }}'),
        {
          displayMode: {{ 'false' if inline else 'true' }},
          throwOnError: false
        }
    );
  });
</script>
