obsidian-tikzjax icon indicating copy to clipboard operation
obsidian-tikzjax copied to clipboard

Support for bayesnet package

Open przemyslslaw opened this issue 2 years ago • 4 comments

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}

przemyslslaw avatar Oct 03 '22 00:10 przemyslslaw

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.

artisticat1 avatar Oct 06 '22 15:10 artisticat1

That would be wonderful. Thanks!

przemyslslaw avatar Oct 06 '22 17:10 przemyslslaw

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?

mayurankv avatar Feb 23 '24 18:02 mayurankv

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.

thecodechemist99 avatar Jun 30 '24 20:06 thecodechemist99