Tables
Wrap a markdown table in a table block to set column widths, cell padding, and colours. In documents, you can also display values as bars, heat shading, and progress indicators.
AI-assisted, human-approvednovem uses AI to review and keep our documentation up to date.
Available in: documents and e-mails. Chart options are document-only.
{{ table widths: 3 1 1, density: compact, sentiment: 3, caption: "Returns by asset class" }}
| Asset class | Weight | Return |
|---|--:|--:|
| Equity | 40% | +5% |
| Fixed income | 40% | +2% |
| Alternatives | 20% | -1% |
|== Total | 100% | +2.6% |
{{ /table }}
Overview
The examples on this page use fictional portfolios and funds.
A plain markdown table needs no block around it. Add a {{ table }} block
when you want to control its appearance. The block contains exactly one
markdown table, with options on the opening line.
In the example above, widths: 3 1 1 gives the Asset class column three
times the width of each numeric column. density: compact reduces the
cell padding, and sentiment: 3 colours the Return column by sign.
In documents, a table that fits stays on one page. Longer tables can split across pages, repeating the header row and retaining the column widths.
Column selectors are one-based and count columns as written in the
markdown. Alignment comes from the markdown delimiter row:
--: right-aligns, :-: centres.
E-mail support
E-mails support column widths, density, captions, sources, total rows, and
sentiment colours. The heat, bar, waterfall, stack, vertical, and steps
options do not draw charts in e-mails. A bar_color column remains visible
there. For e-mail content, omit that extra column and use a plain numeric
table. Sentiment also differs as described below.
Columns and density
keyword: widths
options: positive ratios, percentages or fr tokens, one per displayed column
widths: 3 1 1 gives the first column 60% of the width and the other two
20% each. The equivalent percentage and fraction forms are
60% 20% 20% and 3fr 1fr 1fr.
The list counts displayed columns only. In documents, a bar_color
column and columns folded into a stacked bar are hidden, so omit them
from the widths.
keyword: density
options: compact | normal | relaxed
default: normal
compact reduces cell padding; relaxed increases it. Use compact
when you need more rows to fit on a page.
keyword: caption / source
options: text
caption prints above the table, source below it, in the theme's
caption styles.
Totals, groups and spacers
These row formats work without additional options:
- A row whose first cell starts with
=is a subtotal;==marks a total. Write the marker before the label (|= Subtotal |) or on its own in an empty-headed first column. The row takes the theme's total styling and, in a waterfall, is drawn as a level from zero. - A body row with a single filled cell is a group label. Themes typically run it across the empty cells as a section heading inside the table.
- An empty body row (
| | | |) is a short spacer between row groups.
{{ table widths: 3 1 1 }}
| Holding | Weight | 1Y |
|---|--:|--:|
| Equity | | |
| Example Global Equity Fund | 25% | +6% |
| Example Small Cap Fund | 15% | +2% |
|= Equity | 40% | +4.5% |
| | | |
| Fixed income | | |
| Example Euro Bond Fund | 60% | +1% |
|== Portfolio | 100% | +2.4% |
{{ /table }}
Sentiment
keyword: sentiment
options: column numbers, e.g. 3 or 3 4
In documents, numeric cells in a sentiment column are coloured by the sign
of their first figure: positive is good, negative is bad, and zero and
text are unchanged. Negative values can use a hyphen (-1.3%), a minus
sign (−0.5), or accounting parentheses ((1.2)). The colours come from
the theme's --novem-ok and --novem-err variables.
In e-mails, cells containing a digit are coloured negative if they begin
with - or −, and positive otherwise, including zero. Use a leading
minus rather than parentheses for negative values in e-mail tables.
Heat shading
keyword: heat / heat_max
options: heat — column numbers or ranges, e.g. 2-13
options: heat_max — the magnitude that takes the full shade
heat shades the selected columns using separate colours for positive
and negative values. Larger magnitudes receive stronger shading.
By default, the largest absolute value in the selected columns receives
the strongest shade. Set heat_max to use the same scale across several
tables. For example, heat_max: 5 gives both +5% and −5% the strongest
shade; values beyond those limits use the same shade. Dark cells use
light text to keep the numbers readable.
{{ table heat: 2-7, heat_max: 5, widths: 2 1 1 1 1 1 1 }}
| Asset class | Apr | May | Jun | Jul | Aug | Sep |
|---|--:|--:|--:|--:|--:|--:|
| Equity | +2.1% | -1.4% | +3.6% | +0.9% | -2.8% | +1.2% |
| Fixed income | +0.4% | +0.6% | -0.2% | +0.8% | +0.3% | +0.5% |
| Alternatives | -0.6% | +1.9% | +0.7% | -1.1% | +4.8% | -0.3% |
{{ /table }}
Bar lists
keyword: bars / bars_max / bar_color
options: bars — column numbers or ranges
options: bars_max — the value that fills the track
options: bar_color — the column holding each row's colour
bars: 2 draws the numbers in column 2 as horizontal bars: a track, a
fill for the value's share of bars_max, and the value printed after it.
Without bars_max the largest value fills the track. bar_color: 3 reads
each row's colour from column 3, a theme token such as blue or
gray-400 or a hex literal, and hides that column. Tokens follow light and
dark mode; the colour is also exposed to the theme as --nd-row-color for
a swatch or a rule. Figures may carry a magnitude suffix, so 384k and
1.1M share one scale.
{{ table bars: 2, bars_max: 100, bar_color: 3, widths: 2 3 }}
| Asset class | Share | Colour |
|---|--:|---|
| Fixed income | 40% | blue |
| Equity | 40% | green |
| Alternatives | 15% | orange |
| Cash | 5% | gray |
{{ /table }}
In this example, the 40% allocations fill two fifths of their tracks
because bars_max is 100. The Colour column supplies the bar colours and
is hidden, so widths: 2 3 describes only the two visible columns.
Waterfall
Add waterfall: true to show how additions and deductions change a
running total. Ordinary rows add or subtract their values. Rows marked
|= or |== show totals measured from zero. A line connects each bar to
the next, and positive and negative changes use different colours.
{{ table bars: 2, waterfall: true, widths: 2 3 }}
| Flow | EUR k |
|---|--:|
|= Opening value | 8000 |
| Deposits | 100 |
| Income | 200 |
| Market movement | 300 |
| Fees | -100 |
|== Closing value | 8500 |
{{ /table }}
Here the opening value is EUR 8M. The four changes add EUR 500k, giving a closing value of EUR 8.5M. Both total values are written explicitly in the table; they are not calculated for you.
Stacked bars
stack: true folds a row's bar columns into one stacked bar drawn in the
first of them; the other bar columns disappear from the layout. With
labels: true each segment prints its column header and its value.
{{ table bars: 2-4, stack: true, labels: true, widths: 1 3 }}
| Region | Europe | Americas | Asia |
|---|--:|--:|--:|
| Equity | 48% | 37% | 15% |
| Fixed income | 71% | 22% | 7% |
{{ /table }}
The three regional columns above become one stacked bar per row.
labels: true includes each region name and value in its segment. Only
the first column and the combined bar remain visible, so there are two
entries in widths.
Vertical bars
vertical: true changes the direction of the bar fill. It requires theme
CSS to give the bars a height and arrange the rows as columns; the option
alone does not create a column chart. Each bar exposes its normalised
value as --nd-bar for that CSS to use. See the
Document theme reference
for table styling hooks.
Progress pips
keyword: steps
options: column numbers or ranges
steps: 3 reads values such as Year 3 of 10 from column 3. That value
produces ten markers: two completed, one current, and seven remaining.
The theme controls their colours with --novem-table-step,
--novem-table-step-done, and --novem-table-step-now.
{{ table steps: 3, widths: 3 1 2 }}
| Fund | Vintage | Fund life |
|---|--:|---|
| Example Ventures III | 2017 | Year 10 of 12 |
| Example Buyout VI | 2018 | Year 9 of 10 |
| Example Growth II | 2021 | Year 6 of 12 |
{{ /table }}
Combining options
This table uses bars for the called percentage and progress markers for
the fund life. Column numbers still refer to the source table: bars: 3
selects Called, steps: 5 selects Fund life, and bar_color: 6 selects
the hidden Colour column. The five widths describe the visible columns.
{{ table widths: 3 1 1 1 2, bars: 3, bars_max: 100, steps: 5, bar_color: 6 }}
| Fund | Commitment | Called | TVPI | Fund life | Colour |
|---|--:|---|--:|---|---|
| Example Ventures III | 400k | 96% | 1.95x | Year 10 of 12 | #4b3a5e |
| Example Buyout VI | 750k | 94% | 1.56x | Year 9 of 10 | #1f5f8f |
{{ /table }}
Theming
Document themes can style totals, group rows, shaded cells, bars, and progress markers separately. The Document theme reference lists their CSS classes and the variables for colours, sizes, and spacing.