Skip to content

Commit 56bb43f

Browse files
authored
Give an example with tbl-pos="t" that also needs layout-ncol="1" to work 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!
1 parent ad42acd commit 56bb43f

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/authoring/cross-references-divs.qmd

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,23 @@ In the above example, you can reference the figure with `@fig-line-plot`, but no
136136

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

139+
<!-- see https://github.com/quarto-dev/quarto-cli/discussions/4849#discussioncomment-11622517 -->
140+
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:
141+
142+
````markdown
143+
::: {#tbl-rubric tbl-pos="t" layout-ncol="1"}
144+
145+
| Criterion | Meets Expectations (10) | Needs Improvement (5) |
146+
|-------------------|-------------------------|------------------------|
147+
| **Understanding** | Clear understanding. | Unclear understanding. |
148+
| **Completion** | Task completed. | Task incomplete. |
149+
150+
: Sample grading rubric
151+
152+
:::
153+
154+
````
155+
139156
If the table is produced by an executable code cell, put the cell inside the div as content, e.g:
140157

141158
````markdown

0 commit comments

Comments
 (0)