GithubHelp home page GithubHelp logo

Comments (5)

drlippman avatar drlippman commented on May 3, 2024

Interesting.  I think I used DOM in the current just because it was what was used in the original asciimathml script and I was trying to keep it as consistent as possible.
For a DOM-less approach, it might me helpful to look at the php version of the script.
I'd welcome a  PR, but maybe as a separate file rather than as a modification of the existing script, at least for now.
On Mar 22, 2016 11:05 AM, Riley Eynon-Lynch [email protected] wrote:Ahoy! We are going to try to use your text processing functions in https://github.com/asciimath/asciimathml/blob/master/asciimath-based/ASCIIMathTeXImg.js in a few different environments, including in a DOMless node.js app. To that end, we're going to separate out the DOM-related components (which we don't need) and the auto-loading code.

Would you like a PR back with these changes, or does this break your API too much? We could try to preserve the API by making the default behavior the same, but I imagine we will at least have to force the user to manually call initialization code (maybe that's the user's responsibility anyway?).

Thanks again for an amazing library! We are looking forward to using it.

—You are receiving this because you are subscribed to this thread.Reply to this email directly or view it on GitHub

from asciimathml.

rileylark avatar rileylark commented on May 3, 2024

This is the kind of factoring I have in mind: peardeck@44b5d8f

I didn't make a PR because the api changed so much - in this version, you call e.g.:

const AMT = AMTinit(config);
string latex = AMT.parseAMtoTeX('b^2-4ac');

and there are no global variables exposed except AMTinit. For us that'll be more convenient, but we'll probably go a step further and get it ready to be consumed by a module system. I'd be happy to polish this more if you like, or reimplement the original API using this script, but for that I'd need to add a build system of some sort, which maybe you don't want to complicate things with yet.

Either way, thanks a bunch for the amazing interface - this will make a much nicer experience for our teachers than making them type latex.

from asciimathml.

drlippman avatar drlippman commented on May 3, 2024

This seems to be consistent with the more common and modern approach to things nowadays, and I'm sure there are plenty of people who would like something like this. It'd be a nice addition to the collection if you want to put it together and share it.

On Wednesday, March 23, 2016 8:14 PM, Riley Eynon-Lynch <[email protected]> wrote:

This is the kind of factoring I have in mind: peardeck@44b5d8fI didn't make a PR because the api changed so much - in this version, you call e.g.:const AMT = AMTinit(config);
string latex = AMT.parseAMtoTeX('b^2-4ac');
and there are no global variables exposed except AMTinit. For us that'll be more convenient, but we'll probably go a step further and get it ready to be consumed by a module system. I'd be happy to polish this more if you like, or reimplement the original API using this script, but for that I'd need to add a build system of some sort, which maybe you don't want to complicate things with yet.Either way, thanks a bunch for the amazing interface - this will make a much nicer experience for our teachers than making them type latex.—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub

from asciimathml.

HughGrovesArup avatar HughGrovesArup commented on May 3, 2024

I'd like to just use the text processing parts of ASCIIMathML.js in a similar situation i.e. I would like to pass in an AsciiMath string and be returned a MathML string. However, I'm really struggling on what parts of the code I need to modify to allow this - has anyone done this before?

from asciimathml.

drlippman avatar drlippman commented on May 3, 2024

Since AMparseMath generates a MathML node, perhaps you could use node.outerHTML on the result to get it as a string? I know that's slightly hackish, but would probably be the easiest solution.

from asciimathml.

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.