I’ve been feeling hedged in a bit by Notion’s (lack of) formatting options. My desires are modest – just a few more color options and an additional font would change things so much for me. So I began looking into KaTeX, which is a math typesetting library that Notion supports, to see what it could offer. Here’s what I found. Even if you don’t use it for displaying mathematical equations, it has many powerful capabilities for formatting that can be used to beautify your Notion workspace. And because Notion allows KaTeX to be used inline you can use any of these options mid-paragraph or mid-sentence.
A couple of words on the KaTeX syntax. Functions start with a slash \
and arguments are contained within curly brackets {}
. Unless KaTeX knows that what you are typing is intended as text, spaces are not rendered. You can inject a space with a tilde ~
. All of these options that I show below can be nested and used together to achieve a variety of effects.
To add KaTeX to your Notion page, you can use one of the following methods:
- Highlight a section of text and click “Create equation” from the hover menu
- Create a new block type of “Inline equation”
- Or simply enclose your equation in double dollar signs:
$$yourequationhere$$
Colors
KaTeX supports at least 147 pre-defined colors that I’ve found (and possibly even more!). In addition to pre-defined colors, you can use hex codes to render exactly the color that you want.
Text Colors
\color{red}{your~text~here}
\color{#cb345a}{your~text~here}
Background Colors
\colorbox{aquamarine}{your text here}
\colorbox{#cb345a}{your text here}
Simple Borders
\fbox {your text here}
Colored Borders
The first parameter of fcolorbox
is the border color; the second parameter is the background color:\fcolorbox{tomato}{white}{your text here}
Fonts
Here are the best of the available fonts. There are additional bold and italic fonts. Find them in the KaTeX functions reference guide.
Typewriter:\mathtt {your~text~here}
Sans Serif:\mathsf {your~text~here}
Chalkboard:\mathbb {your~text~here}
Roman:\mathrm {your~text~here}
Caligraphic:\mathcal {your~text~here}
Text Sizes
Adjust your text size from tiny all the way up to huge:
\tiny {your~text~here}
\scriptsize {your~text~here}
\footnotesize {your~text~here}
\small {your~text~here}
\normalsize {your~text~here}
\large {your~text~here}
\Large {your~text~here}
\LARGE {your~text~here}
\huge your~text~here
\Huge {your~text~here}
Text Decorations
Here are some other text formatting options that could be useful in your Notion workspace layout:
\underline{underline}
\overline {overline}
\utilde{swooshy~underline}
\underrightarrow{underline~right~arrow}
\underleftarrow{underline~left~arrow}
\undergroup{group}
\sout{strikethrough}
\xcancel{Xcancel}
Text Alignment
Center align text using the alignment parameter:
\begin{aligned} your~center~aligned~text~here \end{aligned}
Special Use Cases
I’ve found some additional utility for KaTeX formatting that includes altering the look of database names and text properties. The most useful is for hiding a database name when it is distracting and takes away from the particular meaning of the database view you are displaying. This should be used sparingly and with caution, as the formula becomes part of your database name and is not readable or intuitive.
Note: Notion now allows database names to be hidden from view! You can set this within the database view options. Thank you, Notion!
KaTex can do so so so much more! This is only a sampling. Read the official documentation to learn more
See all of these formatting options in action and get the KaTeX formulas here:
Duplicate Notion template