-
Notifications
You must be signed in to change notification settings - Fork 20
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
[FEATURE] Supporting Matrix Notation #48
Comments
@davibarreira following up from here: JuliaAnimators/Javis.jl#448 How difficult do you think this would be to implement as well? |
I don't think is that hard, because a matrix could be pretty much just a bunch of text spaced evenly and some big brackets in the side. A pseudo-code I think for it would be something like:
Don't know if the idea is clear. But it could even be implemented in Luxor directly. Although, it would be better if it was done here. |
The main problem I can see is to correctly parse environnments, which is simply not supported currently. I will need a bit of time to thing about it and how to properly represent the parsed information. Then the layouting of the elements should not be too hard. Overall it is definitely doable, I'll have a go at it (and other issues) at the end of the week.
If you want to have a go directly and need some help, don't hesitate to bother me here or on slack ;) Generally speaking there are always two parts:
The good part about the second one is that it is pretty much pure geometry at this point so if you come up with the algorithm to layout the matrix elements in Javis (based on a reasonnable data structure for the elements, e.g. a julia matrix of latex elements), it should be easy to adapt it and include it in MathTeXEngine.jl. |
@Kolaru this is a great explanation. I'll see if I can experiment with this on Thursday. |
You are, but there are of course some more tricks involved. Since I had some time in the train and you look motivated to look at the parser, I just added a short dev doc for the parser here: https://github.com/Kolaru/MathTeXEngine.jl/tree/master/src/parser |
This is brilliant! |
Hey @Kolaru !
I am now switching over to looking through
Some of these look either solved or partially solved, but I do not know. |
Yes you mostly got it. The way I would go about it is
I think that should be pretty much it. (*) This is what we do for example for MathTeXEngine.jl/src/parser/commands_registration.jl Lines 115 to 119 in 2dd00d8
|
Hi @Kolaru ,
I was tinkering with MathTeXEngine and was trying to render a matrix.
Using
LaTeXStrings.jl
, I wrote the following snippet:And when I tried rendering it like so:
generate_tex_elements(latex_string)
I got the following error:
I saw that this issue was somewhat similar to supporting
\begin{align}
statements in #25 .So, out of curiosity, how difficult would it be to create support for rendering matrices in
MathTeXEngine
?Is this something that is out of the purview of the engine or would it be doable?
The text was updated successfully, but these errors were encountered: