Giter VIP home page Giter VIP logo

Comments (9)

yishn avatar yishn commented on May 18, 2024

Can you post a simple LaTeX code snippet for loops? Do you have an idea how to let users create loops in tikzcd-editor? Currently, creating an arrow is only possible by dragging from one cell to another.

from tikzcd-editor.

varkor avatar varkor commented on May 18, 2024
\begin{tikzcd}
A \arrow[loop]
\end{tikzcd}

Produces the following diagram:
image
As for the interface, I think that not adding arrows when you haven't dragged between two cells is useful (for cancelling arrow placement), so perhaps a button that appears (similar to the "move object" handle) when arrow placement is selected, that adds a loop, would be simplest. The loop could then be manipulated with the existing arrow toolbar. It would be nice to also specify which side of the object the loop is drawn on, too.

from tikzcd-editor.

yishn avatar yishn commented on May 18, 2024

Thank you for your input! Just out of curiosity's sake, can you rotate the loop in certain directions? For example, so that the "bump" points to the left?

from tikzcd-editor.

varkor avatar varkor commented on May 18, 2024

\arrow[loop left] (or above/below/right) allows you to specify the direction, although specifying the direction a little more explicitly in the code output with out=angle and in=angle may result in slightly prettier loops. (I think these arguments come directly from TikZ, rather than tikz-cd).

from tikzcd-editor.

technicalguy avatar technicalguy commented on May 18, 2024

I reckon the UI for loops and pullbacks (see issue #11) could be similar - a button and a way to change the position (e.g. a handle that can be dragged to rotate it to each of 4 directions [or more]).

from tikzcd-editor.

ericelliott avatar ericelliott commented on May 18, 2024

This is a great suggestion. Identity arrows are very commonly needed to describe basic category theory principles and identity morphisms for axioms.

from tikzcd-editor.

ericelliott avatar ericelliott commented on May 18, 2024

There is a $200 bounty open for the developer who adds this feature.

from tikzcd-editor.

technicalguy avatar technicalguy commented on May 18, 2024

Well I'll see if I can take a look at implementing this in the next week or two...

from tikzcd-editor.

varkor avatar varkor commented on May 18, 2024

As there hadn't been much movement on this issue in a while, I went ahead and implemented the feature (pull request at #35). I think the interface works quite well and it should definitely be sufficient for most of the use-cases of loops.

image

from tikzcd-editor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.