-
-
Notifications
You must be signed in to change notification settings - Fork 212
Caption position
Giorgio Garofalo edited this page Sep 25, 2025
·
3 revisions
The .captionposition
[docs] function allows globally setting the position of captions, relative to the element they describe.
This applies to:
- Figures
- Figure Markdown extension
.figure
- Mermaid diagrams and derivatives (e.g. XY charts)
- Tables
- Code blocks
The function's primary parameter is called default
, which sets the global style for all kinds of captioned elements.
Additional parameters figures
, tables
and code
override the default position for those specific elements.
Each parameter is optional and accepts top
/bottom
values.
By default, documents use .captionposition {bottom}
.
.captionposition {bottom}

| Name | Favorite food | Favorite beverage |
|------|---------------|-------------------|
| John | Chicken | Orange juice |
| Jane | Pasta | Iced tea |
| Joe | Sushi | Beer |
"Survey results."

.captionposition {top}

.captionposition {bottom} tables:{bottom}

Photo credits: Pixabay
- Figures
- Image size
- TeX formulae
- Table caption
- Code caption
- Decorative headings
- Alerts (quote types)
- Quotation source
- Cross-references
- Page breaks
- Text symbols (text replacement)
- Document metadata
- Theme
- CSS
- Fonts
- Page format
- Page margin content
- Page counter
- Automatic page break
- Numbering
- Paragraph style
- Caption position
- Table of contents
- Bibliography
- Footnotes
- Stacks (row, column, grid)
- Container
- Align
- Float
- Figure
- Clip
- Box
- Collapsible
- Landscape
- Whitespace
- Variables
- Optionality
- Math
- Conditional statements
- Loops
- Let
- Destructuring
- String manipulation
- Table manipulation: sorting, computing, and more
- Generators
- String
- Number
- Markdown content
- Boolean
- None
- Enumeration entry
- Iterable
- Dictionary
- Range
- Lambda
- Size(s)
- Color
- Dynamic
- Paper: abstract, definitions, theorems, and more