Giter Site home page Giter Site logo

Latex output about diagon HOT 10 CLOSED

arthursonzogni avatar arthursonzogni commented on May 18, 2024
Latex output

from diagon.

Comments (10)

ArthurSonzogni avatar ArthurSonzogni commented on May 18, 2024 2

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.

from diagon.

ArthurSonzogni avatar ArthurSonzogni commented on May 18, 2024 1

I updated the website. This should now render the latex formula using katex.

From your list of fixes to do:

  • \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 symbols

from diagon.

ArthurSonzogni avatar ArthurSonzogni commented on May 18, 2024

We have several "generator"

  • Mathematic Expression
  • Sequence Diagram
  • Tree
  • Frame
  • Table
  • Planar graph

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

from diagon.

s5bug avatar s5bug commented on May 18, 2024

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:

  • Math expressions in the text-based outputs (ascii, utf8)
  • Bibliography support
  • Footnote support
  • Graph/Tree support

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.

from diagon.

ArthurSonzogni avatar ArthurSonzogni commented on May 18, 2024

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?

from diagon.

s5bug avatar s5bug commented on May 18, 2024

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 symbols

from diagon.

ArthurSonzogni avatar ArthurSonzogni commented on May 18, 2024

Thanks 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.

from diagon.

s5bug avatar s5bug commented on May 18, 2024

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.

from diagon.

ArthurSonzogni avatar ArthurSonzogni commented on May 18, 2024

I am going to use MathJax to renderer the latex formula. I am starting to get really nice results.

from diagon.

s5bug avatar s5bug commented on May 18, 2024

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.

from diagon.

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.