Markdown tables
In Silverfin it is possible to create tables in your template to structure your text and data by using either Markdown or HTML.
Markdown tables in Silverfin
Name | Use | Symbol |
---|---|---|
Table | Used to put text in a table | |--------|------- |
Table borders | Used to add table borders | ^topline^ / ^^double top line^^ / _bottom line_ / __double bottom line__ / ] vertical line left / Vertical line right [ |
Alignment of text | Used to align text on a page or in a table | |-------- (left align)|:--------: (centered)|--------: (right align) |
Stripnewlines | It removes any newline characters (line breaks) from a string. The tag newline must be used when a break within stripnewlines is needed | {% stripnewlines %} Line 1 Item 1 Line 1 Item 2 {% newline %} Line 2 {% newline %} Line 3 {% endstripnewlines %} |
Indentation | Used to add indenting to markdown on a page or in a table | |->indented |--> indented more |
Markdown table
{% stripnewlines %}
| title | title {% newline %}
|--------|------- {% newline %}
| content | content {% newline %}
| content | content {% newline %}
{% endstripnewlines %}
Output
{% newline %}
Be careful when using the newline tag. As when it is used twice a new table will be created.
An example can be found on our community
Markdown table borders
top line
{% stripnewlines %}
| title | title {% newline %}
|--------|------- {% newline %}
| content | content {% newline %}
|^Total^|^Total^ {% newline %}
{% endstripnewlines %}
Output
double top line
{% stripnewlines %}
| title | title {% newline %}
|--------|------- {% newline %}
| content | content {% newline %}
|^^Total^^|^^Total^^{% newline %}
{% endstripnewlines %}
Output
bottom line
{% stripnewlines %}
| title | title {% newline %}
|--------|------- {% newline %}
| content | content {% newline %}
|_Total_|_Total_{% newline %}
{% endstripnewlines %}
Output
double bottom line
{% stripnewlines %}
| title | title {% newline %}
|--------|------- {% newline %}
| content | content {% newline %}
|__Total__|__Total__{% newline %}
{% endstripnewlines %}
Output
vertical line (left)
{% stripnewlines %}
|--------|------- {% newline %}
|] content |] content {% newline %}
|**Total**|**Total**{% newline %}
{% endstripnewlines %}
Output
vertical line (right)
{% stripnewlines %}
|--------|------- {% newline %}
| content [| content [{% newline %}
|**Total**|**Total**{% newline %}
{% endstripnewlines %}
Output
The community provides a useful example of different table structures you can use.
Export
In export, tables with 9 or more columns will be shown in landscape automatically (unless defined otherwise in the styles section in Silverfin).
Markdown alignment of text
You have the flexibility to choose how your text is aligned within markdown tables; left, centred or right.
{% stripnewlines %}
| title | title | title {% newline %}
|--------|:-------:|-------:# {% newline %}
| content | content| content {% newline %}
{% endstripnewlines %}
Output
Markdown indentation
Indentation can be used to format information in your table.
{% stripnewlines %}
|--------
|--------#
{% newline %}
|->indented | not indented {% newline %}
|--> indented more| not indented
{% endstripnewlines %}
Output
Updated over 2 years ago