You're welcome. This project is a breathe of fresh air... I found the MathJax codebase very difficult to work with.
xymostech
Have you worked on it before?
kevinb7
I was doing some debugging, trying to figure out why it wasn't loading some its .js files where it stores all the metrics
xymostech
Haha. Yes, MathJax's loading is kinda scary
I mostly wanted to talk to you about coming up with a roadmap of what we want to get done. You've been mostly working on stuff from the issues, which is great. There's some larger features I'd like to support some time in the future, and there's some features that we might not want to support, so I just wanted to make sure we're on the same page.
kevinb7
it's also bad for performance :(
for sure... I don't want to be going off in some other direction or I'll never get any PRs merged :)
xymostech
:) Yep
Right now, our biggest feature goal is to add environments, with \begin and \end
However, I'd love to see some of the smaller features get added in the meantime
We're also concerned with feature bloat and so we're unsure about adding some of the weird MathJax features that people depend on
For example, I'm still unsure about the CSS attributes stuff
I'd also like to come up with a good way to do macros and extensions
macros being user-defined functions (not sure whether that's something inline like \def or something you pass in as a configuration)
and extensions being extra files you load in that add features (like I'd be fine with the \cssId stuff as long as it's not part of the base KaTeX distribution)
kevinb7
I think macros via \def, \newcommand, etc. are going to require big changes to the parser
xymostech
Yes, I agree as well
kevinb7
the biggest problem I see right now with trying to implement \def in all its glory is that we're lexing as we parse
xymostech
The TeX way of it is doing something more like plain text replacement, which I'd be in favor of instead of messing with post-parsing
So, if we parse a macro, we replace the text of the input and then restart the parsing from the beginning
kevinb7
a pre-parsing step where we pull out all defs? that should work as well, we'll have to take care with the position we report in the error messages
xymostech
restart from the beginning of the macro, I mean
Hmm
I'm still unsure about adding \def in all its glory inline
It seems like something ripe for abuse
I guess we could have a flag to disable it or something
MathJax supports something where you can define macros externally and provide a configuration with them in it, and it uses them as you parse
kevinb7
the nice thing about splitting lexer and the parser is that we could have a stack of tokens that we could manipulate... replacing macros and push the tokens from the macro's definition on to the stack
xymostech
It's hard to do lexing beforehand because some of the tokens look different
spicyj
I think I would rather make people define macros/commands in JS in a way that doesn't let you manipulate the token stack at will
if that's possible
xymostech
like CSS colors are not lexable unless you know they come after \color
Yes, I think I would like that too
I think we'll probably have to implement \def sometime also though
kevinb7
hmm.. but CSS colors have a pretty well defined pattern and you could regex the whole thing at once and then break it down later
xymostech
(sorry, getting lunch)
Yeah, I suppose
kevinb7
starting with macros defined outside of the token stream is probably a good idea because it will give people something they can use sooner and it won't require a lot radically changes
xymostech
Yeah
kevinb7
sounds good, I'm cooking up some pasta... talk to you after lunch
amitp has quit
NOTICE: [KaTeX] xymostech closed pull request #104: added position property to ParseError (master...error.position) http://git.io/pyTDTQ
NOTICE: [KaTeX] xymostech pushed 2 new commits to master: http://git.io/b8AqnA
NOTICE: KaTeX/master afaec30 Kevin Barabash: added position property to ParseError
you could also try irccloud.com which appears to have a respectable free version
kevin joined the channel
kevin is now known as Guest48231
Guest48231 has left the channel
NOTICE: [KaTeX] jmeas opened pull request #113: Updates description in package.json (master...updates-npm-description) http://git.io/BigDjQ
NOTICE: [KaTeX] kevinb7 opened pull request #115: initial commit of lint task in Makefile (master...eslint_task) http://git.io/a6H-og
kevinb7
@xymostech: I'm signing off for today. If there's anything I can do to help out with macros, environments, or anything parser related don't hesitate to ask. Feel free to PM. I filled out the CLA form so you should have my email.