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

Feature request: Export in slide mode #257

Open
ntjess opened this issue Feb 22, 2024 · 3 comments
Open

Feature request: Export in slide mode #257

ntjess opened this issue Feb 22, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@ntjess
Copy link

ntjess commented Feb 22, 2024

Feature Request

Add an "Export in slide mode" feature to the VSCode command palette so that slides can be shared

Use Case

It is wonderful that typst-preview has a browser slide mode preview, and this can be saved from the browser to make a portable slide deck. However, this results in text that turns orange on hover, and is slightly inconvenient compared to an "export" option that would exist directly in the extension.

Other export modes (i.e. svg_html) are accessible through the typst-ts-cli executable, but slide mode is currently restricted to the preview extension which is why the feature request is here.

@Enter-tainer
Copy link
Owner

It is wonderful that typst-preview has a browser slide mode preview, and this can be saved from the browser to make a portable slide deck.

BTW this is a very interesting use case which I didn't think of before. Does it work well? How much is the binary size?

@ntjess
Copy link
Author

ntjess commented Feb 22, 2024

For a 19 page deck with many images:
PDF size: 5.9 MB
svg_html: 13.5 MB

Browser preview -> save: 1.8 MB

The document is totally portable since all resources end up being b64 encoded and directly embedded

I've made a foolish mistake during testing -- both computers were running vscode while the preview was being loaded, meaning the backend was responding to localhost requests... the saved file is in fact not portable in the current extension state. Rather, the first page shows no matter what, but everything else (i.e. stepping through the deck) is unresponsive

@Myriad-Dreamin
Copy link
Collaborator

This is doable, since the only missing is that no render data are initialized. Imagine that we have snapshot and replay feature, then the page will work again. The only two events to snapshot are:

event 1: enable partial rendering 
event 2: reset document data (It is exactly the `typst-ts-cli compile --format vector`)

@Myriad-Dreamin Myriad-Dreamin added the enhancement New feature or request label Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants