Importing template from another one
#145
Closed
opened 8 years ago by lobisquit
·
3 comments
Loading…
Reference in New Issue
There is no content yet.
Delete Branch '%!s(<nil>)'
Deleting a branch is permanent. It CANNOT be undone. Continue?
Hi everyboy, I am interested in using Pollen for pdf output.
As outlined in the fourth tutorial, section 8.3.6, a template can be build for this output type, transforming the latex output with
pdflatex
.In line 2 of
template.pdf.p
two there is a small latex template to feedpdflatex
:Could this chunk of code be read from
template.ltx.p
? It would allow to perform consistent pdf output with the latex file.You can’t nest one template inside another. But you can move the reusable parts of the template into a helper function inside
pollen.rkt
, and call that instead.Let’s call our helper function
make-latex-source
. It will takedoc
as input and return the LaTeX-converted version. To make this function, we just pick up the current definition oflatex-source
and move it into the function:Then we update our templates to call this function:
template.ltx.p
template.pdf.p
Thank you very much, I really appreciate your effort in writing this amazing library 😉
🤘