obsidian-tikzjax
obsidian-tikzjax copied to clipboard
Support for bayesnet package
Great plugin, many thanks!
Is there a way to use usetikzlibrary
to load a tikz library such as bayesnet?
I've tried the following code, but it doesn't render in Obsidian:
\usetikzlibrary{bayesnet}
\begin{document}
\begin{tikzpicture}
\node[obs] (y) {$y$} ; %
\node[obs, above=of y] (x2) {$x_2$} ; %
\node[obs, left=of x2] (x1) {$x_1$} ; %
\node[obs, right=of x2] (z) {$z$} ; %
\edge[-,dashed] {x2} {z} ; %
\edge {x1,z} {y} ; %
\end{tikzpicture}
\end{document}
This package isn't included in TikZJax, but I can look into adding it.
See also #4, which would enable users to add their own custom packages.
That would be wonderful. Thanks!
Can I ask what the procedure is for adding general tikz packages just for my knowledge. As far as I can tell, it includes checking whether they are in base latex (i.e. no luatex or xelatex) and if so adding it to the compiled script? Is that correct?
Can I ask what the procedure is for adding general tikz packages just for my knowledge. As far as I can tell, it includes checking whether they are in base latex (i.e. no luatex or xelatex) and if so adding it to the compiled script? Is that correct?
They are added in tikzjax
in tex_files.json. This should work for all packages installed on the machine executing this command as long as they don’t require LuaTeX
. Also, I haven’t got packages containing extra fonts to work yet.