jupyter-book / jupyterlab-myst

Use MyST Markdown directly in Jupyter Lab
https://jupyter-book.github.io/jupyterlab-myst/
BSD 3-Clause "New" or "Revised" License
146 stars 18 forks source link

Export to PDF, Latex, Docx... #60

Open echarles opened 1 year ago

echarles commented 1 year ago

Will there be options to export to other formats like PDF, Latex, Docx... I am not familiar with the myst code base, but I have the impression that those exports depends on some server node.js capabilities https://github.com/executablebooks/mystjs/blob/main/packages/myst-cli-utils/src/exec.ts that can not be supported in the browser.

Having a server extension would be possible, but this would require the users to install node.js which they typically don't do.

welcome[bot] commented 1 year ago

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

echarles commented 1 year ago

I was relying on myst-cli package, so yes, that has dependencies on node.js only processes. I am now more depending on myst-to-react which works fine in the browser.

I will have a look at the other transformers (myst-to-docx, myst-to-jats, myst-to-tex) and see if they work fine in the browser.

For PDF, I guess the browser won't be enough, as a process to convert from TEX to PDF will be needed, right?

rowanc1 commented 1 year ago

The pieces in all of those transformations that do rely on binaries are mostly image transformations (e.g. svg -> png, or png -> webp). Docx, tex, and jats should all be browser ready other than that.

Super curious where you are implementing this, and if you have other things to share, would love to see the direction you are going in. 🚀

echarles commented 1 year ago

The pieces in all of those transformations that do rely on binaries are mostly image transformations (e.g. svg -> png, or png -> webp). Docx, tex, and jats should all be browser ready other than that.

I have now react and tex transforms in the browser. I will try docs and jats tomorrow, this should be ok as. you said.

Super curious where you are implementing this, and if you have other things to share, would love to see the direction you are going in. 🚀

Just experimenting for now and trying to find my way in the repos/packages/code. It turns out that the gist of what I am using is a bunch of unfied plugins, this page about transforms can be extended to quick start more easily without the whole remix.run and co layers.

I guess my goal is also to be able to configure the unified pipeline to use the templates without depending on the myst-cli (so fully in the browser).