geospatial-data-science-with-julia icon indicating copy to clipboard operation
geospatial-data-science-with-julia copied to clipboard

PDF rendering ?

Open sylvaticus opened this issue 1 year ago • 5 comments
trafficstars

Ok, I may look a dinosaur, but sometimes a PDF is useful :-) Is it possible to render the book as a single PDF ?

sylvaticus avatar May 21 '24 14:05 sylvaticus

Never tried, but you should be able to render to PDF with quarto render --to pdf as explained in the Quarto docs:

https://quarto.org/docs/books

Can you give it a try?

juliohm avatar May 21 '24 15:05 juliohm

I believe it is possible as explained in the link above. Closing the issue.

juliohm avatar May 22 '24 09:05 juliohm

hmmm... not straightforward.... running it I got the following error in the final step latex -> PDF conversion, apparently concerning the sole gif image of the book :

Rendering PDF
running xelatex - 1
  This is XeTeX, Version 3.141592653-2.6-0.999993 (TeX Live 2022/dev/Debian) (preloaded format=xelatex)
   restricted \write18 enabled.
  entering extended mode
  
updating tlmgr

updating existing packages
ERROR: 
compilation failed- error
LaTeX Error: Cannot determine size of graphic in images/juliahearts.gif (no B
oundingBox).

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.536 ...ght=\textheight]{images/juliahearts.gif}}

A PDF of a few pages is actually produced, but most figures are half out of page... perhapas one needs to adjust some quarto configuration....

index.pdf

sylvaticus avatar May 22 '24 11:05 sylvaticus

Thanks for trying it.

PRs are welcome to fix the PDF output. It seems like a Quarto + Julia limitation, plus issues with image formats.

juliohm avatar May 22 '24 20:05 juliohm

I've updated the Quarto settings to use the newest Julia engine.

The PDF option now triggers an internal error that I reported in Quarto:

https://github.com/quarto-dev/quarto-cli/issues/12038

juliohm avatar Feb 06 '25 19:02 juliohm