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

Allow vertex styling (e.g. circled vertices) #75

Open
casouri opened this issue Jan 28, 2021 · 4 comments
Open

Allow vertex styling (e.g. circled vertices) #75

casouri opened this issue Jan 28, 2021 · 4 comments
Labels
discussion ongoing discussion

Comments

@casouri
Copy link

casouri commented Jan 28, 2021

I'm trying to use quiver to draw finite automata, to do that, quiver would need a few additional features:

  • add style to each node
  • add style to the whole graph
  • draw a loop (Loops #31)

Right now I just draw in quiver and finish off by hand, but maybe you are interested in adding these features.

\[\begin{tikzcd}[cells={nodes={state}}]
	|[draw=none]| { } & {q_1} && |[accepting]| {q_3} && {q_4} \\
	\\
	&&& {q_5}
	\arrow["1", from=1-2, to=1-4]
	\arrow["0"', bend right, from=1-2, to=3-4]
	\arrow["{1,0}", bend left, from=1-4, to=1-6]
	\arrow["1", from=3-4, to=1-4]
	\arrow["0", bend left, from=1-6, to=1-4]
	\arrow["0", bend right, from=3-4, to=1-6]
	\arrow[from=1-1, to=1-2]
        \arrow["{1,0}", from=1-6, to=1-6, loop right]
\end{tikzcd}\]
\end{document} 

Screen Shot 2021-01-28 at 11 28 58 AM

@varkor varkor added the discussion ongoing discussion label Jan 28, 2021
@varkor
Copy link
Owner

varkor commented Jan 28, 2021

There's an open issue for loops: #31. I'm not sure about adding vertex styling, because these features generally aren't used in commutative diagrams. It's certainly the case that this isn't a priority for me at the moment, but if you or someone else wanted to implement this feature, we could discuss how to do so.

@casouri
Copy link
Author

casouri commented Jan 28, 2021

Ok! I certainly don't have the time and knowledge to implement this feature. If no one is interested feel free to close this issue :)

@davidson16807
Copy link

I would be interested in implementing this feature. I've used loops before in tikzcd-editor to depict when functions are idempotent, and it's the only feature from that app that I think is missing here.

I'll need some time to familiarize myself with the code. And I wouldn't mind some advice on how to implement. How do you think it should be handled in the UI? Something like tikzcd-editor, with a dedicated button in the cell corner? Maybe there could be a region in the cell that you could drag arrows to, like on the outer regions of the object you dragged from?

Also, what parts of code do you think will be modified?

@varkor varkor changed the title Allow styling and loops Allow vertex styling (e.g. circled vertices) Mar 13, 2021
@varkor
Copy link
Owner

varkor commented Mar 13, 2021

@davidson16807: confusingly, the main issue for loops is #31 (I've renamed this issue accordingly). I'll respond there to keep discussion on-topic :)

@varkor varkor mentioned this issue Mar 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion ongoing discussion
Projects
None yet
Development

No branches or pull requests

3 participants