mirror of
https://github.com/jupyter/notebook.git
synced 2024-11-27 03:20:27 +08:00
install mathjax js/css
restrict to HTML-CSS + STIX-Web for size
This commit is contained in:
parent
052b568a6f
commit
e520a89e54
@ -23,6 +23,10 @@ define([
|
|||||||
// we use CSS to left justify single line equations in code cells.
|
// we use CSS to left justify single line equations in code cells.
|
||||||
displayAlign: 'center',
|
displayAlign: 'center',
|
||||||
"HTML-CSS": {
|
"HTML-CSS": {
|
||||||
|
availableFonts: [],
|
||||||
|
imageFont: null,
|
||||||
|
preferredFont: null,
|
||||||
|
webFont: "STIX-Web",
|
||||||
styles: {'.MathJax_Display': {"margin": 0}},
|
styles: {'.MathJax_Display': {"margin": 0}},
|
||||||
linebreaks: { automatic: true }
|
linebreaks: { automatic: true }
|
||||||
}
|
}
|
||||||
|
19
setupbase.py
19
setupbase.py
@ -138,6 +138,25 @@ def find_package_data():
|
|||||||
if f.endswith(('.js', '.css')):
|
if f.endswith(('.js', '.css')):
|
||||||
static_data.append(pjoin(parent, f))
|
static_data.append(pjoin(parent, f))
|
||||||
|
|
||||||
|
# Trim mathjax
|
||||||
|
mj = lambda *path: pjoin(components, 'MathJax', *path)
|
||||||
|
static_data.extend([
|
||||||
|
mj('MathJax.js'),
|
||||||
|
mj('config', 'TeX-AMS_HTML-full.js'),
|
||||||
|
mj('jax', 'output', 'HTML-CSS', '*.js'),
|
||||||
|
])
|
||||||
|
for tree in [
|
||||||
|
mj('localization'), # limit to en?
|
||||||
|
mj('fonts', 'HTML-CSS', 'STIX-Web', 'woff'),
|
||||||
|
mj('jax', 'input', 'TeX'),
|
||||||
|
mj('jax', 'output', 'HTML-CSS', 'autoload'),
|
||||||
|
mj('jax', 'output', 'HTML-CSS', 'fonts', 'STIX-Web'),
|
||||||
|
]:
|
||||||
|
for parent, dirs, files in os.walk(tree):
|
||||||
|
for f in files:
|
||||||
|
static_data.append(pjoin(parent, f))
|
||||||
|
|
||||||
|
|
||||||
os.chdir(os.path.join('tests',))
|
os.chdir(os.path.join('tests',))
|
||||||
js_tests = glob('*.js') + glob('*/*.js')
|
js_tests = glob('*.js') + glob('*/*.js')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user