Giter Club home page Giter Club logo

Comments (6)

Keats avatar Keats commented on August 25, 2024

Coming from reddit for Gutenberg: am I correct in thinking that katex/mathjax rendering is done in JavaScript? If so it could easily be done as a shortcode no?

from pikelet.

brendanzab avatar brendanzab commented on August 25, 2024

Thanks for stopping by! I was kind of assuming you'd use the autorender extension, but then you get the issue of escaping all the maths with the double back slashes. Wish there was a way to give inline code and code blocks ids. That way you could just mark the elements you wanted to apply the maths to, and still have it be visible in the github markdown previews.

from pikelet.

brendanzab avatar brendanzab commented on August 25, 2024

For reference, this is what the theory page looks like currently in Github. Blergh.

from pikelet.

brendanzab avatar brendanzab commented on August 25, 2024

I mean, ideally this would all be done using KaTeX's serverside rendering feature. This would require executing bits of Javascript and then inlining the results into the rendered page though, which might be a pain to implement in Gutenberg.

from pikelet.

Keats avatar Keats commented on August 25, 2024

This would require executing bits of Javascript and then inlining the results into the rendered page though, which might be a pain to implement in Gutenberg.

Yeah running JS from Rust is not going to be nice. Ideally there would be a C/Rust implementation that could have a wasm target for browsers but I'm not sure some people have that much free time/will to reimplement. Unless that happens, I don't think you will get nice markdown output using anything other than a JavaScript environment :/

from pikelet.

brendanzab avatar brendanzab commented on August 25, 2024

Yeah, after messing around with a few options, I'm thinking I'm going to be going with a JavaScript solution, like VuePress or Docusaurus, for better or worse! Thanks a bunch for your assistance though, I really appreciate it! I have a bit of a weird use case I'll admit! 😅

from pikelet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.