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

ability to intigrate CeTZ diagrams with other Typst elements (like tikzmark) #607

Open
maninalift opened this issue May 24, 2024 · 1 comment
Assignees
Labels
feature 🎁 Feature Request

Comments

@maninalift
Copy link

TiKZ alllows for diagram elements to be integrated with other elements of the page layout through the overlay flag and \tikzmark function. \tikzmarks are essentially like CeTZ anchors, but they can be placed outside of diagrams. The overlaid diagram can then reference these marks. This allow for example placing marks in an equation in order to draw arrows between parts of an equation.

It has to be said that this solution, while good enough for most use cases does not cover every possible use. There are some cases where you may want the diagram to influence the layout of the text as well as the text influencing the layout of the diagram. For example draw an arrow between these two equations and have the text flow around the arrows. However I imagine that such a general layouting ability would not be possible, so I would love for CeTZ to have a feature like \tikzmark.

My apologies if this functionality already exists. I have not been able to find it.

@johannes-wolf johannes-wolf self-assigned this May 24, 2024
@johannes-wolf johannes-wolf added the feature 🎁 Feature Request label May 24, 2024
@johannes-wolf
Copy link
Member

This is currently not implemented but should be possible. The only thing missing from cetz is an option for elements to not increase the bounding box of the canvas, so that they can go outsides the canvas. Positions in the document can be located using #metadata("cetz-anchor") #label(<outside-label-name>) and must be resolved to cetz anchors either before using them, using some special function - or we build this directly into cetz, maybe by having some anchor name prefix for "outside" anchors.

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

No branches or pull requests

2 participants