Skip to content

Markdown

经验#

  • 不同网站的解析方式不同 不知道hexo是怎么解释的,有没有文档 如果多次引用放在最前

<!--用html注释--> |

测试过的技巧#

通用#

hexo VScode CSDN
[^sth] 只隐藏后面第一行 会隐藏全部有缩进的内容
[<sth] [>sth] 只隐藏后面第一行 只隐藏后面第一行
*[sth] 无效 无效
#5 没有用
; 注释 ;注释 : 注释 全都无效
[^x]+[^x]: 引用。 通用的放在最后吧。
别人没提到的:
搜索用关键字: Markdown tooltip
隐藏式注释 [show](<> 'hide') show
是在这学的 (https://assemble.io/docs/Cheatsheet-Markdown.html)
用了超链接的格式 其中<> 是网址 可以用#代替(应该会干扰书签Named Anchors)

数学- $\KaTeX$#

$\KaTeX$文档 行内公式: $\Gamma(n) = (n-1)!\quad\forall n\in\mathbb N$ 块级公式: (必须另起一行) $$ x = \dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a} $$

Bug of $\KaTeX$#
Code out
$\LaTeX$ $\LaTeX$

Blockquotes#

` tag: 引用 quote

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante

Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue. Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi.

Sed adipiscing elit vitae augue consectetur a gravida nunc vehicula. Donec auctor odio non est accumsan facilisis. Aliquam id turpis in dolor tincidunt mollis ac eu diam.

Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue. Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi.

表格#

  • 如果想合并行/列/显示复杂内容,还是要借助HTML

#

折叠区 [^fold]#

tag: 隐藏,展示

一直显示 展开折叠显示
1
2
3
4
<details>
<summary>一直显示</summary>
展开折叠显示
</details>

不好用^w3cfold

1
2
3
region i { information 示例
← information icon
} region information 示例

流程图^maxiang#

不用markdown渲染器的渲染规则不同 以下是一些例子

1
2
3
4
5
6
7
s=>start: Start of Flow
e=>end: End of Flow
o=>operation: Operation Descreption
cond=>condition: Condition Descreption

s->o->cond(yes)->e
cond(no)->o

Code:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
[ESCAPE]```flow
s=>start: Start of Flow
e=>end: End of Flow
o=>operation: Operation Descreption
cond=>condition: Condition Descreption

s->o->cond
cond(yes)->e
cond(no)->o
cond(no)->op
[ESCAPE]```
Cheatsheet#
  • From: https://www.jianshu.com/p/a9bd83b768d5 ````markdown ## 操作块(格式为:变量=>操作块: 备注名) st=> start: 开始 e=>end: 结束 #普通操作块 opration op1=>opration: 第一个操作块 op2=>opration: 第二个操作块 #判断块 condition cond1=>condition: 第一个判断 cond2=>condition: 第二个判断

    输入输出块 inputoutput[平行四边形]#

    io1=>inputoutput: 输入输出块1 io2=>inputoutput: 输入输出块2

    子任务块#

    sub1=>subroutine: 子任务1 sub2=>subroutine: 子任务2

    判断和位置控制#

    判断流程控制#

    cond1(yes)->op1 #yes 的时候回到 op1 cond1(no)->e #no 的时候 去结束

    位置指定#

    cond1(no)->op2(right)->op1 #控制 op2 位置置于右边,再由op2 返回 op1 (好像不能向左)

    还可以这样 cond1(no,right)#

    cond1(yes)->e

    流程控制#

    分着写#

    st->op1 op1->e

    合着写#

    st->op1->e

    判断也是一样:#

    st->cond cond(yes)->io cond(no)->op1 ````

another flowchart syntex#

which doesn't work https://zhuanlan.zhihu.com/p/28468233

1
2
3
4
5
6
[ESCAPE]```flow
s=start:开始
e=end:结束
o=operation:操作项
s-o-e
[ESCAPE]```

时序图^maxiang#

1
2
3
Alice->Bob: Hello Bob, how are you?
Note right of Bob: Bob thinks
Bob-->Alice: I am good thanks!

整体性的经验#

[]看来是特殊符号。 []中的内容,发现的特殊用法记录一下。 各种开头的表现 正文中不显示会变成注释。 在vscode插件中和在hexo中表现不一致

好用的学习网站#

  • 很全的文档:https://assemble.io/docs/Cheatsheet-Markdown.html
  • 在线编译+中等文档^maxiang
  • Mac 下的工具 https://typora.io/

反思#

之前一直想用来写各种笔记的东西原来就是Markdown。 早就听过一直没仔细看,亏了。 之前一直想建网站原来就应该用GitHub Pages,就因为差一个Hexo模板,在Google Sites里搞了半天。 因为之前一直没有仔细查过别人的经验,就自己想当然,竟然还想自己写一个。 Hexo发现是在dantefung的博客,找他的第一篇笔记(当时还不知道能搜索)。

in #Obsidian https://prismjs.com/#supported-languages

hexo-tag-katex 格式太麻烦 不好用 https://github.com/iamprasad88/hexo-tag-katex

Other#

  • AsciiDoc
  • calculist.io
  • Zettelkasten https://zettelkasten.de/

web page#

https://readthedocs.org/

Vim#

AKA Vi.

commands#

: go to command bar (show prompt bar)

  • q! exit without saving the changes.