geocompy icon indicating copy to clipboard operation
geocompy copied to clipboard

PDF/HTML book options

Open michaeldorman opened this issue 1 year ago • 4 comments

I think in the current setup book_options_pdf.py always overrides book_options.py, even in the HTML version. That is. book_options_pdf.py is always being run even, and since it comes later in the code it overrides book_options.py.

image

Specifically pd.options.display.max_colwidth=13 in the PDF settings makes columns too narrow in the HTML. Here is an example where this matters (we want to show the POLYGON EMPTY text):

image

Is there a way to switch between book_options_pdf.py and book_options.py? @Nowosad

michaeldorman avatar Jun 10 '24 17:06 michaeldorman

I've spent some time today chasing some ideas, but it seems that no obvious/straightforward solution exist (e.g., see https://github.com/quarto-dev/quarto-cli/discussions/3260). My current suggestion would be just to comment out the pdf chunks atm, and only uncomment them before building the PDF version of the book.

Nowosad avatar Jun 11 '24 16:06 Nowosad

Or... maybe we could try somethings like this:

::: {.content-visible when-format="html"}

code

:::

Nowosad avatar Jun 11 '24 16:06 Nowosad

Sadly -- no.

Nowosad avatar Jun 11 '24 16:06 Nowosad

I've spent some time today chasing some ideas, but it seems that no obvious/straightforward solution exist (e.g., see quarto-dev/quarto-cli#3260). My current suggestion would be just to comment out the pdf chunks atm, and only uncomment them before building the PDF version of the book.

Thanks @Nowosad , commenting out until we need the PDF is a good idea, will use that

michaeldorman avatar Jun 11 '24 19:06 michaeldorman