Table of Contents

Tables and Figures

<alert info>This functionality is based on a tweaked version of the Plugin Caption.</alert>

You can give captions to the following items:

  1. tables
  2. figures
  3. image box

The syntax is as follows:

Tables

<table label-of-table>
<caption>Give you caption here and it will be numbered automatically</caption>
^ table head 1 ^ table head 2 ^ table head 3 ^ table head 4 ^
| table cell 1 | table cell 2 | table cell 3 | table cell 4 |
| table cell 5 | table cell 6 | table cell 7 | table cell 8 |
</table>

How the above code looks like in reality:

Table 1: Give you caption here and it will be numbered automatically
table head 1 table head 2 table head 3 table head 4
table cell 1 table cell 2 table cell 3 table cell 4
table cell 5 table cell 6 table cell 7 table cell 8

Figures

<figure label-of-figure>
{{ :wiki:oxford-university-square-logo.png |University logo}}
<caption>Give you caption here and it will be numbered automatically. The primary quadrangle logo consists of an Oxford blue (Pantone 282) square with the words UNIVERSITY OF OXFORD at the foot and the belted crest in the top right-hand corner reversed out in white. The word OXFORD is a specially drawn typeface while all other text elements use the typeface Foundry Sterling.</caption>
</figure>

How it looks like in work:

University logo
Figure 1: Give you caption here and it will be numbered automatically. The primary quadrangle logo consists of an Oxford blue (Pantone 282) square with the words UNIVERSITY OF OXFORD at the foot and the belted crest in the top right-hand corner reversed out in white. The word OXFORD is a specially drawn typeface while all other text elements use the typeface Foundry Sterling.

The picture could be replaced by a chart or plot if required, for example:

<figure pie-chart-1>
<caption>Caption for the pie chart</caption>
<c3>
  // some comment
  data: {
    columns: [
      ['data1', 30], /* more comment */
      ['data2', 120],
    ],
    type : 'pie',
  }
</c3>
</figure>
Figure 2: Caption for the pie chart
<c3>
// some comment
data: {
  columns: [
    ['data1', 30], /* more comment */
    ['data2', 120],
  ],
  type : 'pie',
}

</c3>

Image box

Occasionally you may need to include a image box in the page but does not want it to look like a figure. In this case, you may just use an image box.

<imagebox label-of-imagebox>
{{ :wiki:oxford-university-square-logo.png |University logo}}
<caption>This is an image box</caption>
</imagebox>

How it looks like in work (see Image ##REF:label-of-imagebox##):

<imagebox label-of-imagebox> University logo <caption>This is a image box for the University of Oxford logo.</caption> </imagebox>

Reference

What if I need to refer to a table/figure/image box in the text?

We may have noticed in the image box section that there's a link to the image box. A table/figure/image box could be referred to in text by its label like this:

For more ideas, please see Table {{ref>label-of-table}}.

How it works in reality:

For more ideas, please see Table 1.