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

feat: add pdfpc-file metadata in typst directly #123

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

OrangeX4
Copy link

@OrangeX4 OrangeX4 commented Nov 24, 2023

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. Enter-tainer/typst-preview#191 Enter-tainer/typst-preview#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!

@drupol
Copy link
Contributor

drupol commented Jan 20, 2024

@andreasKroepelin I really like this idea, this could be a good idea to avoid having a dependency to an external program to extract the metadata. What do you think of it?

@andreasKroepelin
Copy link
Owner

@OrangeX4 @drupol Sorry, I never reacted on this PR. I think the change to Polylux' code is okay but I don't like the user interface of having to call this complicated typst query command. I think "use this tool polylux2pdfpc" is an easier to follow advice for users.

@OrangeX4
Copy link
Author

Thanks for reply. I prefer the typst query command, even though it's a bit more complicated. I think that this command is a low-frequency copy-and-paste command, so it won't be annoying too much. However, keeping polylux2pdfpc as an option also make sense, providing users with two choices.

@drupol
Copy link
Contributor

drupol commented Jan 21, 2024

I do prefer having less complexity and fewer dependencies too, as long as the command to extract the data is correctly documented, it's not an issue.

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

Successfully merging this pull request may close these issues.

3 participants