Why does Quarto need to re-estimate and recreate the jupyter notebook every time a new format is rendered? #4994
-
Hi, I had a question regarding the use of Multiple Formats with Quarto and VSC. I was testing one of the new functions from Quarto. When creating multiple Formats, the HTML will also include links to all alternative formats. That is working quite well. The question that I have, which may be more a suggestion for future updates, is why does Quarto need to re-estimate and recreate the jupyter notebook every time a new format is rendered. Since they are all based on the same ipynb, wouldn't it be more efficient to reuse the same one across all formats? Would it be the case that only happens with VSC? or because Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
It's a (n unfortunately) general phenomenon. It happens because quarto can't know in general if your .ipynb file (or .qmd) has features that behave differently on different formats. For example, some libraries generate completely different output depending on whether the output format is HTML or DocX or PDF. If you want to avoid this, I recommend computing your results in a separate .ipynb and then using the |
Beta Was this translation helpful? Give feedback.
-
Thanks for the tip!
…On Tue, Mar 28, 2023 at 12:26 PM Carlos Scheidegger < ***@***.***> wrote:
It's a (n unfortunately) general phenomenon. It happens because quarto
can't know in general if your .ipynb file (or .qmd) has features that
behave differently on different formats.
For example, some libraries generate completely different output depending
on whether the output format is HTML or DocX or PDF.
If you want to avoid this, I recommend computing your results in a
separate .ipynb and them using the {{< embed >}} shortcode with it
explicitly.
—
Reply to this email directly, view it on GitHub
<#4994 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASZKKFTSSHY2L7XGOUYBWWDW6MGK7ANCNFSM6AAAAAAWKY3MEE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
It's a (n unfortunately) general phenomenon. It happens because quarto can't know in general if your .ipynb file (or .qmd) has features that behave differently on different formats.
For example, some libraries generate completely different output depending on whether the output format is HTML or DocX or PDF.
If you want to avoid this, I recommend computing your results in a separate .ipynb and then using the
{{< embed >}}
shortcode with it explicitly.