Closed s5bug closed 4 years ago
We have several "generator"
And the generators have "options", the one in Mathematic Expression are:
- ASCII-only [x]
- Math symbols [x]
I can replace the first one by:
style: [
- unicode
- ascii
- latex
]
I can work on it this weekend, starting with the "Mathematic Expression" generator.
Could you describe a bit more your project? Is this a web based application or are you using the command line application?
I have made some experiment using vim + diagon here: https://youtube.com/watch?v=WTnMft_wvZU
I would probably bundle the command line application in the document rendering program, or write my thing in C++ and build it with.
I'm tired of org-mode's lack of:
So I've been wanting to write my own thing, and I stumbled across Diagon and the way it parses expressions and has existing utf8 and ascii options makes it a good fit for what I want to do.
I added a "Latex" mode for the mathematic generator. I updated the website: https:/arthursonzogni.com/Diagon
(you will likely have to refresh and/or clear the website disk cache to get the new version)
Does it work the way you expected?
Sorry for the late response.
It almost works the way I expect. I'm not able to actually test the LaTeX right now, but a few things that worry me:
\displaystyle
vs inline LaTeX, the former should but \limits
on Sums, Integrals, etc I believe (however I am not sure).f(x) =
turns into \f{x} =
, I'm fairly certain it should be just f\left(x\right) =
(expr)
, even when parentheses are needed, turns into {latexexpr}
, instead of \left(latexexpr\right)
\cdot
for multiplication vs \times
\ldots
for ellipsis\alpha{}
, \Alpha{}
instead of the literal symbolsThanks for this list! I will submit fixes one by one.
Ideally, I should find a way to build a vizualizer that will build images from latex.
I forgot to mention, special functions, like log
, sin
, cos
, etc, that should be rendered like this and not like this have a backslash before them. \sin\left(3 + x\right)
.
As for the visualizer, unless you mean Diagon parsing LaTeX itself, I would recommend KaTeX output at least for the website.
I am going to use MathJax to renderer the latex formula. I am starting to get really nice results.
KaTeX can statically compile LaTeX into HTML without the need for client-side JS and also doesn't push its own right-click menu, if that's an option.
Katex claims to be faster / smaller, so I will use Katex. Thanks for the suggestion! This will be done likely at the very end of this week.
I updated the website. This should now render the latex formula using katex.
From your list of fixes to do:
I'd love to use Diagon in a project I want to make, similar to org-mode but with more modern syntax, output, and tooling. I love how Diagon parses expressions, and so I was wondering how easy it is to add more backends because I don't want to reinvent the wheel. I'm personally looking for:
I've used the latter two a lot, so I'm pretty comfortable with them; if it's not too hard and isn't against the scope of the project I'd love to try and implement them.