Skip to content

Adding mathjax #209

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 12, 2016
Merged

Adding mathjax #209

merged 2 commits into from
Jul 12, 2016

Conversation

nadr0
Copy link
Contributor

@nadr0 nadr0 commented Jul 12, 2016

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 nadr0 mentioned this pull request Jul 12, 2016
@TornjV TornjV merged commit dc1ceda into algorithm-visualizer:master Jul 12, 2016
64json pushed a commit that referenced this pull request Jul 24, 2018
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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy