Physics Derivation Graph navigation
Sign in
mathjax for github.io site
Published 2018-07-31T13:04:00.002Z by Physics Derivation Graph
For the project website hosted at
http://allofphysicsgraph.github.io/proofofconcept/
I've been using static PNGs generated off-line to render the expressions in the graph using d3js.
In order to dynamically enter content on a webpage without resorting to off-line rendering, I used MathJax to display content.
The javascript for MathJax is at
https://github.com/mathjax/MathJax/blob/master/MathJax.js
with instructions for use here
https://docs.mathjax.org/en/latest/configuration.html
I was able to get a page that accepts input and renders Latex input:
http://allofphysicsgraph.github.io/proofofconcept/site/mjtest
Source code for the page is here:
https://github.com/allofphysicsgraph/proofofconcept/blob/gh-pages/site/mjtest.html
Next I ran scaling tests for latency as a function of the number of rendered expressions in Chrome.
25 expressions:
http://allofphysicsgraph.github.io/proofofconcept/site/mjtest_scaling_25
DOMContentLoaded: 203 ms; Load: 516 ms; Finish: 835 ms
50 expressions:
http://allofphysicsgraph.github.io/proofofconcept/site/mjtest_scaling_50
DOMContentLoaded: 202 ms; Load: 548 ms; Finish: 977 ms
100 expressions:
http://allofphysicsgraph.github.io/proofofconcept/site/mjtest_scaling_100
DOMContentLoaded: 220 ms; Load: 538 ms; Finish: 1140 ms