[Feature] Chemistry support (ChemFig?)
Chemistry support wold be great. Reaction formulas, Binding structures, Molecule structure ect...
it would be great if you could add support for chemfig somehow
Hi @YuukoShionji ,
Can you provide me with some libraries or programs for drawing Chemistry figures?
Thanks
If we ware working with normal latex Chamfig would be great, however it requiers tikz wich is not supported by Mathjax or katex.
There is however a javascript library that can draw molecules rather nicely Kekule.js (Repo), which would be perfect atleast for the molecules if it wasnt for the fact it dosnt support any tex/tax nativly, So one would have to write a "wrapper" for it. Here is a page about molecule drawing in their docs
As far as programs go there is a lot im just gonna name the most popular
- https://avogadro.cc/
- https://www.chemdoodle.com/
- https://www.chemaxon.com/products/marvin/marvinsketch/
- http://ruby.chemie.uni-freiburg.de/~martin/chemtool/chemtool.html
- http://www.pymol.org/
I think the most ideal solution is to write a MathJax/Katex module to Kekule.js
I think I will take a look at the Kekule.js or just try to support tikz.
I will notice you if I make any progress.
Thanks :)
May I also ask what operating system are you using?
Laptop (i use it in school): https://www.archlinux.org/ Desktop (Home work and self studies): https://gentoo.org/
@YuukoShionji I just did some researches and I decide to support the tikz graphs.
My current plan is to support latex code chunk.
For example:
```{latex}
\documentclass{article}
... your latex code here
\end{document}
```
So this will compile latex => pdf => svg and display it in preview.
For tikz graph, we write it in this way
```{latex tike:true}
\begin{tikzpicture} --> this line is not necessary.
... your tikz code
\end{tikzpicture}
```
I will try to get it done by the end of next weekend.
I am developing this extension on Mac and the TeX on Mac is kinda broken. I can't install the standalone.cls, so I might need your help to test it on Linux.
Please tell me if you have any advice.
Thanks
@YuukoShionji TikZ is now supported. Check this doc.
Cheers :)
@shd101wyy nice! ~Tough unfortunetly it dosnt seem to be working for me :/ I get an latex ID, but it dosn't seem to do anythingimage~ edit: didnt realise i had to click "run", anyways good work! but i noticed when i export it the latex code still shows in the final doc, might be a bug, or am i doing it wrong?
You can set hide to be true.
```{python hide:true}
print('you can see this output message, but not this code')
```
Then use shortcut shift-enter to run.
Is the md/latex src used to generate the circuit diagram available somewhere? Thanks
This extension somewhat has the feature to draw molecules for the built-in markdown preview using SMILE mathpix. But the MPE could not recognize it, so I can not export it :(