2022-09-10 14:05:37 -05:00
---
title: Mathematical notation
date: 2019-03-08
2022-09-12 18:49:15 -05:00
description: A brief sample of mathematical notation in Blowfish.
2022-09-10 14:05:37 -05:00
tags: ["sample", "katex", "maths", "shortcodes"]
---
KaTeX can be used to render mathematical notation within articles.
<!-- more -->
{{< katex > }}
2022-09-12 18:49:15 -05:00
Blowfish will only bundle the KaTeX assets into your project if you make use of mathematical notation. In order for this to work, simply include the [`katex` shortcode ]({{< ref "docs/shortcodes#katex" >}} ) within the article. Any KaTeX syntax on that page will then be automatically rendered.
2022-09-10 14:05:37 -05:00
Use the online reference of [supported TeX functions ](https://katex.org/docs/supported.html ) for the available syntax.
## Inline notation
Inline notation can be generated by wrapping the expression in `\\(` and `\\)` delimiters.
**Example:**
```tex
% KaTeX inline notation
Inline notation: \\(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\\)
```
Inline notation: \\(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\\)
## Block notation
Alternatively, block notation can be generated using `$$` delimiters. This will output the expression in its own HTML block.
**Example:**
```tex
% KaTeX block notation
$$
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
$$
```
$$
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
$$