LaTeX.js icon indicating copy to clipboard operation
LaTeX.js copied to clipboard

Picture with Tikz

Open fbob opened this issue 3 years ago • 10 comments

I just found this project today and was wondering if:

  • it does support Tikz ?
  • or could it technically support it ?

Anyway it's a really awesome project ! Congratulations :)

fbob avatar Dec 16 '20 12:12 fbob

Hi, thank you :-)

No, I did not implement that yet but there is no reason LaTeX.js couldn't support it. And yeah, I would LOVE to work on support for that! I like TikZ a lot. But I just don't have enough time right now, only little bits and pieces here and there. One of the next things will be images and SVG support, then you can export a TikZ picture as SVG and display it that way.

michael-brade avatar Dec 16 '20 13:12 michael-brade

With images and SVG support no doubt that LaTeX.js could replace LaTeX in a daily work for A LOT of people. Rendering time is blazing fast. Sincerely, it's a pretty impressive work !

fbob avatar Dec 16 '20 18:12 fbob

Just wanted to mention that tikzcd would probably suffice for a lot of people!

dzackgarza avatar Jan 01 '21 05:01 dzackgarza

Any chance to work on this library?

Mahdi-Roozbahani avatar Feb 12 '21 03:02 Mahdi-Roozbahani

@Mahdi-Roozbahani which library do you mean? this as in LaTeX.js or tikzcd?

michael-brade avatar Feb 17 '21 10:02 michael-brade

@Mahdi-Roozbahani which library do you mean? this as in LaTeX.js or tikzcd?

@michael-brade I meant tickzcd. So lines can be drawn using latex.js.

Mahdi-Roozbahani avatar Feb 18 '21 12:02 Mahdi-Roozbahani

I see. Well, it won't be me for the time being.... Once \includegraphics works, you can include SVGs as a workaround.

michael-brade avatar Feb 18 '21 13:02 michael-brade

Will this actually work though? I seem to remember that \includegraphics has some issues with SVG in usual latex, see this Tex SE question for all of the various workarounds people seem to have to use: https://tex.stackexchange.com/questions/2099/how-to-include-svg-diagrams-in-latex

dzackgarza avatar Feb 18 '21 18:02 dzackgarza

Will this actually work though? I seem to remember that \includegraphics has some issues with SVG in usual latex, see this Tex SE question for all of the various workarounds people seem to have to use: https://tex.stackexchange.com/questions/2099/how-to-include-svg-diagrams-in-latex

It is a good point. It would be great to an SVG in your playground demo.

Mahdi-Roozbahani avatar Feb 18 '21 18:02 Mahdi-Roozbahani

@dzackgarza Sure. I am completely independent of the real LaTeX. Imagine it that way: I am reimplementing LaTeX's syntax in JavaScript. So I can choose what syntax produces which result, limited only by what is or isn't possible with HTML/CSS.

Of course, I try to be as close to LaTeX as possible, but if some features that aren't available in LaTeX are easily possible with LaTeX.js, I won't prohibit them. See the playground, for instance ;-)

michael-brade avatar Feb 18 '21 20:02 michael-brade