You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to define my own node style in a separate \tikzset and as far as I understood the only way to pass them to TikzPictures is to use the preamble= argument.
using TikzPictures
tp =TikzPicture(L"""[all exes=unit length=20cm]\draw (0,0) -- (1,1);\draw (1,0) -- (0,1);\node at (0.5,0.5) {tikz $\sqrt{\pi}$};"""
, preamble=preamble)
However, I got
TikzPicture(L"[all exes=unit length=20cm]
\draw (0,0) -- (1,1);
\draw (1,0) -- (0,1);
\node at (0.5,0.5) {tikz $\sqrt{\pi}$};
", "scale=1", L"$\tikzset{
pics/mynode/.style args={#1,#2,#3}{
code={
\draw (0,0) -- (1,-1) -- (2,0) -- (2,2) -- (0,2) -- (0,0);
\node[#3] (#1) at (1,1) {#2};
}
}
}
$", true)
! LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.2 $
\tikzset{
So wondering how the preamble is to be used? I played around but could not figure out.
Also I think it would be nice to provide the path to a preamble file using a environment variable, just like in PGFPlotsX.jl. I'll try to follow up with an MR.
The text was updated successfully, but these errors were encountered:
I am trying to define my own node style in a separate
\tikzset
and as far as I understood the only way to pass them toTikzPictures
is to use thepreamble=
argument.This is what I am trying to set:
I set the
preamble
using:and then tried
However, I got
So wondering how the
preamble
is to be used? I played around but could not figure out.Also I think it would be nice to provide the path to a preamble file using a environment variable, just like in
PGFPlotsX.jl
. I'll try to follow up with an MR.The text was updated successfully, but these errors were encountered: