# Layouts and richer Markdown

These examples work in normal documentation and presentation pages. Shared configuration enables `attr_list`, `md_in_html`, `def_list` and `footnotes`. No extra CSS or separate grid library is needed.

## Two images side by side

Use separate paragraphs inside a `grid` container. The grid places the images side by side when space permits and stacks them on narrow screens. Click an image to enlarge it with the shared lightbox.

[![Poisson distributions, first view](<https://relaxed-constraints.github.io/relcon-docs/images/poisson-distributions.png>)](<https://relaxed-constraints.github.io/relcon-docs/images/poisson-distributions.png>)

[![Poisson distributions, second view](<https://relaxed-constraints.github.io/relcon-docs/images/poisson-distributions.png>)](<https://relaxed-constraints.github.io/relcon-docs/images/poisson-distributions.png>)

```
<div class="grid" markdown>

![First image](images/first.png)

![Second image](images/second.png)

</div>
```

Keep the blank lines around the Markdown content and between the images. The `markdown` attribute tells the renderer to parse Markdown inside the HTML wrapper.

## Card grids

- **Describe the experiment**

  ---

  Record the question, dataset and conditions before collecting measurements.

  [Markdown examples](<https://relaxed-constraints.github.io/relcon-docs/markdown/index.md>)
- **Show the evidence**

  ---

  Pair figures with captions that explain the comparison and its limits.

  [Figure examples](<https://relaxed-constraints.github.io/relcon-docs/figures/index.md>)

```
<div class="grid cards" markdown>

-   **Describe the experiment**

    ---

    Record the question, dataset and conditions.

-   **Show the evidence**

    ---

    Pair figures with explanatory captions.

</div>
```

## Generic grids and block attributes

A regular grid can mix different kinds of blocks. Here, `{ .card }` attaches a class to a paragraph while the neighbouring quotation remains unboxed.

**Measurement** — Record timings together with the experimental conditions.

> **Interpretation** — Explain what the measurements support and what remains uncertain.

```
<div class="grid" markdown>

**Measurement** — Record timings and conditions.
{ .card }

> **Interpretation** — Explain the evidence and limitations.

</div>
```

## Image width and alignment

[![Poisson distributions aligned left](<https://relaxed-constraints.github.io/relcon-docs/images/poisson-distributions.png>)](<https://relaxed-constraints.github.io/relcon-docs/images/poisson-distributions.png>)

This image uses `align=left` and a width of 250 pixels. Text flows beside the image when space permits. Use `align=right` to place it on the other side. Grids are preferable when both pictures should occupy equal columns; alignment is useful when prose should wrap around a small illustration.

```
![Poisson distributions](images/poisson-distributions.png){ align=left width="250" }

Text flows beside the image.
```

The empty clearing element above ends the float before the next example:

```
<div style="clear: both;"></div>
```

## Figure captions

[![Poisson distributions with caption](<https://relaxed-constraints.github.io/relcon-docs/images/poisson-distributions.png>)](<https://relaxed-constraints.github.io/relcon-docs/images/poisson-distributions.png>)

Poisson probability distributions for mean rates from one to eight.

```
<figure markdown="span">

![Poisson distributions](images/poisson-distributions.png){ width="360" }

<figcaption>A short explanation of the figure.</figcaption>
</figure>
```

## Definition lists

**Baseline**

The reference configuration used for comparison.

**Candidate**

A configuration evaluated against the baseline.

**Repeat**

A separate measurement under the same conditions.

```
Baseline
:   The reference configuration used for comparison.

Candidate
:   A configuration evaluated against the baseline.
```

## Footnotes

Keep qualifications close to a claim without interrupting the main paragraph. For example, report the median execution time across repeated measurements.[^/relcon-docs/layouts/#timing]

```
Report the median execution time.[^timing]

[^timing]: Explain how the measurements were collected.
```

## Buttons and custom anchors

[Explore figures](<https://relaxed-constraints.github.io/relcon-docs/figures/index.md>)

```
[Explore figures](figures.md){ .md-button }

## A section title { #my-anchor }
```

Attribute lists attach classes, IDs and HTML attributes; they do not define new styles themselves. Use the theme's existing classes or project-owned CSS.

See Zensical's [grids](<https://zensical.org/docs/authoring/grids/>), [images](<https://zensical.org/docs/authoring/images/>) and [Python Markdown extensions](<https://zensical.org/docs/compatibility/markdown/python-markdown/>) for further syntax and options.

[^/relcon-docs/layouts/#timing]: Specify whether warm-up runs were excluded, and report the number of repetitions. This is an authoring example, not a reported experiment.
