-
Notifications
You must be signed in to change notification settings - Fork 88
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
Export to Typst/Fletcher diagram #262
base: master
Are you sure you want to change the base?
Conversation
…eaks moving cells.
@varkor Couple questions if you have time for them. At this point I've implemented Typst rendering, but the (AFAIK only) library is very bare bones so I've had to work around some minor issues. Notably, concurrent renders seem to break the library but I've implemented a queue for the rendering, which is quick enough to work as a permanent solution. Onto real issues:
Do you have an idea about the possible cause of these breakages ? Cheers |
Line 550 in 4fee690
This call is returning EDIT: Fixed, see commit below. |
Thanks for the pull request! I must admit that it hadn't occurred to me that Typst has different syntax for mathematics than LaTeX, which makes support for Typst subtler. I suppose it will be necessary to have a toggle in the UI for LaTeX/Typst mode – I'll have to think about how to do that without complicating the UI too much.
Unfortunately, the timing is a little inconvenient, as I'm about to go on a research trip for a few weeks, and don't yet know whether I'll have time to look at this in detail before I get back. However, if I don't manage to look at it during my trip, it will be a priority for me once I return. I'll try to answer any questions you have in the meantime, though. |
Thanks for your time ! Regarding the second point, this was actually all addressed in the latest commit which makes me confident this is close to releasable. Don't worry about the timing though, I can just host the fork somewhere in the meantime. What's left (for me) to do:
|
That's it, I'm calling it releasable ! Let me know what you think. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some detailed but incomplete suggestion for code
This comment was marked as resolved.
This comment was marked as resolved.
Co-authored-by: jingkaimori <jingkaimori@gmail.com>
I've implemented initial support to export to Typst diagrams. Incompatibilities are reported through the incompatibilities metadata object (that is: shortened arrows, empty arrow body, and k-cells for k > 1)
This still needs some UI adjustments to show the incompatibilities and instructions just like with latex.
I marked this as Draft because I feel like this feature cannot be fully used as-is since I haven't implemented in-browser rendering of the formulas. Looking into how to do that with
typst.ts
.Feel free to leave comments and to try this out. Diagrams should be readily useable with
at a document's start.