From 0306854192ba35861d2365a00f080e1f7710e03b Mon Sep 17 00:00:00 2001 From: bnewbold Date: Sat, 14 Jan 2017 19:41:27 -0800 Subject: add latex (via katex) to model pages --- webface/templates/base.html | 1 + webface/templates/model_view.html | 28 +++++++++++++++++++++++++--- 2 files changed, 26 insertions(+), 3 deletions(-) (limited to 'webface/templates') diff --git a/webface/templates/base.html b/webface/templates/base.html index 65dafa3..231dfd9 100644 --- a/webface/templates/base.html +++ b/webface/templates/base.html @@ -8,6 +8,7 @@ html, body, div{ margin: 0; padding: 0; } body { font-family: monospace; font-size: larger; line-height: 1.3; } #content { max-width: 700px; margin: 0 auto; margin-top: 4em; } +{{~#block head}}{{/block~}} 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}} + + + + + +{{/partial}} + + {{# partial content}}

@@ -10,16 +23,25 @@ markdown - modelica - scheme - -javascript +javascript - +latex

{{ model_description }}

+ +{{# if latex }} +

+$${{ latex }}$$ +
+{{/if}} + +{{{ markdown_html }}} + +

Modelica Code

 {{ modelica }}

-{{{ markdown_html }}} - {{/partial}} {{~> base.html~}} -- cgit v1.2.3