Replies: 1 comment 3 replies
-
|
I personally use "Div Reuse" (https://github.com/mcanouil/quarto-div-reuse) and conditional contents to get different layout. edit: it appears to not work very well with cross-references. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
I have a nice two-column book (PDF and HTML) with figures in margins and the main body. Now, I am creating a single-column version. I want to use conditional content (
{.content-visible when-profile=...}etc.) together with the{{< contents my-id >}}macro to control where to put the figures in the derived document.I've already found out that
{{< contents ... >}}does not work directly with the margin figures, but one has to wrap them in other divs.Error Quarto yields if one tries to contents-move a margin figure
(To me as an outsider, it is not obvious that/why margin figure divs are no divs by Quarto's logic. I assume this is because of some internal special handling.)
Here's an example document where I try to move a margin figure to
.column-bodyin the PDF version. But the margin figure stays in the margin.The converse works, that is, I can move stuff into the margin, e.g. in the HTML version here:
::: {.content-visible when-format="html"} (This is HTML output.) But it is possible to conditionally move a figure to the margin. :::: {.column-margin} {{< contents wrapper-main >}} ::::So far, the best to no change the whole document I came up with is to force all margin figures in PDF into usual figures.
In practice, I want to have more fine-grained control. In particular, I'd like to place some previous margin figures side-by-side. For this, I hope to get some more fine-grained control on the Quarto-side of things using the
contentsshortcode. But how to get it to work?Beta Was this translation helpful? Give feedback.
All reactions