-
Notifications
You must be signed in to change notification settings - Fork 484
Markdown Reference
For rich markup in your notes FSNotes is using cmark, the reference implementation of CommonMark. It's a well-specified flavor of Markdown with some very useful features. For the full spec, follow the CommonMark link. Here's a short summary to get you started:
If you just write your text, it is treated as a paragraph.
Now I started a new paragraph by putting a blank line between it and the previous one.
If you split a line with a newline without leaving a blank line, it still counts as
a single paragraph. All content below in this example will be a single paragraph:
You can make text _italic_ or **bold** or _**both**_.
You can ~~cross some text out~~.
You can mark some inline text as `code` so it gets clearly formatted differently using a monospace font.
You can [link to external websites](https://fsnot.es). Note that URLs in parentheses
cannot have spaces in them. If you need one, put %20 instead of the space.
You can put raw links, too: https://fsnot.es.
# Large Header (H1)
## Medium Header (H2)
### Small Header (H3)
#### Even smaller header (H4)
##### tiny header (H5)
If you don't put a space between the hash sign and the header title, it's a hashtag instead:
#hashtag <- not a header
1. Numbered
2. Lists
3. Can have
long entries
as long as the consecutive lines
are indented by 4 spaces. Not 3!
4. This is the next item.
This is after the list. (note: unlike on GitHub!)
- same rules for
indentation apply
- you can also use asterisks instead of dashes
* list this
1. use the indentation rules
1. inner list
2. goes here
2. outer list continues
- inner lists can have different ordering markers
- and they can be further nested
1. triple nesting
2. here
Note that the renderer can choose different markers from the one you put in the file. This is for clarity.
FSNotes manages inline images for you automatically. In the raw Markdown file it looks like this:
![](assets/image.jpg)
So it's like a link but with an exclamation mark in front of it. If you need to, you can add alt-text in the square brackets:
![cute puppy sleeping](assets/puppy.png)
***
---
They keep their line breaks.
> The summer grasses
> All that remains
> Of warriors’ dreams.
```
Some non-highlighted code block.
```
```python
if True:
print("Python 3 code block!")
```
```js
if (true) {
console.log("JavaScript code block!");
}
```
In text you can put a footnote like this [^1]. You will have to define it below.
[^1]: This is the footnote, you can put it anywhere, not just at the end of the document.
This isn't part of the core CommonMark spec but works in FSNotes:
| Column 1 Header | Column 2 Header |
| -- | -- |
| Some | data |
| You can **use Markdown** here, too | Including [links](https://fsnot.es) |
The point is that you don't have to laboriously align every row of data. Just put the data there and use the |
pipe character (vertical line) to delimit columns.
Those are implemented with MathJax. You can put inline equations using double parentheses. If you use double dollar signs, the equation will be rendered in its own block instead. Example:
When ((a \ne 0)), there are two solutions to $$ax^2 + bx + c = 0$$
Those are implemented with Mermaid inside a code block. Example:
```mermaid
graph TD
A-->B
A-->C
B-->D
C-->D
```