aboutsummaryrefslogtreecommitdiffstats
path: root/webface/templates/model_view.html
diff options
context:
space:
mode:
Diffstat (limited to 'webface/templates/model_view.html')
-rw-r--r--webface/templates/model_view.html28
1 files changed, 25 insertions, 3 deletions
diff --git a/webface/templates/model_view.html b/webface/templates/model_view.html
index 4218f11..7b8a64d 100644
--- a/webface/templates/model_view.html
+++ b/webface/templates/model_view.html
@@ -1,3 +1,16 @@
+{{# partial head}}
+<link href="/static/katex-0.7.0/katex.min.css" rel="stylesheet">
+<script src="/static/katex-0.7.0/katex.min.js"></script>
+<script src="/static/katex-0.7.0/contrib/auto-render.min.js"></script>
+
+<script>
+ document.addEventListener("DOMContentLoaded", function() {
+ renderMathInElement(document.body);
+ });
+</script>
+{{/partial}}
+
+
{{# partial content}}
<h1 style="margin-bottom: 0.1em;">
<a href="/m/{{namespace}}/" style="color: black; text-decoration: none;">
@@ -10,16 +23,25 @@
<a href="markdown/">markdown</a> -
<a href="raw/">modelica</a> -
<a href="repr/?format=scheme">scheme</a> -
-<a href="repr/?format=javascript">javascript</a>
+<a href="repr/?format=javascript">javascript</a> -
+<a href="repr/?format=latex">latex</a>
</span>
<p><i style="color: #222222;">{{ model_description }}</i>
<br><br>
+
+{{# if latex }}
+<div style="margin-left: 0.25em; border-left: 4px solid #BBBBBB; padding: 0.5em;" id="model_latex">
+$${{ latex }}$$
+</div>
+{{/if}}
+
+{{{ markdown_html }}}
+
+<h2>Modelica Code</h2>
<pre style="margin-left: 0.25em; border-left: 4px solid #BBBBBB; padding: 0.5em;">
{{ modelica }}</pre>
<br>
-{{{ markdown_html }}}
-
{{/partial}}
{{~> base.html~}}