Skip to content
ewankirk edited this page Sep 2, 2016 · 1 revision

numbering extra

The numbering extra provides support for numbering figures, equations, tables etc with the following syntax:

   [#CounterId optional_pre_text @refid optional_post_text]

If CounterId isn't defined then refid is set to be 1. Otherwise it is the next value of CounterId. The HTML which is output is

    <figcaption class="CounterId' id="counter-ref-refid`>
    optional_pre_text counter_val optional_post_text
    </figcaption>

So, for example

    [#tablecounter Table @mytable: some interesting stuff]

will output

   <figcaption class="tablecounter" id="counter-ref-mytable">Table 1: some 
    intesting stuff</figcaption>

assuming that this is the first reference to tablecounter in the document.

When you want to refer to the table you use a link of the form

    [@refid]

which outputs the html

   <a href="#counter-ref-refid" class="CounterId">counter_val</a>

So in the example above, markdown like this

    In Table [@mytable] we see something interesting

will output

    In Table <a href="#counter-ref-mytable" class="tablecounter">1</a> we 
    see something interesting

Different counters can have different styles by using CSS selectors

     a.tablecounter: {color: green}
     figcaption.tablecounter: {font-size: smaller}

(Return to Extras page.)

Clone this wiki locally