mbutterick / pollen-users

please use https://forums.matthewbutterick.com/c/typesetting/ instead
https://forums.matthewbutterick.com/c/typesetting/
52 stars 0 forks source link

How can I render multiple pages project into a single pdf? #20

Open shen390s opened 4 years ago

shen390s commented 4 years ago

Such as I want to render https://github.com/otherjoel/try-pollen.git into a single document(such as try-pollen.pdf) to include all chapters of document.

bluebear94 commented 3 years ago

I'd assume that you'd create a page that calls (dynamic-require path 'doc) (and (dynamic-require path 'metas) if you need any meta information) for each page that you want to include, then embeds each page's contents.

otherjoel commented 3 years ago

I'd assume that you'd create a page that calls (dynamic-require path 'doc) (and (dynamic-require path 'metas) if you need any meta information) for each page that you want to include, then embeds each page's contents.

That's basically how I’m doing it in that repo, but it's even faster to skip dynamic-require altogether and use select-from-doc etc. directly on the files. As the docs note, using Pollen's functions to retrieve doc/metas from a Pollen source is going to be faster since that way you’ll be taking advantage of Pollen’s cache.

bluebear94 commented 3 years ago

Right, I almost forgot about select-from-doc.