Comments (9)
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.
\begin{tikzcd}
A \arrow[loop]
\end{tikzcd}
Produces the following diagram:
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.
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.
\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.
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.
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.
There is a $200 bounty open for the developer who adds this feature.
from tikzcd-editor.
Well I'll see if I can take a look at implementing this in the next week or two...
from tikzcd-editor.
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.
from tikzcd-editor.
Related Issues (20)
- Add Identity arrows? HOT 1
- Can't input more than a character on Safari HOT 5
- "Could not match edge label" error when copying code HOT 7
- Double lines without head HOT 1
- Page goes blank after keydown on first load HOT 2
- Using compression for shorter URLs? HOT 3
- Add `ampersand replacement` option HOT 6
- Allow the grid to be hidden HOT 1
- Render to SVG, PDF, PNG, etc. HOT 1
- Preact performance issue
- Order of commands HOT 1
- Easily copy image of diagram HOT 1
- text inside squares? HOT 2
- Export Image HOT 1
- "Clear" button needed HOT 1
- Deployment of latest release? HOT 1
- add a button to hide the dashed grid lines
- Switch Rightarrow and no head in arguments for arrow
- Report `error` when `npm run build` HOT 1
- Long text on nodes are not rendered properly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tikzcd-editor.