Monospace for "Note" to make tables happen

I didn’t find any posts about that:

I set the font of the “note”-type to a monospace font. Then I can make aligned tables happen:

Screenshot 2022-03-15 at 18.52.35

2 Likes

I was looking for the same thing and was sad to see your post unreplied. I ended up accomplishing this with a custom stylesheet so that any item whose body content starts with four spaces will get treated like code, the way Markdown does:

item[bodyContent^="    "] {
	font-style: normal;
	font-family: MonoLisa Variable, FiraCode, Inconsolata, monospace;
}
1 Like

Oh, nice. Like this you can have best of both worlds: Notes can have a more nice to read font and tables in monospace as their own item.

2 Likes

Well, so much for that… I thought this worked, but after I closed my file and reopened it, the leading spaces were removed and the formatting broken. :frowning_face:

Would you like to drag a zipped sample into a post here ?

(There may be a slightly different way of doing it)

TaskPaper normalizes the indentation when reading a file. Good most of the time, but problematic in this case. One workaround is that you could insert some nonwhitespace leading character to set indentation level, and then align with spaces after that.