Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
1e08164d
Commit
1e08164d
authored
Aug 18, 2012
by
Bridger Maxwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added MathJax to wiki pages.
parent
0598a471
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
5 deletions
+35
-5
common/templates/mathjax_include.html
+11
-1
lms/envs/common.py
+3
-0
lms/templates/main_django.html
+1
-1
lms/templates/wiki/base.html
+15
-3
lms/templates/wiki/preview_inline.html
+5
-0
No files found.
common/templates/mathjax_include.html
View file @
1e08164d
##
##
mako
## File: templates/mathjax_include.html
##
## Advanced mathjax using 2.0-latest CDN for Dynamic Math
##
## This enables ASCIIMathJAX, and is used by js_textbox
%if mathjax_mode is not Undefined and mathjax_mode == 'wiki':
<script
type=
"text/x-mathjax-config"
>
MathJax
.
Hub
.
Config
({
tex2jax
:
{
inlineMath
:
[
[
'$'
,
'$'
],
[
"
\\
("
,
"
\\
)"
]],
displayMath
:
[
[
'$$'
,
'$$'
],
[
"
\\
["
,
"
\\
]"
]]}
});
</script>
%else:
<script
type=
"text/x-mathjax-config"
>
MathJax
.
Hub
.
Config
({
tex2jax
:
{
...
...
@@ -19,6 +28,7 @@
}
});
</script>
%endif
<!-- This must appear after all mathjax-config blocks, so it is after the imports from the other templates.
It can't be run through static.url because MathJax uses crazy url introspection to do lazy loading of
...
...
lms/envs/common.py
View file @
1e08164d
...
...
@@ -120,6 +120,9 @@ MAKO_TEMPLATES['main'] = [PROJECT_ROOT / 'templates',
# still left lying around.
TEMPLATE_DIRS
=
(
PROJECT_ROOT
/
"templates"
,
COMMON_ROOT
/
'templates'
,
COMMON_ROOT
/
'lib'
/
'capa'
/
'capa'
/
'templates'
,
COMMON_ROOT
/
'djangoapps'
/
'pipeline_mako'
/
'templates'
,
)
TEMPLATE_CONTEXT_PROCESSORS
=
(
...
...
lms/templates/main_django.html
View file @
1e08164d
...
...
@@ -17,7 +17,7 @@
<body
class=
"{% block bodyclass %}{% endblock %}"
>
{% include "navigation.html" %}
<section
class=
"content-wrapper"
>
{% block body %}{% endblock %}
...
...
lms/templates/wiki/base.html
View file @
1e08164d
...
...
@@ -5,9 +5,6 @@
{% block headextra %}
{% compressed_css 'course' %}
<script
src=
"{% static 'js/bootstrap-alert.js' %}"
></script>
<script
src=
"{% static 'js/bootstrap-collapse.js' %}"
></script>
<script
src=
"{% static 'js/bootstrap-modal.js' %}"
></script>
<script
type=
"text/javascript"
>
function
ajaxError
(){}
...
...
@@ -30,6 +27,21 @@
});
}
</script>
{% addtoblock 'js' %}
{% comment %} These scripts load at the bottom of the body {% endcomment %}
<script
src=
"{% static 'js/bootstrap-alert.js' %}"
></script>
<script
src=
"{% static 'js/bootstrap-collapse.js' %}"
></script>
<script
src=
"{% static 'js/bootstrap-modal.js' %}"
></script>
{% with mathjax_mode='wiki' %}
{% include "mathjax_include.html" %}
{% endwith %}
{% endaddtoblock %}
{% endblock %}
...
...
lms/templates/wiki/preview_inline.html
View file @
1e08164d
...
...
@@ -31,6 +31,11 @@
{% compressed_js 'application' %}
{% compressed_js 'module-js' %}
{% with mathjax_mode='wiki' %}
{% include "mathjax_include.html" %}
{% endwith %}
</body>
</html>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment