You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: add more content in Mathematics and fix some typos (#1306)
1. Add docs for block math and inline math
2. Change a grammar mistake at line 137, the single form should be used
3. Change the comma from Chinese to English for consistency of the doc.
---------
Co-authored-by: Cotes Chung <[email protected]>
Copy file name to clipboardExpand all lines: _posts/2019-08-08-write-a-new-post.md
+26-2Lines changed: 26 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -107,9 +107,33 @@ math: true
107
107
---
108
108
```
109
109
110
+
After enabling the mathematical feature, you can add math equations with the following syntax:
111
+
112
+
- **Block math** should be added with `$$ math $$` with **mandatory** blank lines before and after `$$`
113
+
- **Inline math** (in lines) should be added with `$$ math $$` without any blank line before or after `$$`
114
+
- **Inline math** (in lists) should be added with `\$$ math $$`
115
+
116
+
```markdown
117
+
<!-- Block math, keep all blank lines -->
118
+
119
+
$$
120
+
LaTeX_math_expression
121
+
$$
122
+
123
+
<!-- Inline math in lines, NO blank lines -->
124
+
125
+
"Lorem ipsum dolor sit amet, $$ LaTeX_math_expression $$ consectetur adipiscing elit."
126
+
127
+
<!-- Inline math in lists, escape the first `$` -->
128
+
129
+
1. \$$ LaTeX_math_expression $$
130
+
2. \$$ LaTeX_math_expression $$
131
+
3. \$$ LaTeX_math_expression $$
132
+
```
133
+
110
134
## Mermaid
111
135
112
-
[**Mermaid**](https://github.com/mermaid-js/mermaid) is a great diagrams generation tool. To enable it on your post, add the following to the YAML block:
136
+
[**Mermaid**](https://github.com/mermaid-js/mermaid) is a great diagram generation tool. To enable it on your post, add the following to the YAML block:
113
137
114
138
```yaml
115
139
---
@@ -123,7 +147,7 @@ Then you can use it like other markdown languages: surround the graph code with
123
147
124
148
### Caption
125
149
126
-
Add italics to the next line of an image,then it will become the caption and appear at the bottom of the image:
150
+
Add italics to the next line of an image, then it will become the caption and appear at the bottom of the image:
0 commit comments