Skip to content

Commit

Permalink
Give an example with tbl-pos="t" that also needs layout-ncol="1" to w…
Browse files Browse the repository at this point in the history
…ork in PDF

See the comment at quarto-dev/quarto-cli#4849 (reply in thread)

I'm suggesting an example be added to the documentation, as it took me a long time to figure this out!
  • Loading branch information
fuhrmanator authored Jan 20, 2025
1 parent ad42acd commit 56bb43f
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/authoring/cross-references-divs.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,23 @@ In the above example, you can reference the figure with `@fig-line-plot`, but no

{{< include _cross-reference-divs-table.qmd >}}

<!-- see https://github.com/quarto-dev/quarto-cli/discussions/4849#discussioncomment-11622517 -->
In PDF output, if you want to specify table float placement (e.g., T for top), be sure to add both `tbl-pos="t"` and `layout-ncol="1"` in the div:

````markdown
::: {#tbl-rubric tbl-pos="t" layout-ncol="1"}

| Criterion | Meets Expectations (10) | Needs Improvement (5) |
|-------------------|-------------------------|------------------------|
| **Understanding** | Clear understanding. | Unclear understanding. |
| **Completion** | Task completed. | Task incomplete. |

: Sample grading rubric

:::

````

If the table is produced by an executable code cell, put the cell inside the div as content, e.g:

````markdown
Expand Down

0 comments on commit 56bb43f

Please sign in to comment.