figure - speced/respec GitHub Wiki

<figure>

Standard HTML <figure> elements are enhanced by ReSpec with automatic numbering, self-links, and cross-reference support.

Usage

<figure id="flowchart">
  <img src="flowchart.svg" alt="Water flows from bucket A to bucket B" />
  <figcaption>The water flows from bucket A to bucket B.</figcaption>
</figure>

<p>As shown in <a href="#flowchart"></a>, the flow is one-directional.</p>

The empty <a href="#flowchart"> auto-fills with "Figure N" text.

Notes

  • Figures are numbered automatically ("Figure 1", "Figure 2", โ€ฆ)
  • A <figcaption> is required โ€” figures without one generate a ReSpec warning
  • Empty links to a figure's id auto-populate with "Figure N"
  • A self-link (ยง) is generated so readers can link directly to a specific figure
  • Generate a list of all figures with tof (Table of Figures)
  • The <figcaption> should be a proper caption describing the figure, not just a title
โš ๏ธ **GitHub.com Fallback** โš ๏ธ