Commit 510dd854 by Piotr Mitros

Inline math now works in wiki

parent 737cdb37
......@@ -17,7 +17,7 @@ WIKI_USE_MARKUP_WIDGET = True
# Adds standard django login protection for viewing
WIKI_REQUIRE_LOGIN_VIEW = getattr(settings, 'SIMPLE_WIKI_REQUIRE_LOGIN_VIEW',
False)
True)
# Adds standard django login protection for editing
WIKI_REQUIRE_LOGIN_EDIT = getattr(settings, 'SIMPLE_WIKI_REQUIRE_LOGIN_EDIT',
......@@ -34,7 +34,7 @@ WIKI_ATTACHMENTS = getattr(settings, 'SIMPLE_WIKI_ATTACHMENTS',
# If false, attachments will completely disappear
WIKI_ALLOW_ATTACHMENTS = getattr(settings, 'SIMPLE_WIKI_ALLOW_ATTACHMENTS',
True)
False)
# If WIKI_REQUIRE_LOGIN_EDIT is False, then attachments can still be disallowed
WIKI_ALLOW_ANON_ATTACHMENTS = getattr(settings, 'SIMPLE_WIKI_ALLOW_ANON_ATTACHMENTS', False)
......@@ -88,6 +88,7 @@ WIKI_MARKDOWN_EXTENSIONS = getattr(settings, 'SIMPLE_WIKI_MARKDOWN_EXTENSIONS',
'codehilite',
'abbr',
'toc',
'mathjax',
'camelcase', # CamelCase-style wikilinks
'video', # In-line embedding for YouTube, etc.
#'image' # In-line embedding for images - too many bugs. It has a failed REG EXP.
......
......@@ -29,6 +29,12 @@
x();
}
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [ ['$','$'], ["\\(","\\)"]],
displayMath: [ ['$$','$$'], ["\\[","\\]"]]}
});
</script> <script type="text/javascript" src="/static/lib/mathjax/MathJax.js?config=TeX-AMS_HTML-full"></script>
{% block wiki_head %}
{% endblock %}
</head>
......
......@@ -411,8 +411,8 @@ def check_permissions(request, article, check_read=False, check_write=False, che
if WIKI_REQUIRE_LOGIN_VIEW:
view = login_required(view)
history = login_required(history)
search_related = login_required(search_related)
wiki_encode_err = login_required(wiki_encode_err)
# search_related = login_required(search_related)
# wiki_encode_err = login_required(wiki_encode_err)
if WIKI_REQUIRE_LOGIN_EDIT:
create = login_required(create)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment