Skip to content
Martino Ferrari edited this page Feb 10, 2018 · 12 revisions

Floating Elements

SciDown support a variety of floating elements:

  • Figure
  • Table
  • Listing
  • Equation

Inside of the floating elements the user can insert any standard markdown code inside the floating sections. It is also possible to give an id to the floating sections to then reference to them. Moreover some of the floating blocks support as well captioning.

To add a caption (optionally) simply use @caption(Your caption).

Figure

The figure block support id and captioning and is defined as:

@figure(id)
USER CODE
@caption(caption text)
@/

If you do not need the id you can simply use @figure or @figure().

Example code:

@figure
![](falcon.png)
@caption(This is a picture the *Falcon Heavy* rocket.)
@/

HTML rendered:

Table

The table floating block has the same property of the figure. To open the table floating section the syntax is simple: @table or @table(id).

Example code:

@table
|Col. 1|Col. 2|Col. 3|
|:-----|:-----|:-----|
|A     |B     |C     |
|D     |E     |F     |
|G     |H     |I     |
@caption(A simple table)
@/  

HTML rendered:

Listing

Listing works as the previous two, the syntax is @listing or @listing(id).

Example code:

@listing
```c
int main(int argc, char** argv)
{
  printf("hello world\n");
  return 0;
}
```
@caption(Some lines of code)
@/  
Clone this wiki locally