# Simple tables using Katex arrays

#1

Here’s a way to create simple tables in Dynalist using the Katex ‘array’ function.

For example, this text:

Will display as this table:

By entering CTRL-SHIFT-ENTER to start a new line when you enter the text in Dynalist, the individual table rows remain as separate lines in Dynalist, so they are quite easy to maintain.

The table text is also fully searchable.

The ‘{ccc}’ on the first line of the Katex specification indicates there are three columns, and the text is centred in each. You can use ‘l’ for left justified or ‘r’ for right justified text. You can also add either ‘:’ or ‘|’ between the characters to add dotted or full vertical lines. You can add extra lines between the rows by adding ‘\hline’ or ‘\hdashline’.

Spaces in the text to display are ignored, but you can use ‘~’ instead as I have done in the example above. You can also enter text with spaces by using this syntax: ‘\text{Text with spaces}’.

Here’s another example with 4 columns. Enter this:

To see this:

If you add ‘\left[’ after the initial ‘$$’ and ‘\right]’ just before the final ‘$$’ then braces will be added to both sides of the table, like this:

I think this is a relatively simple way to add basic table functionality to Dynalist that I have not seen mentioned before. Enjoy!

Cheers,

Stephen

#2

This is cool, thanks!

#3

Wow, this is great! Thanks for posting it.

#4

I almost thought we could do Kanban-like things with this, but it’s a bit clunky for that

#5

Hey I found a nice use case for this - daily habits / routines (it has always annoyed me with dynalist how much vertical space these take up):

$$\begin{array}{cccccccc} Daily & Mo & Tu & We & Th & Fr & Sa & Su \ \hline ~Ex~ & [x] & [] & [] & [x] & [] & [] & []\ ~Md~ & [] & [] & [] & [] & [] & [] & [] \ \end {array}$$

becomes:

Edit: Nicer formatting:

#6

@Stephen_Dewitt
Thanks for the inspiration. I made a correction to the code. Maybe it is the updates but it does not work with single backslashes.

$$\begin{array}{cccccccc} Daily & Mo & Tu & We & Th & Fr & Sa & Su \ \hline ~Ex~ & [x] & [] & [] & [x] & [] & [] & []\ ~Md~ & [] & [] & [] & [] & [] & [] & [] \ \end {array}$$

#7

Wow, that’s a great trick! Thanks for posting.