Skip to content

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)
```
Caption

 

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
Numbered caption

Getting started [NEW!]

Documentation

CLI tools

Markdown enhancements

Functions

Setting up

Multi-file projects

Layout

Charts & diagrams

Scripting & control flow

Utilities

Slides

I/O

Native content

Value types

Built-in libraries

  • Paper: abstract, definitions, theorems, and more

Extra features

Inside Quarkdown

Clone this wiki locally