rquarto

how can I render a quarto website to a single pdf


I have a quarto website that I was asked to render to PDF.

quarto render .

will produce all the necessary HTML content on the _site directory. I can also run

quarto render . --to pdf

which works, but produces many PDF files corresponding the the HTML files in of the previous command.

Is there a way, without drastically changing my _quarto.yml file (this is a one-time operation, the website is still the primary output), to render a single PDF, where all the pages are merged into one long document?

The --merged part of what follows doesn't actually exist, but I'm thinking something like:

quarto render . --to pdf --toc --merged

Solution

  • As of this post it is not possible, but there is a workaround that fits some use cases (is you use the "book" subtype of "website".

    I have asked a similar question on the discussion boards for Quarto, there might be answers of interest there if it gets any traction.