-
-
Notifications
You must be signed in to change notification settings - Fork 212
Code caption
Giorgio Garofalo edited this page Sep 25, 2025
·
2 revisions
The Quarkdown flavor introduces code captions, which can be set by adding a caption directly in the code block declaration. The caption is specified after the language identifier, wrapped in double quotes, single quotes or parentheses, exactly like the image title attribute and table captions.
```python "Fibonacci function"
def fibonacci(n):
if n <= 1:
return n
return fibonacci(n - 1) + fibonacci(n - 2)
```

The caption can also be wrapped in single quotes or parentheses, exactly like the image title attribute:
Code blocks can also be numbered: see Numbering for further information.
.numbering
- code: 1.1

- 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