summaryrefslogtreecommitdiff
path: root/themes/blowfish/exampleSite/content/samples/mathematical-notation/index.md
blob: f0590a0a52d9899cc8c6cced7b61b8f472574806 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
title: Mathematical notation
date: 2019-03-08
description: A brief sample of mathematical notation in Blowfish.
tags: ["sample", "katex", "maths", "shortcodes"]
type: 'sample'
---

KaTeX can be used to render mathematical notation within articles.

<!--more-->

{{< katex >}}

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. Example below:

```md
{{</* katex */>}}
```
Any KaTeX syntax on that page will then be automatically rendered. 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} } }
$$