# 目录
```table-of-contents
```
# Basic formatting syntax - Obsidian Help

Learn how to apply basic formatting to your notes, using [Markdown](https://daringfireball.net/projects/markdown/). For more advanced formatting syntax, refer to [Advanced formatting syntax](https://help.obsidian.md/Editing+and+formatting/Advanced+formatting+syntax).
[[欢迎]]
## Paragraphs

To create paragraphs, use a blank line to separate one or more lines of text.

```cpp
This is a paragraph.
This is another paragraph.
```

## Headings

To create a heading, add up to six `#` symbols before your heading text. The number of `#` symbols determines the size of the heading.

# This is a headinIg 1

## This is a heading 2

### This is a heading 3

#### This is a heading 4

##### This is a heading 5

###### This is a heading 6

## Bold, italics, highlights

| Style                  | Syntax                 | Example                                  | Output                                 |
| ---------------------- | ---------------------- | ---------------------------------------- | -------------------------------------- |
| Bold                   | `** **` or `__ __`     | `**Bold text**`                          | **Bold text**                          |
| Italic                 | `* *` or `_ _`         | `*Italic text*`                          | *Italic text*                          |
| Strikethrough          | `~~ ~~`                | `~~Striked out text~~`                   | ~~Striked out text~~                   |
| Highlight              | `== ==`                | `==Highlighted text==`                   | ==Highlighted text==                   |
| Bold and nested italic | `** **` and `_ _`      | `**Bold text and _nested italic_ text**` | **Bold text and *nested italic* text** |
| Bold and italic        | `*** ***` or `___ ___` | `***Bold and italic text***`             | ***Bold and italic text***             |
|                        |                        |                                          |                                        |

## Internal links

Obsidian supports two formats for [internal links](https://help.obsidian.md/Linking+notes+and+files/Internal+links) between notes:
- Wikilink: `[[Three laws of motion]]`
- Markdown: `[Three laws of motion](Three%20laws%20of%20motion.md)`

- [[Basic formatting syntax - Obsidian Help]]

-  [[../Embedded/Practice/横冲直撞的阿呆/横冲直撞的阿呆.canvas|横冲直撞的阿呆]]
- [[../Apparatus/Attachments/Excalidraw/生产者消费者模型|生产者消费者模型]]
- [[../Apparatus/Attachments/Excel/Excel 2024-09-06 22.16.29.univer|Excel 2024-09-06 22.16.29.univer]]
- [[../Embedded/01_C_Cpp/C_Notes/05_数组-basic|05_数组-basic]]
- [[../Apparatus/DailyNote/DailyNote|DailyNote]]

## External links

If you want to link to an external URL, you can create an inline link by surrounding the link text in brackets (`[ ]`), and then the URL in parentheses (`( )`).
[Obsidian Help](https://help.obsidian.md)
You can also create external links to files in other vaults, by linking to an [Obsidian URI](https://help.obsidian.md/Extending+Obsidian/Obsidian+URI).
[Note](obsidian://open?vault=MainVault&file=Note.md)

### Escape blank spaces in links

If your URL contains blank spaces, you must escape them by replacing them with `%20`.
[My Note](obsidian://open?vault=MainVault&file=My%20Note.md)
You can also escape the URL by wrapping it with angled brackets (`< >`).
[My Note](<obsidian://open?vault=MainVault&file=My Note.md>)

## External images

You can add images with external URLs, by adding a `!` symbol before an [external link](https://help.obsidian.md/Editing+and+formatting/Basic+formatting+syntax#External%20links).

![Engelbart](Apparatus/Attachments/Assets/Engelbart.jpg)

![Engelbart](Apparatus/Attachments/Assets/Engelbart.jpg)
You can change the image dimensions, by adding `|640x480` to the link destination, where 640 is the width and 480 is the height.
![Engelbart|100x145](Apparatus/Attachments/Assets/Engelbart!100x145.jpg)
If you only specify the width, the image scales according to its original aspect ratio. For example:
![Engelbart|100](Apparatus/Attachments/Assets/Engelbart!100.jpg)

## Quotes

You can quote text by adding a `>` symbols before the text.
> Human beings face ever more complex and urgent problems, and their effectiveness in dealing with these problems is a matter that is critical to the stability and continued progress of society. \- Doug Engelbart, 1961

> Human beings face ever more complex and urgent problems, and their effectiveness in dealing with these problems is a matter that is critical to the stability and continued progress of society.
\- Doug Engelbart, 1961
You can turn your quote into a [callout](https://help.obsidian.md/Editing+and+formatting/Callouts) by adding `[!info]` as the first line in a quote.

## Lists

You can create an unordered list by adding a `-`, `*`, or `+` before the text.
- First list item - Second list item - Third list item
- First list item
- Second list item
- Third list item

To create an ordered list, start each line with a number followed by a `.` symbol.
1. First list item
2. Second list item
3. Third list item
1. First list item
2. Second list item
3. Third list item

### Task lists

To create a task list, start each list item with a hyphen and space followed by `[ ]`.
- [x] This is a completed task. - [ ] This is an incomplete task.
- This is a completed task.
- This is an incomplete task.

You can toggle a task in Reading view by selecting the checkbox.
You can use any character inside the brackets to mark it as complete.
- [x] Milk - [?] Eggs - [-] Eggs
- Milk
- Eggs
- Eggs

### Nesting lists

All list types can be nested in Obsidian.
To create a nested list, indent one or more list items:
`1. First list item 1. Ordered nested list item 2. Second list item - Unordered nested list item`

1. First list item
    1. Ordered nested list item
2. Second list item
    - Unordered nested list item
Similarly, you can create a nested task list by indenting one or more list items:

- [x] Task item 1 - [ ] Subtask 1 - [ ] Task item 2 - [ ] Subtask 1

- Task item 1
    - Subtask 1
- Task item 2
    - Subtask 1

Use `Tab` or `Shift+Tab` to indent or unindent one or more selected list items for easy organization.

## Horizontal rule

You can use three or more stars `***`, hyphens `---`, or underscore `___` on its own line to add a horizontal bar. You can also separate symbols using spaces.

*** **** * * * --- ---- - - - ___ ____ _ _ _

## Code

You can format code both inline within a sentence, or in its own block.

### Inline code

You can format code within a sentence using single backticks.
Text inside `backticks` on a line will be formatted like code.
If you want to put backticks in an inline code block, surround it with double backticks like so: inline ``code with a backtick ` inside``.

### Code blocks

To format a block of code, surround the code with triple backticks.
You can also create a code block by indenting the text using `Tab` or 4 blank spaces.
You can add syntax highlighting to a code block, by adding a language code after the first set of backticks.
```js function fancyAlert(arg) { if(arg) { $.facebox({div:'#foo'}) } } ```

```js
function fancyAlert(arg) { if(arg) { $.facebox({div:'#foo'}) } }
```

Obsidian uses Prism for syntax highlighting. For more information, refer to [Supported languages](https://prismjs.com/#supported-languages).

## Footnotes

You can add footnotes<sup data-footnote-id="fnref-1-1ee1274a5735e972" id="fnref-1-1ee1274a5735e972"><a href="https://publish.obsidian.md/#fn-1-1ee1274a5735e972" target="_blank" rel="noopener">[1]</a></sup> to your notes using the following syntax:
This is a simple footnote[^1]. [^1]: This is the referenced text. [^2]: Add 2 spaces at the start of each new line. This lets you write footnotes that span multiple lines. [^note]: Named footnotes still appear as numbers, but can make it easier to identify and link references.
You can also inline footnotes in a sentence. Note that the caret goes outside the brackets.
You can also use inline footnotes. ^[This is an inline footnote.]
Inline footnotes only work in reading view, not in Live Preview.

## Comments

You can add comments by wrapping text with `%%`. Comments are only visible in Editing view.

This is an %%inline%% comment. %% This is a block comment. Block comments can span multiple lines. %%

## Learn more

To learn more advanced formatting syntax, such as tables, diagrams, and math expressions, refer to [Advanced formatting syntax](https://help.obsidian.md/Editing+and+formatting/Advanced+formatting+syntax).

___
1. This is a footnote. [↩︎](https://publish.obsidian.md/#fnref-1-1ee1274a5735e972)

