Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add node style #22

Open
LudwikJaniuk opened this issue Mar 9, 2018 · 2 comments
Open

Add node style #22

LudwikJaniuk opened this issue Mar 9, 2018 · 2 comments

Comments

@LudwikJaniuk
Copy link

For example, margin, circle, et.c.

@yishn
Copy link
Owner

yishn commented Mar 9, 2018

What are node styles? Can you elaborate with some code examples or direct to some documentation?

@LudwikJaniuk
Copy link
Author

Sure! I was surprised not to see that much of it in the tikzcd documentation (first time I hear of tikzcd, only used tikz), but for example, this code would produce nodes with boxes around them. The boxes are what I refer to as "node style".

\begin{tikzcd}[cells={nodes={draw=gray}}]
s_1 \arrow[rr] &  & s_2 \arrow[rr] &  & s_3 \\
\end{tikzcd}

Or red circles:

\begin{tikzcd}[cells={nodes={draw=red, circle}}]
s_1 \arrow[rr] &  & s_2 \arrow[rr] &  & s_3 \\
\end{tikzcd}

Ideally I would like to be able to specify different styles for the nodes separately, but I'm not sure what the syntax is in tikzcd. In tikz, you would write something like:

\node[circle] at (0,0) {text}; \node[draw=blue] at (2,0) {other text};

By the way, thank you so much for creating this tool, it's a small thing but it's really useful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants