FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Adding mathjax by nadr0 · Pull Request #209 · algorithm-visualizer/algorithm-visualizer · GitHub

Adding mathjax - #209

Merged
TornjV merged 2 commits into
algorithm-visualizer:masterfrom
nadr0:adding-mathjax
Jul 12, 2016
Merged

Adding mathjax#209
TornjV merged 2 commits into
algorithm-visualizer:masterfrom
nadr0:adding-mathjax

Conversation

nadr0 commented Jul 12, 2016

Copy link
Copy Markdown
Contributor

Here is a quick sample of MathJax working. I am using their servers for the rendering of MathJax because the library is rather large. Whenever an algorithm is clicked it loads all the data and the last call is to render the MathJax. Also if this goes through I can help change each algorithm to use latex for the time/space complexity. I only changed a few to see if we want to use MathJax.

Notes:
You will need to add an extra \ for every \ when writing the latex in a javascript string. I currently do not know a work around for this.
Latex: $$O(n\,(log\,n)(log\,log\,n))$$
Javascript Version: $$O(n\\,(log\\,n)(log\\,log\\,n))$$

You can also write latex inside the algorithm description, i.g.

{
  "Knight’s tour problem": "A knight's  $$LATEX CAN GO HERE! \\Theta$$ tour is a sequence of moves of a knight on a chessboard such that the knight visits every square only once. If the knight ends on a square that is one knight's move from the beginning square (so that it could tour the board again immediately, following the same path), the tour is closed, otherwise it is open.",
  "Complexity": {
    "time": "Worst $$O(8^{N^{2}})$$",
    "space": "Worst $$O(N^2)$$"
  },
  //etc...
}

nadr0 mentioned this pull request Jul 12, 2016
TornjV merged commit dc1ceda into algorithm-visualizer:master Jul 12, 2016
64json pushed a commit that referenced this pull request Jul 24, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL