Comments (5)
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.
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.
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.
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.
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)
- Inconsistent whitespace sensitivity with numbers HOT 3
- Test environment 'collapses' multiple kinds of whitespace into one HOT 1
- Support more geometry symbols HOT 1
- Support physical units HOT 2
- Vec() crashes updater HOT 1
- An exception occurs when using parseMath!The attribute "mathvariant" is incorrect! HOT 1
- TextMate grammar
- Add ≢ HOT 2
- Support for \mathscr.
- Formal grammar is incomplete
- Add support for ⊈
- support for mathjax 3 HOT 1
- Make comma `,` escapable without making it a text `","` HOT 2
- Please add `∼` (tilde operator) and `≁` (not tilde) HOT 2
- Thousands separator not documented HOT 2
- AsciiMath render intermittently not triggering in dropdown menu on iOS Safari HOT 1
- MathML-Core support shipped by default in chromium 109 HOT 2
- Convert asciimath JavaScript output to PDF
- Fraction bars aren't rendered as text HOT 2
- hyperlinks
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asciimathml.