polylux icon indicating copy to clipboard operation
polylux copied to clipboard

feat: add pdfpc-file metadata in typst directly

Open OrangeX4 opened this issue 7 months ago • 4 comments

Many thanks for Polylux anyway, it is very cool. But I think it would be nice to have the ability to export pdfpc file without polylux2pdfpc.

A lot of work has been done in #83 and #84 , but too many files have been modified. I just come up with a simpler method. I add a locate and query in pdfpc.config() function, so you just add pdfpc.config() in your slide source file to enable this feature.

You can export pdfpc file without polylux2pdfpc simply by:

typst query --root . example.typ --field value --one "<pdfpc-file>" > example.pdfpc

https://typst.app/project/rzIE9aLpKytQUQNn8SSRrP

image

This PR is significant for tools other than pdfpc, just like Typst Preview, which already has a slide mode.

With this feature, Typst Preview can implement better navigation and presenter view, which is much more convenient than pdfpc because you have a hard time installing pdfpc on Windows #106 , and Typst Preview has animated GIFs support that pdfpc doesn't have. https://github.com/Enter-tainer/typst-preview/issues/191 https://github.com/Enter-tainer/typst-preview/issues/192

It's also a good way to achieve #122 .

@andreasKroepelin If you have spare time, could you please take a look at this? Many thanks!

OrangeX4 avatar Nov 24 '23 05:11 OrangeX4