vivliostyle / vivliostyle.js

📖 The power of CSS typesetting, right at your fingertips.
https://vivliostyle.org
GNU Affero General Public License v3.0
606 stars 53 forks source link

scripting for preprocessing, also embedded scripts for live ebooks #1245

Open hgkamath opened 11 months ago

hgkamath commented 11 months ago

Is your feature request related to a problem? Please describe. na, this just an inquiry, to check if possible, or even if this a direction that vivliostyle has considered.

Describe the solution you'd like Investigating possibility of a) programmatically through hooks, if by acting on the input-src-file, gather additional static content on local system (or by url), pre-process content for inclusion before the usual markup driven typesetting b) embedding code(JavaScript) and data (json) into a epub/pdf to create say a live ebooks with interactive canvas (such as data visualization, running simulations with parameters, etc).

Being a javascript project, it is to be expected that if there is a scripting language it is JavaScript/wasm.

Describe alternatives you've considered na, this isn't something traditional typesetters can do.

Additional context na

If possible, please do include a write-up/documentation somewhere as to how something like this can be done.

Feel free to close the issue if not relevant.

MurakamiShinyu commented 11 months ago

There have been feature requests such as:

and we implemented this feature in:

However, this implementation has limitations and may not be useful for your purpose. See issue:

Also embedded scripts for live ebooks are not possible for now.

We welcome your contribution!